Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
sequencelengths
0
101
negative_scores
sequencelengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Check if two values are loosely equal that is, if they are plain objects, do they have the same shape?
function looseEqual (a, b) { if (a === b) { return true } var isObjectA = isObject(a); var isObjectB = isObject(b); if (isObjectA && isObjectB) { try { var isArrayA = Array.isArray(a); var isArrayB = Array.isArray(b); if (isArrayA && isArrayB) { return a.length === b.length && a.every(function (e, i) { return looseEqual(e, b[i]) }) } else if (a instanceof Date && b instanceof Date) { return a.getTime() === b.getTime() } else if (!isArrayA && !isArrayB) { var keysA = Object.keys(a); var keysB = Object.keys(b); return keysA.length === keysB.length && keysA.every(function (key) { return looseEqual(a[key], b[key]) }) } else { /* istanbul ignore next */ return false } } catch (e) { /* istanbul ignore next */ return false } } else if (!isObjectA && !isObjectB) { return String(a) === String(b) } else { return false } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sameExactShape(a, b) {\n\treturn JSON.stringify(a) === JSON.stringify(b)\n}", "function sameShape(a, b) {\n return JSON.stringify(a) === JSON.stringify(b)\n}", "function looseEqual(a,b){var isObjectA=isObject(a);var isObjectB=isObject(b);if(isObjectA&&isObjectB){return JSON.stringify(a)===JSON.stringify(b);}else if(!isObjectA&&!isObjectB){return String(a)===String(b);}else{return false;}}", "function objects_hold_same_values(o1, o2)\n{\n\tif (typeof(o1) != typeof(o2))\n\t\treturn false;\n\t\t\n\tswitch (typeof(o1))\n\t{\n\t\tcase \"number\":\n\t\t\tif (isNaN(o1) && isNaN(o2))\n\t\t\t\treturn true;\n\t\t\treturn o1 == o2;\n\t\tbreak;\n\t\tcase \"boolean\":\n\t\t\treturn o1 == o2;\n\t\tbreak;\n\t\tcase \"string\": \n\t\t\tif (o1 != null && o2 != null && o1.length != o2.length)\n\t\t\t\treturn false;\n\t\t\treturn o1 == o2;\n\t\tbreak;\n\t\tcase \"object\": /* also, arrays */\n\t\t\tif (o1 != null && o2 != null && o1.length != o2.length)\n\t\t\t\treturn false;\n\t\t\tvar i;\n\t\t\tfor (i in o1)\n\t\t\t{\n\t\t\t\tif(!objects_hold_same_values(o1[i], o2[i]))\n\t\t\t\treturn false;\n\t\t\t}\n\t\tbreak;\n\t\tdefault:\n\t\t\treturn o1 == o2;\n\t\tbreak;\n\t}\n\n\treturn true;\n}", "function sameShapeAndProto(a, b) {\n return JSON.stringify(a) === JSON.stringify(b) && hasSamePrototypeChain(a, b)\n}", "function looseEqual(a,b){if(a===b){return true;}var isObjectA=isObject(a);var isObjectB=isObject(b);if(isObjectA&&isObjectB){try{var isArrayA=Array.isArray(a);var isArrayB=Array.isArray(b);if(isArrayA&&isArrayB){return a.length===b.length&&a.every(function(e,i){return looseEqual(e,b[i]);});}else if(!isArrayA&&!isArrayB){var keysA=Object.keys(a);var keysB=Object.keys(b);return keysA.length===keysB.length&&keysA.every(function(key){return looseEqual(a[key],b[key]);});}else{/* istanbul ignore next */return false;}}catch(e){/* istanbul ignore next */return false;}}else if(!isObjectA&&!isObjectB){return String(a)===String(b);}else{return false;}}", "function looseEqual(a,b){if(a===b){return true;}var isObjectA=isObject(a);var isObjectB=isObject(b);if(isObjectA&&isObjectB){try{var isArrayA=Array.isArray(a);var isArrayB=Array.isArray(b);if(isArrayA&&isArrayB){return a.length===b.length&&a.every(function(e,i){return looseEqual(e,b[i]);});}else if(!isArrayA&&!isArrayB){var keysA=Object.keys(a);var keysB=Object.keys(b);return keysA.length===keysB.length&&keysA.every(function(key){return looseEqual(a[key],b[key]);});}else{/* istanbul ignore next */return false;}}catch(e){/* istanbul ignore next */return false;}}else if(!isObjectA&&!isObjectB){return String(a)===String(b);}else{return false;}}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n return JSON.stringify(a) === JSON.stringify(b)\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n return JSON.stringify(a) === JSON.stringify(b)\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n return JSON.stringify(a) === JSON.stringify(b)\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n return JSON.stringify(a) === JSON.stringify(b)\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n return JSON.stringify(a) === JSON.stringify(b)\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function objectsAreIdentical( objs ){\n\t\n\tvar identical = true; \n\tvar length0 = getObjectLength( objs[0] );\n\tvar length1 = getObjectLength( objs[1] );\n\tvar isObj0, isObj1;\n\t\n\tif ( length0 !== length1 ){\n\t\tidentical = false;\n\t}\n\t\n\telse if ( objs[0].isColor && objs[1].isColor ){\n\t\tif ( !objs[0].equals( objs[1] ) ) { identical = false; }\n\t}\n\t\n\telse if ( !objs[0].isColor && !objs[1].isColor ){\n\t\tfor ( var k in objs[0] ){\n\t\t\tif ( !objs[1].hasOwnProperty( k ) ){\n\t\t\t\tidentical = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor ( var k in objs[1] ){\n\t\t\tif ( !objs[0].hasOwnProperty( k ) ){\n\t\t\t\tidentical = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor ( var k in objs[0] ){\n\t\t\tif ( objs[0][k] !== objs[1][k] ){\n\t\t\t\tidentical = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tdebug.master && debug.generalUtils && console.log( 'objectsAreIdentical(): ', identical );\n\treturn identical;\n}", "function looseEqual (a, b) {\n\t var isObjectA = isObject(a);\n\t var isObjectB = isObject(b);\n\t if (isObjectA && isObjectB) {\n\t return JSON.stringify(a) === JSON.stringify(b)\n\t } else if (!isObjectA && !isObjectB) {\n\t return String(a) === String(b)\n\t } else {\n\t return false\n\t }\n\t}", "function looseEqual (a, b) {\n\t var isObjectA = isObject(a);\n\t var isObjectB = isObject(b);\n\t if (isObjectA && isObjectB) {\n\t return JSON.stringify(a) === JSON.stringify(b)\n\t } else if (!isObjectA && !isObjectB) {\n\t return String(a) === String(b)\n\t } else {\n\t return false\n\t }\n\t}", "function looseEqual(a, b) {\n\t var isObjectA = isObject(a);\n\t var isObjectB = isObject(b);\n\t if (isObjectA && isObjectB) {\n\t return JSON.stringify(a) === JSON.stringify(b);\n\t } else if (!isObjectA && !isObjectB) {\n\t return String(a) === String(b);\n\t } else {\n\t return false;\n\t }\n\t}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n return JSON.stringify(a) === JSON.stringify(b)\n } catch (e) {\n // possible circular reference\n return a === b\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n return JSON.stringify(a) === JSON.stringify(b)\n } catch (e) {\n // possible circular reference\n return a === b\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n return JSON.stringify(a) === JSON.stringify(b)\n } catch (e) {\n // possible circular reference\n return a === b\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n return JSON.stringify(a) === JSON.stringify(b)\n } catch (e) {\n // possible circular reference\n return a === b\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n return JSON.stringify(a) === JSON.stringify(b)\n } catch (e) {\n // possible circular reference\n return a === b\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n return JSON.stringify(a) === JSON.stringify(b)\n } catch (e) {\n // possible circular reference\n return a === b\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n return JSON.stringify(a) === JSON.stringify(b)\n } catch (e) {\n // possible circular reference\n return a === b\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n return JSON.stringify(a) === JSON.stringify(b)\n } catch (e) {\n // possible circular reference\n return a === b\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n return JSON.stringify(a) === JSON.stringify(b)\n } catch (e) {\n // possible circular reference\n return a === b\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n return JSON.stringify(a) === JSON.stringify(b)\n } catch (e) {\n // possible circular reference\n return a === b\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n return JSON.stringify(a) === JSON.stringify(b)\n } catch (e) {\n // possible circular reference\n return a === b\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n\t var isObjectA = isObject(a);\n\t var isObjectB = isObject(b);\n\t if (isObjectA && isObjectB) {\n\t try {\n\t return JSON.stringify(a) === JSON.stringify(b)\n\t } catch (e) {\n\t // possible circular reference\n\t return a === b\n\t }\n\t } else if (!isObjectA && !isObjectB) {\n\t return String(a) === String(b)\n\t } else {\n\t return false\n\t }\n\t}", "function looseEqual (a, b) {\n\t var isObjectA = isObject(a);\n\t var isObjectB = isObject(b);\n\t if (isObjectA && isObjectB) {\n\t try {\n\t return JSON.stringify(a) === JSON.stringify(b)\n\t } catch (e) {\n\t // possible circular reference\n\t return a === b\n\t }\n\t } else if (!isObjectA && !isObjectB) {\n\t return String(a) === String(b)\n\t } else {\n\t return false\n\t }\n\t}", "function looseEqual (a, b) {\n\t var isObjectA = isObject(a);\n\t var isObjectB = isObject(b);\n\t if (isObjectA && isObjectB) {\n\t try {\n\t return JSON.stringify(a) === JSON.stringify(b)\n\t } catch (e) {\n\t // possible circular reference\n\t return a === b\n\t }\n\t } else if (!isObjectA && !isObjectB) {\n\t return String(a) === String(b)\n\t } else {\n\t return false\n\t }\n\t}", "function isEqualObjects(x, y, depth)\n\t{\n\t\tvar rtnValue = false;\n\n\t\twhile (!rtnValue)\n\t\t{\n\t\t\tif (x === null || x === undefined || y === null || y === undefined)\n\t\t\t{\n\t\t\t\trtnValue = (x === y); \t\t\t\t//not both null or undefined\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (x.constructor !== y.constructor)\n\t\t\t\treturn false;\t\t\t\t\t\t//not both same constructor\n\n\t\t\tif (typeof(x) == 'number' && isNaN(x) && isNaN(y))\n\t\t\t\treturn true;\t\t\t\t\t\t//required because NaN === NaN is false\n\n\t\t\t// if they are functions, they should exactly refer to same one (because of closures)\n\t\t\t// NO: same name and script except comments (if comment stripper available)\n\t\t\tif (x instanceof Function)\n\t\t\t{\n\t\t\t\t//if (!x.name && x.name != y.name && x !== y)\n\t\t\t\tif (x.name !== y.name)\n\t\t\t\t\tbreak;\n\n\t\t\t\tif ((x + '').trim() !== (y + '').trim())\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// if they are regexps, they should exactly refer to same one\n\t\t\t// (it is hard to better equality check on current ES)\n\t\t\t// NO -- only check flags and source patter properties -- NOT lastIndex\n\t\t\tif (x instanceof RegExp)\n\t\t\t{\n\t\t\t\treturn x.global == y.global && x.ignoreCase == y.ignoreCase\n\t\t\t\t\t&& x.multiline == y.multiline && x.source == y.source;\n\t\t\t\t//return x === y;\n\t\t\t}\n\n\t\t\tif (x === y || x.valueOf() === y.valueOf())\n\t\t\t\treturn true;\t\t\t\t\t\t\t//both same object ??\n\n\t\t\tif (x instanceof Array)\n\t\t\t{\n\t\t\t\tif (x.length !== y.length)\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Date: date and time zone besides owner properties (e.g. EZ.date)\n\t\t\tif (x instanceof Date)\n\t\t\t{\n\t\t\t\tif (x.getTime() != y.getTime())\n\t\t\t\t\tbreak;\t\t\t\t\t\t//different dates\n\t\t\t}\n\n\t\t\t// not Object: if they are strictly equal, they both need to be object at least\n\t\t\tif (!(x instanceof Object) || !(y instanceof Object))\n\t\t\t\tbreak;\n\n\n\t\t\tif (getType(x) != getType(y))\n\t\t\t\tbreak;\n\n\t\t\t//------------------------------------------\n\t\t\t// embedded object properties equality check\n\t\t\t//------------------------------------------\n\t\t\tvar keys = Object.keys(x);\n\t\t\tvar keysOther = Object.keys(y);\n\t\t\tif (getType(x) != 'array')\n\t\t\t{\n\t\t\t\tkeys.sort();\n\t\t\t\tkeysOther.sort();\n\t\t\t}\n\t\t\tif (keys.join('.') != keysOther.join('.'))\n\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\t//keys DO NOT must match\n\t\t\t\tif (!showDiff)\n\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t//quit if not logging diff\n\n\t\t\t\tif (getType(x) == 'array')\t\t\t\t\t//use highest # of keys\n\t\t\t\t\tkeys = x.length < y.length ? keysOther : keys;\n\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tkeysOther.forEach(function(key)\t\t\t//get combined list of keys\n\t\t\t\t\t{\n\t\t\t\t\t\tif (keys.indexOf(key) == -1)\n\t\t\t\t\t\t\tkeys.push(key);\n\t\t\t\t\t});\n\t\t\t\t\tkeys.sort();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tkeys.every(function(key)\t\t\t\t\t\t//for every key until false returned . . .\n\t\t\t{\n\t\t\t\t//if (EZ.test.debug('EZequals')) debugger;\n\n\t\t\t\tdotName.push(key);\n\t\t\t\tdo\t\t\t\t\t\t\t\t\t\t\t//for function or object properties . . .\n\t\t\t\t{\n\t\t\t\t\tif (!(x[key] instanceof Object))\n\t\t\t\t\t{\n\t\t\t\t\t\trtnValue = isEqualObjects(x[key], y[key], depth+1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (x[key] == y[key])\n\t\t\t\t\t\treturn true;\t\t\t\t\t\t\t//equal if same Object\n\n\t\t\t\t\te = getObjectIdx;\n\t\t\t\t\t/*\n\t\t\t\t\tif (!showDiff && EZ.test && EZ.test.running != 'EZequals')\n\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t//skip repeat logic UNLESS TESTING\n\n\t\t\t\t\tvar i = getObjectIdx('x', x[key]);\t\t//index of processed x Objects\n\t\t\t\t\tif (matchedObj.x[i].includes(y[key]))\n\t\t\t\t\t\treturn true;\t\t\t\t\t\t\t//previously matched y[key]\n\t\t\t\t\tif (unmatchedObj.x[i].includes(y[key]))\n\t\t\t\t\t\treturn false || showDiff;\t\t\t\t//previously did NOT match y[key]\n\n\t\t\t\t\tvar j = getObjectIdx('y', y[key]);\t\t//index of processed y Objects\n\t\t\t\t\tif (matchedObj.y[j].includes(x[key]))\n\t\t\t\t\t\treturn true;\t\t\t\t\t\t\t//previously matched x[key]\n\t\t\t\t\tif (unmatchedObj.y[j].includes(x[key]))\n\t\t\t\t\t\treturn false || showDiff;\t\t\t\t//previously did NOT match y[key]\n\t\t\t\t\t*/\n\n\t\t\t\t\trtnValue = isEqualObjects(x[key], y[key], depth+1);\n\n\t\t\t\t\t//if (!isEqual)\n\t\t\t\t\t//\tlogDiff(x[key], y[key]);\n\n\t\t\t\t\t/*\n\t\t\t\t\tif (isEqual)\n\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t//objects match -- remember for future\n\t\t\t\t\t\tmatchedObj.x[i].push(y[key]);\n\t\t\t\t\t\tmatchedObj.y[j].push(x[key]);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t//remember NOT matched\n\t\t\t\t\t\tunmatchedObj.x[i].push(y[key]);\n\t\t\t\t\t\tunmatchedObj.y[j].push(x[key]);\n\t\t\t\t\t\treturn || showDiff;\t\t\t\t//previously did NOT match y[key]\n\t\t\t\t\t}\n\t\t\t\t\t*/\n\t\t\t\t}\n\t\t\t\twhile (false)\n\n\t\t\t\tdotName.pop();\n\t\t\t\treturn rtnValue || showDiff;\n\t\t\t});\n\t\t\tif (rtnValue)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\tbreak;\n\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//log if showDiff enabled\n\t\twhile (!rtnValue && showDiff)\t// )\n\t\t{\n\t\t\tif (getType(x) == getType(x)\n\t\t\t&& typeof(x) == 'object' && typeof(y) == 'object')\n\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t\t//already reported\n\n\t\t\tif (showDiff !== true)\t\t\t\t\t\t\t//heading if not true\n\t\t\t{\n\t\t\t\tconsole.log(showDiff);\n\t\t\t\tshowDiff = true;\n\t\t\t}\n\t\t\tvar key = dotName.join('.');\n\t\t\tkey = key ? '.' + key : '';\n\t\t\tkey = key.replace(/\\.(\\d+)\\b/, '[$1]');\n\t\t\tvar msg = typeof(x) != typeof(y) && x != null && y != null\n\n\t\t\t\t\t? 'typeof(x' + key + '):\\t' + typeof(x) + '\\n'\n\t\t\t\t\t+ 'typeof(y' + key + '):\\t' + typeof(y)\n\n\t\t\t\t\t: 'x' + key + ':\\t' + x + '\\n'\n\t\t\t\t\t+ 'y' + key + ':\\t' + y;\n\n\t\t\tconsole.log('\\t' + msg.replace(/:\\t/g, ': ').replace(/\\n/g, ' \\t '));\n\t\t\t//console.log('\\t' + msg);\n\n\t\t\tmsg = msg.split('\\n');\n\t\t\tEZ.equals.log.push(msg[0], msg[1], ' ');\t//{key:dotName, x:x, y:y}\n\t\t\tbreak;\n\t\t}\n\t\treturn rtnValue;\n\t}", "function looseEqual(a, b) {\n\t var isObjectA = isObject(a);\n\t var isObjectB = isObject(b);\n\t if (isObjectA && isObjectB) {\n\t try {\n\t return JSON.stringify(a) === JSON.stringify(b);\n\t } catch (e) {\n\t // possible circular reference\n\t return a === b;\n\t }\n\t } else if (!isObjectA && !isObjectB) {\n\t return String(a) === String(b);\n\t } else {\n\t return false;\n\t }\n\t}", "function looseEqual(a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n return JSON.stringify(a) === JSON.stringify(b);\n } catch (e) {\n // possible circular reference\n return a === b;\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b);\n } else {\n return false;\n }\n}", "function isEqualObjects(x, y, depth)\n\t{\n\t\tif (x === null || x === undefined || y === null || y === undefined)\n\t\t\treturn x === y; \t\t\t\t\t//not both null or undefined\n\n\t\tif (x.constructor !== y.constructor)\n\t\t\treturn false;\t\t\t\t\t\t//not both same constructor\n\n\t\tif (typeof(x) == 'number' && isNaN(x) && isNaN(y))\n\t\t\treturn true;\t\t\t\t\t\t//required because NaN === NaN is false\n\n\t\t// if they are functions, they should exactly refer to same one (because of closures)\n\t\t// NO: same name and script except comments (if comment stripper available)\n\t\tif (x instanceof Function)\n\t\t{\n\t\t\t//if (!x.name && x.name != y.name && x !== y)\n\t\t\tif (x.name !== y.name)\n\t\t\t\treturn false;\n\n\t\t\tif ((x + '').trim() !== (y + '').trim())\n\t\t\t\treturn false;\n\t\t}\n\n\t\t// if they are regexps, they should exactly refer to same one\n\t\t// (it is hard to better equality check on current ES)\n\t\t// NO -- only check flags and source patter properties -- NOT lastIndex\n\t\tif (x instanceof RegExp)\n\t\t{\n\t\t\treturn x.global == y.global && x.ignoreCase == y.ignoreCase\n\t\t\t\t&& x.multiline == y.multiline && x.source == y.source;\n\t\t\t//return x === y;\n\t\t}\n\n\t\tif (x === y || x.valueOf() === y.valueOf())\n\t\t\treturn true;\t\t\t\t\t\t\t//both same object ??\n\n\t\tif (x instanceof Array && x.length !== y.length)\n\t\t\treturn false;\n\n\t\t// Date: date and time zone besides owner properties (e.g. EZ.date)\n\t\tif (x instanceof Date)\n\t\t{\n\t\t\tif (x.getTime() != y.getTime())\n\t\t\t\treturn false;\t\t\t\t\t\t//different dates\n\t\t}\n\t\t\n\t\t// not Object: if they are strictly equal, they both need to be object at least\n\t\tif (!(x instanceof Object) || !(y instanceof Object))\n\t\t\treturn false;\n\n\t\t//------------------------------------------\n\t\t// embedded object properties equality check\n\t\t//------------------------------------------\n\t\tvar keys = Object.keys(x).concat(Object.keys(y)).removeDups();\n\t\tvar is = keys.every(function(i)\t\t\t\t\t//use is as debugger convenience\n\t\t{\n\t\t\treturn i in x && i in y && typeof(x[i]) == typeof(y[i]);\n\t\t})\n\t\tif (!is && !showDiff)\t\t\t\t\t\t\t//quit if keys do not match\n\t\t\treturn false;\n\n\t\t//if (EZ.test.debug('EZequals')) debugger;\n\t\tis = keys.every(function(key)\n\t\t{\n\t\t\twhile (x[key] instanceof Object)\t\t\t//for function or object properties . . .\n\t\t\t{\t\t\t\n\t\t\t\tif (x[key] == y[key]) return true;\t\t//same Object\n\t\t\t\t\n\t\t\t\tif (!showDiff && EZ.test.running != 'EZequals') \n\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t//skip repeat logic UNLESS TESTING\n\t\t\t\t//if (true) break;\n\n\t\t\t\tvar i = getObjectIdx('x', x[key]);\t\t//index of processed x Objects\n\t\t\t\tif (matchedObj.x[i].includes(y[key]))\n\t\t\t\t\treturn true;\t\t\t\t\t\t//...previously matched y[key]\n\t\t\t\tif (unmatchedObj.x[i].includes(y[key]))\n\t\t\t\t\treturn false;\t\t\t\t\t\t//...previously did NOT match y[key]\n\n\t\t\t\tvar j = getObjectIdx('y', y[key]);\t\t//index of processed y Objects\n\t\t\t\tif (matchedObj.y[j].includes(x[key]))\n\t\t\t\t\treturn true;\t\t\t\t\t\t//...previously matched x[key]\n\t\t\t\tif (unmatchedObj.y[j].includes(x[key]))\n\t\t\t\t\treturn false;\t\t\t\t\t\t//...previously did NOT match x[key]\n\n\t\t\t\tdotName.push(key);\n\t\t\t\tvar isEqual = isEqualObjects(x[key], y[key], depth+1);\n\t\t\t\tdotName.pop();\n\t\t\t\tif (isEqual)\n\t\t\t\t{\t\t\t\t\t\t\t\t\t\t//objects match -- remember for future\n\t\t\t\t\tmatchedObj.x[i].push(y[key]);\t\t\t\t\n\t\t\t\t\tmatchedObj.y[j].push(x[key]);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\t\t\t\t\t\t\t\t\t\t//remember NOT matched\n\t\t\t\t\tunmatchedObj.x[i].push(y[key]);\n\t\t\t\t\tunmatchedObj.y[j].push(x[key]);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tvar isEqual = isEqualObjects(x[key], y[key], depth+1);\n\t\t\tif (!isEqual && showDiff)\n\t\t\t{\n\t\t\t\tvar msg = 'x.' + key + ': ' + x[key] + '\\t\\ty.' + key + ': ' + y[key];\n\t\t\t\tconsole.log(msg);\n\t\t\t}\n\t\t\treturn isEqual;\n\t\t});\n\t\treturn is;\n\t}", "isObjectEqual(a, b) {\n return a && b && a.foo === b.foo;\n }", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n }", "function sameObject(a, b) {\n return a === b\n}", "function deepEqual(actual, expected) {\n // 7.1. All identical values are equivalent, as determined by ===.\n if (actual === expected) {\n return true;\n\n } else if (typeof Buffer !== \"undefined\" && Buffer.isBuffer(actual) && Buffer.isBuffer(expected)) {\n if (actual.length !== expected.length) {\n return false;\n }\n for (var i = 0; i < actual.length; i++) {\n if (actual[i] !== expected[i]) {\n return false;\n }\n }\n return true;\n\n // 7.2. If the expected value is a Date object, the actual value is\n // equivalent if it is also a Date object that refers to the same time.\n } else if (isDate(actual) && isDate(expected)) {\n return actual.getTime() === expected.getTime();\n\n // 7.3 If the expected value is a RegExp object, the actual value is\n // equivalent if it is also a RegExp object with the same source and\n // properties (`global`, `multiline`, `lastIndex`, `ignoreCase`).\n } else if (isRegExp(actual) && isRegExp(expected)) {\n return actual.source === expected.source &&\n actual.global === expected.global &&\n actual.multiline === expected.multiline &&\n actual.lastIndex === expected.lastIndex &&\n actual.ignoreCase === expected.ignoreCase;\n\n // 7.4. Other pairs that do not both pass typeof value == 'object',\n // equivalence is determined by ==.\n } else if (isString(actual) && isString(expected) && actual !== expected) {\n return false;\n } else if (typeof actual !== 'object' && typeof expected !== 'object') {\n return actual === expected;\n\n // 7.5 For all other Object pairs, including Array objects, equivalence is\n // determined by having the same number of owned properties (as verified\n // with Object.prototype.hasOwnProperty.call), the same set of keys\n // (although not necessarily the same order), equivalent values for every\n // corresponding key, and an identical 'prototype' property. Note: this\n // accounts for both named and indexed properties on Arrays.\n } else {\n return objEquiv(actual, expected);\n }\n }", "function looseEqual (a, b) {\r\n if (a === b) { return true }\r\n var isObjectA = isObject(a);\r\n var isObjectB = isObject(b);\r\n if (isObjectA && isObjectB) {\r\n try {\r\n var isArrayA = Array.isArray(a);\r\n var isArrayB = Array.isArray(b);\r\n if (isArrayA && isArrayB) {\r\n return a.length === b.length && a.every(function (e, i) {\r\n return looseEqual(e, b[i])\r\n })\r\n } else if (!isArrayA && !isArrayB) {\r\n var keysA = Object.keys(a);\r\n var keysB = Object.keys(b);\r\n return keysA.length === keysB.length && keysA.every(function (key) {\r\n return looseEqual(a[key], b[key])\r\n })\r\n } else {\r\n /* istanbul ignore next */\r\n return false\r\n }\r\n } catch (e) {\r\n /* istanbul ignore next */\r\n return false\r\n }\r\n } else if (!isObjectA && !isObjectB) {\r\n return String(a) === String(b)\r\n } else {\r\n return false\r\n }\r\n}", "function $i__NM$$fbjs$lib$shallowEqual__is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n // Added the nonzero y check to make Flow happy, but it is redundant\n return x !== 0 || y !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every((e, i) => {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(key => {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n\t if (a === b) { return true }\n\t var isObjectA = isObject(a);\n\t var isObjectB = isObject(b);\n\t if (isObjectA && isObjectB) {\n\t try {\n\t var isArrayA = Array.isArray(a);\n\t var isArrayB = Array.isArray(b);\n\t if (isArrayA && isArrayB) {\n\t return a.length === b.length && a.every(function (e, i) {\n\t return looseEqual(e, b[i])\n\t })\n\t } else if (!isArrayA && !isArrayB) {\n\t var keysA = Object.keys(a);\n\t var keysB = Object.keys(b);\n\t return keysA.length === keysB.length && keysA.every(function (key) {\n\t return looseEqual(a[key], b[key])\n\t })\n\t } else {\n\t /* istanbul ignore next */\n\t return false\n\t }\n\t } catch (e) {\n\t /* istanbul ignore next */\n\t return false\n\t }\n\t } else if (!isObjectA && !isObjectB) {\n\t return String(a) === String(b)\n\t } else {\n\t return false\n\t }\n\t}", "function looseEqual(a, b) {\n\t if (a === b) {\n\t return true;\n\t }\n\t var isObjectA = isObject(a);\n\t var isObjectB = isObject(b);\n\t if (isObjectA && isObjectB) {\n\t try {\n\t var isArrayA = Array.isArray(a);\n\t var isArrayB = Array.isArray(b);\n\t if (isArrayA && isArrayB) {\n\t return a.length === b.length && a.every(function (e, i) {\n\t return looseEqual(e, b[i]);\n\t });\n\t } else if (!isArrayA && !isArrayB) {\n\t var keysA = Object.keys(a);\n\t var keysB = Object.keys(b);\n\t return keysA.length === keysB.length && keysA.every(function (key) {\n\t return looseEqual(a[key], b[key]);\n\t });\n\t } else {\n\t /* istanbul ignore next */\n\t return false;\n\t }\n\t } catch (e) {\n\t /* istanbul ignore next */\n\t return false;\n\t }\n\t } else if (!isObjectA && !isObjectB) {\n\t return String(a) === String(b);\n\t } else {\n\t return false;\n\t }\n\t}", "function looseEqual(a, b) {\n if (a === b) {\n return true;\n }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i]);\n });\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key]);\n });\n } else {\n /* istanbul ignore next */\n return false;\n }\n } catch (e) {\n /* istanbul ignore next */\n return false;\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b);\n } else {\n return false;\n }\n }", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n }", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n }", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n }", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n }" ]
[ "0.8020216", "0.77488726", "0.73203313", "0.7272047", "0.7229446", "0.7223356", "0.7223356", "0.72070426", "0.72070426", "0.72070426", "0.72070426", "0.72070426", "0.719375", "0.7149837", "0.7149837", "0.7114921", "0.7092365", "0.7092365", "0.7092365", "0.7092365", "0.7092365", "0.7092365", "0.7092365", "0.7092365", "0.7092365", "0.7092365", "0.7092365", "0.7083642", "0.7083642", "0.7083642", "0.7068706", "0.70594364", "0.7053262", "0.6970433", "0.69626063", "0.69342697", "0.69341105", "0.6932661", "0.69239956", "0.6922765", "0.6909893", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6904786", "0.6903472", "0.690231", "0.68972915", "0.68891656", "0.68891656", "0.68891656", "0.68891656" ]
0.0
-1
Return the first index at which a loosely equal value can be found in the array (if value is a plain object, the array must contain an object of the same shape), or 1 if it is not present.
function looseIndexOf (arr, val) { for (var i = 0; i < arr.length; i++) { if (looseEqual(arr[i], val)) { return i } } return -1 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function looseIndexOf (arr, val) {\n for (var i = 0; i < arr.length; i++) {\n if (looseEqual(arr[i], val)) { return i }\n }\n return -1\n }", "function looseIndexOf(arr, val) {\n for (var i = 0; i < arr.length; i++) {\n if (looseEqual(arr[i]))\n return i;\n }\n return -1;\n }", "function looseIndexOf (arr, val) {\n for (var i = 0; i < arr.length; i++) {\n if (looseEqual(arr[i], val)) { return i }\n }\n return -1\n }", "function looseIndexOf (arr, val) {\n for (var i = 0; i < arr.length; i++) {\n if (looseEqual(arr[i], val)) { return i }\n }\n return -1\n }", "function looseIndexOf (arr, val) {\n for (var i = 0; i < arr.length; i++) {\n if (looseEqual(arr[i], val)) { return i }\n }\n return -1\n }", "function looseIndexOf (arr, val) {\n for (var i = 0; i < arr.length; i++) {\n if (looseEqual(arr[i], val)) { return i }\n }\n return -1\n }", "function looseIndexOf(arr, val) {\n for (var i = 0; i < arr.length; i++) {\n if (looseEqual(arr[i], val)) {\n return i\n }\n }\n return -1\n }", "function looseIndexOf(arr, val) {\n for (var i = 0; i < arr.length; i++) {\n if (looseEqual(arr[i], val)) {\n return i;\n }\n }\n\n return -1;\n }", "function looseIndexOf(arr, val) {\n for (var i = 0; i < arr.length; i++) {\n if (looseEqual(arr[i], val)) return i;\n }\n return -1;\n }", "function looseIndexOf(arr, val) {\n for (var i = 0; i < arr.length; i++) {\n if (looseEqual(arr[i], val)) return i;\n }\n\n return -1;\n}", "function looseIndexOf(arr, val) {\n for (var i = 0; i < arr.length; i++) {\n if (looseEqual(arr[i], val)) {\n return i;\n }\n }\n\n return -1;\n}", "function looseIndexOf(arr, val) {\n for (var i = 0; i < arr.length; i++) {\n if (looseEqual(arr[i], val)) {\n return i;\n }\n }\n\n return -1;\n}", "function looseIndexOf(arr, val) {\n for (var i = 0; i < arr.length; i++) {\n if (looseEqual(arr[i], val)) {\n return i;\n }\n }\n\n return -1;\n}", "function looseIndexOf(arr, val) {\n for (var i = 0; i < arr.length; i++) {\n if (looseEqual(arr[i], val)) {\n return i;\n }\n }\n\n return -1;\n}", "function arrFindIndex(arr, value){\n\tfor (var i=0; i<arr.length; i++){\n\t\tif (arr[i] == value)return i;\n\t}\n\treturn false;\n}", "function findIndex(array, value) {\n\n\tfor(var i = 0; i < array.length; i++) {\n\t\t\n\t\tvar index = Object.values(array[i]).indexOf(value);\n\t\t\n\t\tif(index > -1) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n}" ]
[ "0.7281383", "0.72737753", "0.7273547", "0.7273547", "0.7273547", "0.7273547", "0.7247776", "0.7226055", "0.72179335", "0.719063", "0.71881723", "0.71881723", "0.71881723", "0.71881723", "0.6862148", "0.6846513" ]
0.721711
72
Ensure a function is called only once.
function once (fn) { var called = false; return function () { if (!called) { called = true; fn.apply(this, arguments); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function once(fn){var called=false;return function(){var args=[],len=arguments.length;while(len--){args[len]=arguments[len];}if(called){return;}called=true;return fn.apply(this,args);};}", "function once(fn){var called=false;return function(){if(!called){called=true;fn.apply(this,arguments);}};}", "function once(fn){var called=false;return function(){if(!called){called=true;fn.apply(this,arguments);}};}", "function once(fn){var called=false;return function(){if(called){return;}called=true;return fn.apply(this,arguments);};}", "function once (fn) {\n var called = false;\n return function () {\n if (!called) {\n called = true;\n fn.apply(this, arguments);\n }\n }\n }", "function once (fn) {\r\n var called = false;\r\n return function () {\r\n if (!called) {\r\n called = true;\r\n fn.apply(this, arguments);\r\n }\r\n }\r\n}", "function once (fn) {\n\t var called = false;\n\t return function () {\n\t if (!called) {\n\t called = true;\n\t fn.apply(this, arguments);\n\t }\n\t }\n\t}", "function once (fn) {\n\t var called = false;\n\t return function () {\n\t if (!called) {\n\t called = true;\n\t fn.apply(this, arguments);\n\t }\n\t }\n\t}", "function once (fn) {\r\n var called = false;\r\n return function () {\r\n var args = [], len = arguments.length;\r\n while ( len-- ) args[ len ] = arguments[ len ];\r\n\r\n if (called) { return }\r\n called = true;\r\n return fn.apply(this, args)\r\n }\r\n}", "function once(fn) {\n var called = false;\n return function () {\n if (!called) {\n called = true;\n fn.apply(this, arguments);\n }\n };\n }", "function once(fn) {\n var called = false;\n return function () {\n if (!called) {\n called = true;\n fn.apply(this, arguments);\n }\n };\n }", "function once(fn) {\n var called = false;\n return function () {\n if (!called) {\n called = true;\n fn.apply(this, arguments);\n }\n };\n }", "function once(fn) {\n\t var called = false;\n\t return function () {\n\t if (!called) {\n\t called = true;\n\t fn.apply(this, arguments);\n\t }\n\t };\n\t}", "function once(fn) {\n\t var called = false;\n\t return function () {\n\t if (!called) {\n\t called = true;\n\t fn.apply(this, arguments);\n\t }\n\t };\n\t}", "function once (fn) {\n var called = false;\n return function () {\n if (!called) {\n called = true;\n fn.apply(this, arguments);\n }\n }\n }", "function once (fn) {\n var called = false;\n return function () {\n if (!called) {\n called = true;\n fn.apply(this, arguments);\n }\n }\n }", "function once (fn) {\n var called = false;\n return function () {\n if (!called) {\n called = true;\n fn.apply(this, arguments);\n }\n }\n }", "function once (fn) {\n var called = false;\n return function () {\n if (!called) {\n called = true;\n fn.apply(this, arguments);\n }\n }\n }" ]
[ "0.7813865", "0.7792654", "0.7792654", "0.77814144", "0.7509986", "0.74846625", "0.74533653", "0.74533653", "0.74333113", "0.7429154", "0.7429154", "0.7429154", "0.74233675", "0.74233675", "0.7406151", "0.7406151", "0.7406151", "0.7406151" ]
0.0
-1
Check if a string starts with $ or _
function isReserved (str) { var c = (str + '').charCodeAt(0); return c === 0x24 || c === 0x5F }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "startsWith(c){ return c=='_' || Character.isLetter(c) }", "function beginsWithCharacter(username){\n return /^[A-Za-z][A-Za-z0-9]*(?:_[A-Za-z0-9]+)*$/.test(username);\n}", "function starts_with(str, prefix) {\n\t\treturn str.lastIndexOf(prefix, 0) === 0;\n\t}", "function is_alphaDashUnderscore(str)\n{\n \n regexp = /[a-zA-Z_\\-]/;\n\n if (regexp.test(str))\n {\n alert(\"Correct Pattern\");\n }\n else\n {\n alert(\"Incorrect Pattern\");\n }\n}", "function isValid(idn) {\n return /^[a-zA-Z_$][0-9a-zA-Z$_]{0,}$/g.test(idn)\n }", "function strBeginsWith(str, prefix) {\n return str.indexOf(prefix) === 0;\n}", "_startWith (string, prefix) {\n if (typeof string != 'string') {\n return false;\n\n } else {\n for (var i = 0, length = prefix.length; i < length; i += 1) {\n var p = prefix[i];\n var s = string[i];\n if (p !== s) {\n return false;\n }\n }\n }\n return true;\n }", "function strStartsWith(str, prefix)\n{\n if(typeof str != \"string\")\n {\n return false;\n }\n return str.indexOf(prefix) === 0;\n}", "function fieldIs(strPre, field){\n return field.key.startsWith(strPre);\n }", "function s(e){// $ (dollar) and _ (underscore)\n// A..Z\n// a..z\n// \\ (backslash)\nreturn 36===e||95===e||e>=65&&90>=e||e>=97&&122>=e||92===e||e>=128&&ot.NonAsciiIdentifierStart.test(String.fromCharCode(e))}", "function check_string(input) {\r\n var re = new RegExp('[^a-zA-Z0-9-_]+');\r\n if (input.match(re)) { return false; }\r\n else { return true; }\r\n}", "function stringStartsWith(string, prefix) {\n return string.slice(0, prefix.length) == prefix;\n }", "function doesStringStartWith(s, prefix) {\r\n return s.substr(0, prefix.length) === prefix;\r\n}", "function doesStringStartWith(s, prefix) {\r\n return s.substr(0, prefix.length) === prefix;\r\n}", "function stringStartsWith(str, prefix) {\r\n // returns false for empty strings too\r\n if ((!str) || !prefix) return false;\r\n return str.indexOf(prefix, 0) === 0;\r\n }", "function doesStringStartWith(s, prefix) {\n return s.substr(0, prefix.length) === prefix;\n}", "startsWith(c) { return c=='\\\\' || c=='.' }", "function checkSingleName(fullname, lastname, letters){\r\n\tvar result = false;\r\n\tvar re = new RegExp('^'+letters);\r\n\r\n\r\n\tif(fullname.toLowerCase().match(re) != null || lastname.toLowerCase().match(re) != null){\r\n\t\t\tresult = true;\r\n\t\t\treturn result;\r\n\t}\r\n\r\n\treturn result;\r\n}", "function startsWith(str, pattern){\n\treturn str.lastIndexOf(pattern, 0) === 0\n}", "function isVar(substr){\n console.log(\"isVar\");\n return(/^[a-zA-Z]+$/.test(substr));\n}", "function startsWithS(str) { return str[0].toLowerCase() === 's'; }", "startsWith(c) { return c=='[' || c=='-' }", "function isVar(t) { return t[0] == '$'; }", "function isIdentifierStart(ch) {\n return (ch === '$') || (ch === '_') || (ch === '\\\\') ||\n (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') ||\n ((ch.charCodeAt(0) >= 0x80) && Regex.NonAsciiIdentifierStart.test(ch));\n }", "function isIdentifierStart(ch) {\n return (ch === '$') || (ch === '_') || (ch === '\\\\') ||\n (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') ||\n ((ch.charCodeAt(0) >= 0x80) && Regex.NonAsciiIdentifierStart.test(ch));\n }", "function isIdentifierStart(ch) {\n return (ch === '$') || (ch === '_') || (ch === '\\\\') ||\n (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') ||\n ((ch.charCodeAt(0) >= 0x80) && Regex.NonAsciiIdentifierStart.test(ch));\n }", "function isIdentifierStart(ch) {\n return (ch === '$') || (ch === '_') || (ch === '\\\\') ||\n (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') ||\n ((ch.charCodeAt(0) >= 0x80) && Regex.NonAsciiIdentifierStart.test(ch));\n }", "function isIdentifierStart(ch) {\n return (ch === '$') || (ch === '_') || (ch === '\\\\') ||\n (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') ||\n ((ch.charCodeAt(0) >= 0x80) && Regex.NonAsciiIdentifierStart.test(ch));\n }", "function a(e){// $ (dollar) and _ (underscore)\n// A..Z\n// a..z\n// \\ (backslash)\nreturn 36===e||95===e||e>=65&&90>=e||e>=97&&122>=e||92===e||e>=128&&l.NonAsciiIdentifierStart.test(String.fromCharCode(e))}", "function validarSoloLetra(string) {\r\n if (string.includes(\"#\") || string.includes(\"$\") || string.includes(\"´\"))\r\n {\r\n return true;\r\n }\r\n }", "function startswith (string, prefix)\n{\n\treturn string.indexOf(prefix) == 0;\n}", "_isValidPropertyName(str) {\n return /^(?![0-9])[a-zA-Z0-9$_]+$/.test(str);\n }", "function validarSoloLetra(string) {\r\n if (string.includes(\"#\") || string.includes(\"$\") || string.includes(\"´\"))\r\n {\r\n return true;\r\n\r\n }\r\n }", "function startsWith(str, prefix)\n{\n return (str.substr(0, prefix.length) == prefix);\n}", "function isCSSVariable$1(key) {\n return key.startsWith(\"--\");\n}", "function CodelandUsernameValidation(str) {\n // YOUR CODE HERE\n let pattern = \"/^w+$/\";\n if (str.length >= 4 || str.length <= 25)\n if (str[0] === \"/^w\")\n if (str === pattern)\n if (str[str.length - 1] !== \"_\") return true;\n else {return false;};\n}", "function variableName(str) {\n return !str.match(/^\\d|[\\W]/g)\n}", "function is_id_start(char) {\n return /[a-z_]/i.test(char);\n }", "startsWith(c){ return false }", "startsWith(c){ return false }", "function startsWith(input){\n\t\treturn new RegExp('^' + input, 'g');\n\t}", "function startsWith(str, prefix) {\n\t str = toString(str);\n\t prefix = toString(prefix);\n\n\t return str.indexOf(prefix) === 0;\n\t }", "function fileViewerStartsWith(str, prefix) {\n return str.indexOf(prefix) === 0;\n }", "strHasPrefix (str, prefix) {\n if (str && prefix && str.indexOf(prefix) === 0) {\n return true;\n }\n\n return false;\n }", "function pwCheck(pw) {\n\treturn pw.includes(\"!\") || pw.includes(\"#\") || pw.includes(\"$\");\n}", "function startsWith(str, pattern) {\n return str.slice(0, pattern.length) == pattern\n}", "function matchNonWordCharacter(e) {\n return (e.match(/^(?=.*[_\\W]).+$/) === null) ? true : false;\n }", "function startWith(str) {\n var j = 0, count = str.length;\n for (; j < count; j++) {\n if (tpl.charAt(i + j) !== str.charAt(j)) {\n return false;\n }\n }\n return true;\n }", "function strStartsWith ( input, match ) {\n\t\treturn input.substring(0, match.length) === match;\n\t}", "function strStartsWith ( input, match ) {\n\t\treturn input.substring(0, match.length) === match;\n\t}", "function strStartsWith(input, match) {\n return input.substring(0, match.length) === match;\n }", "function isCSSVariable(key) {\n return key.startsWith(\"--\");\n}", "function isCSSVariable(key) {\n return key.startsWith(\"--\");\n}", "function isCSSVariable(key) {\n return key.startsWith(\"--\");\n}", "function isCSSVariable(key) {\n return key.startsWith(\"--\");\n}", "function strStartsWith(input, match) {\n return input.substring(0, match.length) === match;\n }", "function strStartsWith ( input, match ) {\r\n\t\treturn input.substring(0, match.length) === match;\r\n\t}", "function strStartsWith ( input, match ) {\r\n\t\treturn input.substring(0, match.length) === match;\r\n\t}", "function startsWith(src, str) {\n return src.slice(0, str.length) === str\n }", "function checkName(name){\r\n\tif(/^[A-Za-z0-9]+(?:[ _-][A-Za-z0-9]+)*$/.test(name))\t\t\r\n\t\treturn true;\r\n\treturn false;\r\n}", "function checkName(name){\r\n\tif(/^[A-Za-z0-9]+(?:[ _-][A-Za-z0-9]+)*$/.test(name))\t\t\r\n\t\treturn true;\r\n\treturn false;\r\n}", "function isWordGuessed(substring) {\n\t\treturn arrayBlankWord.includes('_') === -1;\n\t}", "function prefixMatch(name, prefix) {\n if (name.length < prefix.length)\n return false;\n if (name.substr(0, prefix.length) != prefix)\n return false;\n if (name[prefix.length] && name[prefix.length] != '/')\n return false;\n return true;\n }", "function startsWith(src, str) {\n return src.slice(0, str.length) === str\n}", "function isIdentifierStart(ch) {\n return (ch === 36) || (ch === 95) || // $ (dollar) and _ (underscore)\n (ch >= 65 && ch <= 90) || // A..Z\n (ch >= 97 && ch <= 122); // a..z\n }", "function isIdentifierStart(ch) {\n return (ch === 36) || (ch === 95) || // $ (dollar) and _ (underscore)\n (ch >= 65 && ch <= 90) || // A..Z\n (ch >= 97 && ch <= 122); // a..z\n }", "function isIdentifierStart(ch) {\n return (ch === 36) || (ch === 95) || // $ (dollar) and _ (underscore)\n (ch >= 65 && ch <= 90) || // A..Z\n (ch >= 97 && ch <= 122); // a..z\n }", "function beginsWith(string, char) {\n // YOUR CODE BELOW HERE //\n \n // A bracket notation can be used to access the characters in a string using its numerical index. Indexes start with the number zero.\n // Using .toLowerCase() will mute the case sensistivity in the given strings index as well as the given character.\n // Strict evaluation using a the comparison operator (===) will determine if the input string begins with the input character.\n return string[0].toLowerCase() === char.toLowerCase(); // When the beginsWith function is called it will evaluate to true or false.\n\n // YOUR CODE ABOVE HERE //\n}", "function imageNameCheck(string)\n {\n //http://stackoverflow.com/questions/336210/regular-expression-for-alphanumeric-and-underscores\n var res = string.match(/^[a-z0-9._ -]+$/i);\n if(res==null)\n {\n swal(\"Oops...\", \"Only English alphabet, numbers, space, '.', '-' and '_' is allowed for image/video name\", \"error\");\n return false;\n }\n else\n return true;\n }", "startsWith(c) { return this.white.test(c) }", "function strStartsWith(input, match) {\n return input.substring(0, match.length) === match;\n }", "function CheckUserName(userName){\r\n\tvar userNameRegEx = new RegExp(/^[a-z\\d](?:[a-z\\d]|-(?=[a-z\\d])){0,38}$/i);\r\n\treturn userNameRegEx.test(userName);\t\r\n}", "function usernameValidation(str) {\n const letters = /[A-Za-z]/g, regExp = /[A-Za-z0-9_]/g, regExp_ = /[^_]/g;\n if (4 < str.length < 25 && letters.test(str[0]) && regExp.test(str) && regExp_.test(str[str.length - 1]))\n return true;\n else return false\n}", "function letterCheck(str, letter) { return str.includes(letter) }", "function isStrInWord(string, word) {\n if (word.startsWith(string) == true) {\n console.log(true);\n } else {\n console.log(false);\n }\n}", "checkLetter(letter, phrase){\r\n let letterMatchFilter = new RegExp(letter)\r\n let matched = letterMatchFilter.test(phrase)\r\n return matched\r\n }", "checkLetter(letter) { \n const phrase = this.phrase.toLowerCase();\n return phrase.includes(letter) ? true : false;\n }", "function isAlpha(c){\r\n return /^\\w$/.test(c) && /^\\D$/.test(c);\r\n}", "function isIdentifierStart(ch) {\n\t return (ch === 0x24) || (ch === 0x5F) || // $ (dollar) and _ (underscore)\n\t (ch >= 0x41 && ch <= 0x5A) || // A..Z\n\t (ch >= 0x61 && ch <= 0x7A) || // a..z\n\t (ch === 0x5C) || // \\ (backslash)\n\t ((ch >= 0x80) && Regex.NonAsciiIdentifierStart.test(String.fromCharCode(ch)));\n\t }", "function isIdentifierStart(ch) {\n return (ch === 0x24) || (ch === 0x5F) || // $ (dollar) and _ (underscore)\n (ch >= 0x41 && ch <= 0x5A) || // A..Z\n (ch >= 0x61 && ch <= 0x7A) || // a..z\n (ch === 0x5C) || // \\ (backslash)\n ((ch >= 0x80) && Regex.NonAsciiIdentifierStart.test(String.fromCharCode(ch)));\n }", "function isIdentifierStart(ch) {\n return (ch === 0x24) || (ch === 0x5F) || // $ (dollar) and _ (underscore)\n (ch >= 0x41 && ch <= 0x5A) || // A..Z\n (ch >= 0x61 && ch <= 0x7A) || // a..z\n (ch === 0x5C) || // \\ (backslash)\n ((ch >= 0x80) && Regex.NonAsciiIdentifierStart.test(String.fromCharCode(ch)));\n }", "checkLetter(letterToCheck) {\n if(this.phrase.split(\"\").includes(letterToCheck)) {\n return true;\n }\n else {\n return false;\n }\n }", "function isIdentifierStart(ch) {\n return (ch === 0x24) || (ch === 0x5F) || // $ (dollar) and _ (underscore)\n (ch >= 0x41 && ch <= 0x5A) || // A..Z\n (ch >= 0x61 && ch <= 0x7A) || // a..z\n (ch === 0x5C) || // \\ (backslash)\n ((ch >= 0x80) && RegexNonAsciiIdentifierStart.test(String.fromCharCode(ch)));\n }", "function StartsWith(str, prefix) {\n\treturn str && String(str).startsWith(prefix);\n}", "function startsWith(ch)\n{\n return this.indexOf(ch) == 0;\n}", "function isDirective(str) {\n\tvar alpha = /^[a-zA-Z-]+$/;\n\tif (str.match(alpha)) {\n\t\treturn true;\n\t}\t\n\treturn false;\n}", "function firstUpperChar(str) {\n let regex = /^[A-Z]/;\n if (regex.test(str)) {\n console.log(true);\n } else {\n console.log(false);\n }\n}", "function startsWith(input, value) {}", "function startsWith(str, test) {\n if (str === test) {\n return true;\n }\n return str.substring(0, test.length + 1) === test + '.';\n}", "function verifyStr(str){\n var regExp = /^[0-9A-Za-z_]$/;\t\n//\tvar regExp = /^[3-9A-NP-Za-hj-km-np-y_]$/;\t\t\t// Not included 0, 1, 2, i, l, o, z, O, Z - and only underscore as special char\n//\t\n\n // if(str != null && str != \"\"){\t// Check if empty\n\t\tfor(var i = 0; i < str.length; i++){ // check each char in string\n\t\t\tif (!str.charAt(i).match(regExp) ){\t// check if char match expression\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t//} else {\n\t//\treturn false;\n\t//}\n return true;\n}", "isWhere(field) {\n return isString(field) && field.startsWith('_$_');\n }", "startsWith(c) { return c=='t' || c=='f' || c=='n' }", "function isIdentifierStart(ch) {\n return (ch === 0x24) || (ch === 0x5F) || // $ (dollar) and _ (underscore)\n (ch >= 0x41 && ch <= 0x5A) || // A..Z\n (ch >= 0x61 && ch <= 0x7A) || // a..z\n (ch === 0x5C) || // \\ (backslash)\n ((ch >= 0x80) && RegexNonAsciiIdentifierStart.test(String.fromCharCode(ch)));\n}", "function isIdentifierStart(ch) {\n return (ch === 0x24) || (ch === 0x5F) || // $ (dollar) and _ (underscore)\n (ch >= 0x41 && ch <= 0x5A) || // A..Z\n (ch >= 0x61 && ch <= 0x7A) || // a..z\n (ch === 0x5C) || // \\ (backslash)\n ((ch >= 0x80) && RegexNonAsciiIdentifierStart.test(String.fromCharCode(ch)));\n}", "function startsWithLowercase (str)\n {\n return str.charAt(0).toUpperCase() !== str.charAt(0);\n }", "function checkWords(letter) {\n let regex = /^[a-z]{1}$/;\n let bon = regex.test(letter);\n if (!bon) {\n return false;\n } else if (bon) {\n return true;\n }\n}", "function isIdentifierStart(ch)\n\t\t{\n\t\t\treturn (ch === 0x24) || (ch === 0x5F) || // $ (dollar) and _ (underscore)\n\t\t\t\t((ch >= 0x41) && (ch <= 0x5A)) || // A..Z\n\t\t\t\t((ch >= 0x61) && (ch <= 0x7A)) || // a..z\n\t\t\t\t(ch === 0x5C) || // \\ (backslash)\n\t\t\t\t((ch >= 0x80) && Regex.NonAsciiIdentifierStart.test(String.fromCharCode(ch)));\n\t\t}", "function isAlphaNum(c){\r\n return /^\\w$/.test(c);\r\n}", "function isIdentifierStart(ch) {\n return (ch === 36) || (ch === 95) || // $ (dollar) and _ (underscore)\n (ch >= 65 && ch <= 90) || // A..Z\n (ch >= 97 && ch <= 122) || // a..z\n (ch === 92) || // \\ (backslash)\n ((ch >= 0x80) && Regex.NonAsciiIdentifierStart.test(String.fromCharCode(ch)));\n }", "function isIdentifierStart(ch) {\n return (ch === 0x24) || (ch === 0x5F) || // $ (dollar) and _ (underscore)\n (ch >= 0x41 && ch <= 0x5A) || // A..Z\n (ch >= 0x61 && ch <= 0x7A) || // a..z\n (ch === 0x5C) || // \\ (backslash)\n ((ch >= 0x80) && Regex.NonAsciiIdentifierStart.test(String.fromCharCode(ch)));\n }", "function isIdentifierStart(ch) {\n return (ch === 0x24) || (ch === 0x5F) || // $ (dollar) and _ (underscore)\n (ch >= 0x41 && ch <= 0x5A) || // A..Z\n (ch >= 0x61 && ch <= 0x7A) || // a..z\n (ch === 0x5C) || // \\ (backslash)\n ((ch >= 0x80) && Regex.NonAsciiIdentifierStart.test(String.fromCharCode(ch)));\n }" ]
[ "0.6809397", "0.64830947", "0.6418743", "0.63947165", "0.6364793", "0.6174454", "0.61610985", "0.6136182", "0.61189294", "0.6094362", "0.6089015", "0.6088359", "0.60722625", "0.60722625", "0.6068401", "0.60577387", "0.60526854", "0.60371375", "0.6011135", "0.59893996", "0.59815145", "0.59688395", "0.5929182", "0.5909703", "0.5909703", "0.5909703", "0.5909703", "0.5909703", "0.59027195", "0.59006375", "0.58874863", "0.58796316", "0.5870149", "0.58688235", "0.58566487", "0.5849349", "0.5844127", "0.5844024", "0.5838052", "0.5838052", "0.58368987", "0.58075297", "0.5806069", "0.5805914", "0.5805514", "0.5752848", "0.57488376", "0.5725097", "0.5719976", "0.5719976", "0.57126766", "0.5694883", "0.5694883", "0.5694883", "0.5694883", "0.56932026", "0.56890464", "0.56890464", "0.56867623", "0.5671461", "0.5671461", "0.56421876", "0.5638696", "0.5633984", "0.56245124", "0.56245124", "0.56245124", "0.56206524", "0.5614698", "0.56076974", "0.559792", "0.5590707", "0.55751926", "0.5564948", "0.5563609", "0.55541366", "0.5553094", "0.55395055", "0.55291235", "0.55282855", "0.55282855", "0.5527695", "0.5526094", "0.5510235", "0.5508122", "0.55066985", "0.55037916", "0.5497066", "0.5489375", "0.5478593", "0.54722273", "0.5469917", "0.5465604", "0.5465604", "0.54647726", "0.54598147", "0.5457652", "0.54564637", "0.54550827", "0.5454557", "0.5454557" ]
0.0
-1
optimized shallow clone used for static nodes and slot nodes because they may be reused across multiple renders, cloning them avoids errors when DOM manipulations rely on their elm reference.
function cloneVNode (vnode) { var cloned = new VNode( vnode.tag, vnode.data, // #7975 // clone children array to avoid mutating original in case of cloning // a child. vnode.children && vnode.children.slice(), vnode.text, vnode.elm, vnode.context, vnode.componentOptions, vnode.asyncFactory ); cloned.ns = vnode.ns; cloned.isStatic = vnode.isStatic; cloned.key = vnode.key; cloned.isComment = vnode.isComment; cloned.fnContext = vnode.fnContext; cloned.fnOptions = vnode.fnOptions; cloned.fnScopeId = vnode.fnScopeId; cloned.asyncMeta = vnode.asyncMeta; cloned.isCloned = true; return cloned }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cloneVNode(vnode,deep){var componentOptions=vnode.componentOptions;var cloned=new VNode(vnode.tag,vnode.data,vnode.children,vnode.text,vnode.elm,vnode.context,componentOptions,vnode.asyncFactory);cloned.ns=vnode.ns;cloned.isStatic=vnode.isStatic;cloned.key=vnode.key;cloned.isComment=vnode.isComment;cloned.isCloned=true;if(deep){if(vnode.children){cloned.children=cloneVNodes(vnode.children,true);}if(componentOptions&&componentOptions.children){componentOptions.children=cloneVNodes(componentOptions.children,true);}}return cloned;}", "function cloneVNode(vnode,deep){var componentOptions=vnode.componentOptions;var cloned=new VNode(vnode.tag,vnode.data,vnode.children,vnode.text,vnode.elm,vnode.context,componentOptions,vnode.asyncFactory);cloned.ns=vnode.ns;cloned.isStatic=vnode.isStatic;cloned.key=vnode.key;cloned.isComment=vnode.isComment;cloned.fnContext=vnode.fnContext;cloned.fnOptions=vnode.fnOptions;cloned.fnScopeId=vnode.fnScopeId;cloned.isCloned=true;if(deep){if(vnode.children){cloned.children=cloneVNodes(vnode.children,true);}if(componentOptions&&componentOptions.children){componentOptions.children=cloneVNodes(componentOptions.children,true);}}return cloned;}", "function cloneVNode(vnode){var cloned=new VNode(vnode.tag,vnode.data,vnode.children,vnode.text,vnode.elm,vnode.context,vnode.componentOptions);cloned.ns=vnode.ns;cloned.isStatic=vnode.isStatic;cloned.key=vnode.key;cloned.isCloned=true;return cloned;}", "function cloneVNode(vnode, deep) {\n var componentOptions = vnode.componentOptions;\n var cloned = new VNode(vnode.tag, vnode.data, vnode.children, vnode.text, vnode.elm, vnode.context, componentOptions, vnode.asyncFactory);\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n if (deep) {\n if (vnode.children) {\n cloned.children = cloneVNodes(vnode.children, true);\n }\n if (componentOptions && componentOptions.children) {\n componentOptions.children = cloneVNodes(componentOptions.children, true);\n }\n }\n return cloned;\n }", "function cloneVNode(vnode, deep) {\n var componentOptions = vnode.componentOptions;\n var cloned = new VNode(vnode.tag, vnode.data, vnode.children, vnode.text, vnode.elm, vnode.context, componentOptions, vnode.asyncFactory);\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n if (deep) {\n if (vnode.children) {\n cloned.children = cloneVNodes(vnode.children, true);\n }\n if (componentOptions && componentOptions.children) {\n componentOptions.children = cloneVNodes(componentOptions.children, true);\n }\n }\n return cloned;\n}", "function cloneVNode(vnode, deep) {\n var componentOptions = vnode.componentOptions;\n var cloned = new VNode(vnode.tag, vnode.data, vnode.children, vnode.text, vnode.elm, vnode.context, componentOptions, vnode.asyncFactory);\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n if (deep) {\n if (vnode.children) {\n cloned.children = cloneVNodes(vnode.children, true);\n }\n if (componentOptions && componentOptions.children) {\n componentOptions.children = cloneVNodes(componentOptions.children, true);\n }\n }\n return cloned;\n}", "function cloneVNode(vnode, deep) {\n var componentOptions = vnode.componentOptions;\n var cloned = new VNode(vnode.tag, vnode.data, vnode.children, vnode.text, vnode.elm, vnode.context, componentOptions, vnode.asyncFactory);\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n if (deep) {\n if (vnode.children) {\n cloned.children = cloneVNodes(vnode.children, true);\n }\n if (componentOptions && componentOptions.children) {\n componentOptions.children = cloneVNodes(componentOptions.children, true);\n }\n }\n return cloned;\n}", "function deepCloneVNode(vnode) {\r\n const cloned = cloneVNode(vnode);\r\n if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(vnode.children)) {\r\n cloned.children = vnode.children.map(deepCloneVNode);\r\n }\r\n return cloned;\r\n}", "function deepCloneVNode(vnode) {\r\n const cloned = cloneVNode(vnode);\r\n if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(vnode.children)) {\r\n cloned.children = vnode.children.map(deepCloneVNode);\r\n }\r\n return cloned;\r\n}", "static cloneNode(el) {\r\n const node = el.cloneNode(true);\r\n node.removeAttribute('id');\r\n return node;\r\n }", "function cloneVNode(vnode, deep) {\n var componentOptions = vnode.componentOptions;\n var cloned = new VNode(vnode.tag, vnode.data, vnode.children, vnode.text, vnode.elm, vnode.context, componentOptions, vnode.asyncFactory);\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.isCloned = true;\n if (deep) {\n if (vnode.children) {\n cloned.children = cloneVNodes(vnode.children, true);\n }\n if (componentOptions && componentOptions.children) {\n componentOptions.children = cloneVNodes(componentOptions.children, true);\n }\n }\n return cloned;\n}", "function deepCloneVNode(vnode) {\n const cloned = cloneVNode(vnode);\n if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(vnode.children)) {\n cloned.children = vnode.children.map(deepCloneVNode);\n }\n return cloned;\n}", "function deepCloneVNode(vnode) {\n const cloned = cloneVNode(vnode);\n if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(vnode.children)) {\n cloned.children = vnode.children.map(deepCloneVNode);\n }\n return cloned;\n}", "function deepCloneVNode(vnode) {\n const cloned = cloneVNode(vnode);\n if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(vnode.children)) {\n cloned.children = vnode.children.map(deepCloneVNode);\n }\n return cloned;\n}", "function deepCloneVNode(vnode) {\n const cloned = cloneVNode(vnode);\n if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(vnode.children)) {\n cloned.children = vnode.children.map(deepCloneVNode);\n }\n return cloned;\n}", "function deepCloneVNode(vnode) {\n const cloned = cloneVNode(vnode);\n if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(vnode.children)) {\n cloned.children = vnode.children.map(deepCloneVNode);\n }\n return cloned;\n}", "clone() { \n\t let clone = new DiamondNode\n\t return clone\n\t}", "function cloneVNode(vnode, deep) {\n var cloned = new VNode(vnode.tag, vnode.data, vnode.children, vnode.text, vnode.elm, vnode.context, vnode.componentOptions, vnode.asyncFactory);\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.isCloned = true;\n if (deep && vnode.children) {\n cloned.children = cloneVNodes(vnode.children);\n }\n return cloned;\n}", "function cloneVNode (vnode, deep) {\n var componentOptions = vnode.componentOptions;\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n if (deep) {\n if (vnode.children) {\n cloned.children = cloneVNodes(vnode.children, true);\n }\n if (componentOptions && componentOptions.children) {\n componentOptions.children = cloneVNodes(componentOptions.children, true);\n }\n }\n return cloned\n}", "function cloneVNode (vnode, deep) {\n var componentOptions = vnode.componentOptions;\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n if (deep) {\n if (vnode.children) {\n cloned.children = cloneVNodes(vnode.children, true);\n }\n if (componentOptions && componentOptions.children) {\n componentOptions.children = cloneVNodes(componentOptions.children, true);\n }\n }\n return cloned\n}", "function cloneVNode (vnode, deep) {\n var componentOptions = vnode.componentOptions;\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n if (deep) {\n if (vnode.children) {\n cloned.children = cloneVNodes(vnode.children, true);\n }\n if (componentOptions && componentOptions.children) {\n componentOptions.children = cloneVNodes(componentOptions.children, true);\n }\n }\n return cloned\n}", "function cloneVNode (vnode, deep) {\n var componentOptions = vnode.componentOptions;\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n if (deep) {\n if (vnode.children) {\n cloned.children = cloneVNodes(vnode.children, true);\n }\n if (componentOptions && componentOptions.children) {\n componentOptions.children = cloneVNodes(componentOptions.children, true);\n }\n }\n return cloned\n}", "function cloneVNode (vnode, deep) {\n var componentOptions = vnode.componentOptions;\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n if (deep) {\n if (vnode.children) {\n cloned.children = cloneVNodes(vnode.children, true);\n }\n if (componentOptions && componentOptions.children) {\n componentOptions.children = cloneVNodes(componentOptions.children, true);\n }\n }\n return cloned\n}", "function cloneVNode (vnode, deep) {\n var componentOptions = vnode.componentOptions;\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n if (deep) {\n if (vnode.children) {\n cloned.children = cloneVNodes(vnode.children, true);\n }\n if (componentOptions && componentOptions.children) {\n componentOptions.children = cloneVNodes(componentOptions.children, true);\n }\n }\n return cloned\n}", "function cloneVNode (vnode, deep) {\n var componentOptions = vnode.componentOptions;\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n if (deep) {\n if (vnode.children) {\n cloned.children = cloneVNodes(vnode.children, true);\n }\n if (componentOptions && componentOptions.children) {\n componentOptions.children = cloneVNodes(componentOptions.children, true);\n }\n }\n return cloned\n}", "function deepCloneVNode(vnode) {\n const cloned = cloneVNode(vnode);\n if (_shared.isArray(vnode.children)) cloned.children = vnode.children.map(deepCloneVNode);\n return cloned;\n}", "function cloneVNode (vnode, deep) {\n var componentOptions = vnode.componentOptions;\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.isCloned = true;\n if (deep) {\n if (vnode.children) {\n cloned.children = cloneVNodes(vnode.children, true);\n }\n if (componentOptions && componentOptions.children) {\n componentOptions.children = cloneVNodes(componentOptions.children, true);\n }\n }\n return cloned\n}", "function cloneVNode(vnode) {\n var cloned = new VNode(vnode.tag, vnode.data, \n // #7975\n // clone children array to avoid mutating original in case of cloning\n // a child.\n vnode.children && vnode.children.slice(), vnode.text, vnode.elm, vnode.context, vnode.componentOptions, vnode.asyncFactory);\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.asyncMeta = vnode.asyncMeta;\n cloned.isCloned = true;\n return cloned;\n }", "function cloneVNode(vnode) {\n var cloned = new VNode(vnode.tag, vnode.data, // #7975\n // clone children array to avoid mutating original in case of cloning\n // a child.\n vnode.children && vnode.children.slice(), vnode.text, vnode.elm, vnode.context, vnode.componentOptions, vnode.asyncFactory);\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.asyncMeta = vnode.asyncMeta;\n cloned.isCloned = true;\n return cloned;\n }", "function cloneVNode (vnode, deep) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.isCloned = true;\n if (deep && vnode.children) {\n cloned.children = cloneVNodes(vnode.children);\n }\n return cloned\n}", "function cloneVNode (vnode, deep) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.isCloned = true;\n if (deep && vnode.children) {\n cloned.children = cloneVNodes(vnode.children);\n }\n return cloned\n}", "function cloneVNode (vnode, deep) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.isCloned = true;\n if (deep && vnode.children) {\n cloned.children = cloneVNodes(vnode.children);\n }\n return cloned\n}", "function cloneVNode (vnode, deep) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.isCloned = true;\n if (deep && vnode.children) {\n cloned.children = cloneVNodes(vnode.children);\n }\n return cloned\n}", "function cloneVNode (vnode, deep) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.isCloned = true;\n if (deep && vnode.children) {\n cloned.children = cloneVNodes(vnode.children);\n }\n return cloned\n}", "function cloneVNode (vnode, deep) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.isCloned = true;\n if (deep && vnode.children) {\n cloned.children = cloneVNodes(vnode.children);\n }\n return cloned\n}", "function cloneVNode (vnode, deep) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.isCloned = true;\n if (deep && vnode.children) {\n cloned.children = cloneVNodes(vnode.children);\n }\n return cloned\n}", "function cloneVNode (vnode, deep) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.isCloned = true;\n if (deep && vnode.children) {\n cloned.children = cloneVNodes(vnode.children);\n }\n return cloned\n}", "clone() { \n\t let clone = new CircleNode()\n\t return clone\n\t}", "function cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n // #7975\n // clone children array to avoid mutating original in case of cloning\n // a child.\n vnode.children && vnode.children.slice(),\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.asyncMeta = vnode.asyncMeta;\n cloned.isCloned = true;\n return cloned\n }", "function cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n // #7975\n // clone children array to avoid mutating original in case of cloning\n // a child.\n vnode.children && vnode.children.slice(),\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.asyncMeta = vnode.asyncMeta;\n cloned.isCloned = true;\n return cloned\n }", "function cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n // #7975\n // clone children array to avoid mutating original in case of cloning\n // a child.\n vnode.children && vnode.children.slice(),\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.asyncMeta = vnode.asyncMeta;\n cloned.isCloned = true;\n return cloned\n }", "function cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n // #7975\n // clone children array to avoid mutating original in case of cloning\n // a child.\n vnode.children && vnode.children.slice(),\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.asyncMeta = vnode.asyncMeta;\n cloned.isCloned = true;\n return cloned\n }", "function cloneVNode(vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n // #7975\n // clone children array to avoid mutating original in case of cloning\n // a child.\n vnode.children && vnode.children.slice(),\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory,\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.asyncMeta = vnode.asyncMeta;\n cloned.isCloned = true;\n return cloned;\n }", "function deepCloneVNode(vnode) {\n const cloned = cloneVNode(vnode);\n if (isArray(vnode.children)) {\n cloned.children = vnode.children.map(deepCloneVNode);\n }\n return cloned;\n}", "clone() { return new node(this.v, this.hi, this.lo); }", "function cloneVNode (vnode) {\n\t var cloned = new VNode(\n\t vnode.tag,\n\t vnode.data,\n\t vnode.children,\n\t vnode.text,\n\t vnode.elm,\n\t vnode.context,\n\t vnode.componentOptions,\n\t vnode.asyncFactory\n\t );\n\t cloned.ns = vnode.ns;\n\t cloned.isStatic = vnode.isStatic;\n\t cloned.key = vnode.key;\n\t cloned.isComment = vnode.isComment;\n\t cloned.fnContext = vnode.fnContext;\n\t cloned.fnOptions = vnode.fnOptions;\n\t cloned.fnScopeId = vnode.fnScopeId;\n\t cloned.isCloned = true;\n\t return cloned\n\t}", "function cloneVNode(vnode) {\n\t var cloned = new VNode(vnode.tag, vnode.data, vnode.children, vnode.text, vnode.elm, vnode.context, vnode.componentOptions);\n\t cloned.ns = vnode.ns;\n\t cloned.isStatic = vnode.isStatic;\n\t cloned.key = vnode.key;\n\t cloned.isCloned = true;\n\t return cloned;\n\t}", "function cloneVNode(vnode) {\n\t var cloned = new VNode(vnode.tag, vnode.data, vnode.children, vnode.text, vnode.elm, vnode.context, vnode.componentOptions, vnode.asyncFactory);\n\t cloned.ns = vnode.ns;\n\t cloned.isStatic = vnode.isStatic;\n\t cloned.key = vnode.key;\n\t cloned.isComment = vnode.isComment;\n\t cloned.isCloned = true;\n\t return cloned;\n\t}", "function cloneVNode(vnode) {\n\t var cloned = new VNode(vnode.tag, vnode.data, vnode.children, vnode.text, vnode.elm, vnode.context, vnode.componentOptions, vnode.asyncFactory);\n\t cloned.ns = vnode.ns;\n\t cloned.isStatic = vnode.isStatic;\n\t cloned.key = vnode.key;\n\t cloned.isComment = vnode.isComment;\n\t cloned.isCloned = true;\n\t return cloned;\n\t}", "function cloneVNode (vnode) {\n\t var cloned = new VNode(\n\t vnode.tag,\n\t vnode.data,\n\t vnode.children,\n\t vnode.text,\n\t vnode.elm,\n\t vnode.ns,\n\t vnode.context,\n\t vnode.componentOptions\n\t )\n\t cloned.isStatic = vnode.isStatic\n\t cloned.key = vnode.key\n\t cloned.isCloned = true\n\t return cloned\n\t}", "function cloneVNode (vnode) {\n\t var cloned = new VNode(\n\t vnode.tag,\n\t vnode.data,\n\t vnode.children,\n\t vnode.text,\n\t vnode.elm,\n\t vnode.ns,\n\t vnode.context,\n\t vnode.componentOptions\n\t );\n\t cloned.isStatic = vnode.isStatic;\n\t cloned.key = vnode.key;\n\t cloned.isCloned = true;\n\t return cloned\n\t}", "function cloneVNode (vnode) {\n\t var cloned = new VNode(\n\t vnode.tag,\n\t vnode.data,\n\t vnode.children,\n\t vnode.text,\n\t vnode.elm,\n\t vnode.ns,\n\t vnode.context,\n\t vnode.componentOptions\n\t );\n\t cloned.isStatic = vnode.isStatic;\n\t cloned.key = vnode.key;\n\t cloned.isCloned = true;\n\t return cloned\n\t}", "function cloneVNode (vnode) {\n\t var cloned = new VNode(\n\t vnode.tag,\n\t vnode.data,\n\t vnode.children,\n\t vnode.text,\n\t vnode.elm,\n\t vnode.context,\n\t vnode.componentOptions\n\t );\n\t cloned.ns = vnode.ns;\n\t cloned.isStatic = vnode.isStatic;\n\t cloned.key = vnode.key;\n\t cloned.isCloned = true;\n\t return cloned\n\t}", "function cloneVNode (vnode) {\n\t var cloned = new VNode(\n\t vnode.tag,\n\t vnode.data,\n\t vnode.children,\n\t vnode.text,\n\t vnode.elm,\n\t vnode.context,\n\t vnode.componentOptions\n\t );\n\t cloned.ns = vnode.ns;\n\t cloned.isStatic = vnode.isStatic;\n\t cloned.key = vnode.key;\n\t cloned.isCloned = true;\n\t return cloned\n\t}", "function cloneVNode (vnode) {\n\t var cloned = new VNode(\n\t vnode.tag,\n\t vnode.data,\n\t vnode.children,\n\t vnode.text,\n\t vnode.elm,\n\t vnode.context,\n\t vnode.componentOptions\n\t );\n\t cloned.ns = vnode.ns;\n\t cloned.isStatic = vnode.isStatic;\n\t cloned.key = vnode.key;\n\t cloned.isCloned = true;\n\t return cloned\n\t}", "function cloneVNode (vnode) {\n\t var cloned = new VNode(\n\t vnode.tag,\n\t vnode.data,\n\t vnode.children,\n\t vnode.text,\n\t vnode.elm,\n\t vnode.context,\n\t vnode.componentOptions\n\t );\n\t cloned.ns = vnode.ns;\n\t cloned.isStatic = vnode.isStatic;\n\t cloned.key = vnode.key;\n\t cloned.isCloned = true;\n\t return cloned\n\t}", "clone() {\n // this class should not be cloned since it wraps\n // around a given object. The calling function should check\n // whether the wrapped object is null and supply a new object\n // (from the clone).\n return this.nodes = null;\n }", "function cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n // #7975\n // clone children array to avoid mutating original in case of cloning\n // a child.\n vnode.children && vnode.children.slice(),\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.asyncMeta = vnode.asyncMeta;\n cloned.isCloned = true;\n return cloned\n }", "function cloneVNode (vnode) {\n\t var cloned = new VNode(\n\t vnode.tag,\n\t vnode.data,\n\t vnode.children,\n\t vnode.text,\n\t vnode.elm,\n\t vnode.context,\n\t vnode.componentOptions\n\t );\n\t cloned.ns = vnode.ns;\n\t cloned.isStatic = vnode.isStatic;\n\t cloned.key = vnode.key;\n\t cloned.isComment = vnode.isComment;\n\t cloned.isCloned = true;\n\t return cloned\n\t}", "function cloneVNode(vnode) {\n var cloned = new VNode(vnode.tag, vnode.data, // #7975\n // clone children array to avoid mutating original in case of cloning\n // a child.\n vnode.children && vnode.children.slice(), vnode.text, vnode.elm, vnode.context, vnode.componentOptions, vnode.asyncFactory);\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.asyncMeta = vnode.asyncMeta;\n cloned.isCloned = true;\n return cloned;\n}", "function cloneVNode(vnode) {\n var cloned = new VNode(vnode.tag, vnode.data, // #7975\n // clone children array to avoid mutating original in case of cloning\n // a child.\n vnode.children && vnode.children.slice(), vnode.text, vnode.elm, vnode.context, vnode.componentOptions, vnode.asyncFactory);\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.asyncMeta = vnode.asyncMeta;\n cloned.isCloned = true;\n return cloned;\n}", "function cloneVNode(vnode) {\n var cloned = new VNode(vnode.tag, vnode.data, // #7975\n // clone children array to avoid mutating original in case of cloning\n // a child.\n vnode.children && vnode.children.slice(), vnode.text, vnode.elm, vnode.context, vnode.componentOptions, vnode.asyncFactory);\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.asyncMeta = vnode.asyncMeta;\n cloned.isCloned = true;\n return cloned;\n}", "function cloneVNode(vnode) {\n var cloned = new VNode(vnode.tag, vnode.data, // #7975\n // clone children array to avoid mutating original in case of cloning\n // a child.\n vnode.children && vnode.children.slice(), vnode.text, vnode.elm, vnode.context, vnode.componentOptions, vnode.asyncFactory);\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.asyncMeta = vnode.asyncMeta;\n cloned.isCloned = true;\n return cloned;\n}", "function cloneVNode(vnode) {\n var cloned = new VNode(vnode.tag, vnode.data, // #7975\n // clone children array to avoid mutating original in case of cloning\n // a child.\n vnode.children && vnode.children.slice(), vnode.text, vnode.elm, vnode.context, vnode.componentOptions, vnode.asyncFactory);\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.asyncMeta = vnode.asyncMeta;\n cloned.isCloned = true;\n return cloned;\n}", "_clone(options) {\n var _a2;\n const { el: { content }, parts } = this._$template;\n const fragment = ((_a2 = options === null || options === void 0 ? void 0 : options.creationScope) !== null && _a2 !== void 0 ? _a2 : d).importNode(content, true);\n walker.currentNode = fragment;\n let node = walker.nextNode();\n let nodeIndex = 0;\n let partIndex = 0;\n let templatePart = parts[0];\n while (templatePart !== void 0) {\n if (nodeIndex === templatePart.index) {\n let part;\n if (templatePart.type === CHILD_PART) {\n part = new ChildPart(node, node.nextSibling, this, options);\n } else if (templatePart.type === ATTRIBUTE_PART) {\n part = new templatePart.ctor(node, templatePart.name, templatePart.strings, this, options);\n } else if (templatePart.type === ELEMENT_PART) {\n part = new ElementPart(node, this, options);\n }\n this._$parts.push(part);\n templatePart = parts[++partIndex];\n }\n if (nodeIndex !== (templatePart === null || templatePart === void 0 ? void 0 : templatePart.index)) {\n node = walker.nextNode();\n nodeIndex++;\n }\n }\n walker.currentNode = d;\n return fragment;\n }", "function cloneVNode(vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n return cloned\n }", "function cloneVNode (vnode) {\r\n var cloned = new VNode(\r\n vnode.tag,\r\n vnode.data,\r\n vnode.children,\r\n vnode.text,\r\n vnode.elm,\r\n vnode.context,\r\n vnode.componentOptions,\r\n vnode.asyncFactory\r\n );\r\n cloned.ns = vnode.ns;\r\n cloned.isStatic = vnode.isStatic;\r\n cloned.key = vnode.key;\r\n cloned.isComment = vnode.isComment;\r\n cloned.fnContext = vnode.fnContext;\r\n cloned.fnOptions = vnode.fnOptions;\r\n cloned.fnScopeId = vnode.fnScopeId;\r\n cloned.isCloned = true;\r\n return cloned\r\n}", "function cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n return cloned\n}", "function cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n return cloned\n}", "function cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n return cloned\n}", "function cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n return cloned\n}", "function cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n return cloned\n}", "function cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n return cloned\n}", "function cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n return cloned\n}", "function cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n return cloned\n}", "function cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n return cloned\n}", "function cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n return cloned\n}", "function cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n return cloned\n}", "function cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n return cloned\n}", "function cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n return cloned\n}", "function cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n return cloned\n}", "function cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n return cloned\n}", "function cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n return cloned\n}", "function cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n return cloned\n}", "function cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n return cloned\n}", "function cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n return cloned\n}", "function cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n return cloned\n}", "function cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n return cloned\n}", "function cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n return cloned\n}", "function cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n return cloned\n}", "function cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n return cloned\n}", "function cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n return cloned\n}", "function cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n return cloned\n}", "function cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n return cloned\n}", "function cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n return cloned\n}", "function cloneVNode(vnode) {\n var cloned = new VNode(vnode.tag, vnode.data, vnode.children, vnode.text, vnode.elm, vnode.context, vnode.componentOptions, vnode.asyncFactory);\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n return cloned;\n}", "function cloneVNode(vnode) {\n var cloned = new VNode(vnode.tag, vnode.data, vnode.children, vnode.text, vnode.elm, vnode.context, vnode.componentOptions, vnode.asyncFactory);\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n return cloned;\n}", "function cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.isCloned = true;\n return cloned\n}", "function cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.isCloned = true;\n return cloned\n}", "function cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.isCloned = true;\n return cloned\n}", "function cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.isCloned = true;\n return cloned\n}" ]
[ "0.7215416", "0.7215016", "0.72046924", "0.6923098", "0.6819354", "0.6819354", "0.6819354", "0.68118244", "0.68118244", "0.67948467", "0.6790519", "0.67770493", "0.67770493", "0.67770493", "0.67770493", "0.67770493", "0.6744016", "0.673486", "0.67249876", "0.67249876", "0.67249876", "0.67249876", "0.67249876", "0.67249876", "0.67249876", "0.67164356", "0.67033225", "0.67002064", "0.6694447", "0.66735494", "0.66735494", "0.66735494", "0.66735494", "0.66735494", "0.66735494", "0.66735494", "0.66735494", "0.66371894", "0.66337895", "0.66337895", "0.66337895", "0.66337895", "0.6625551", "0.6616757", "0.6611254", "0.6603469", "0.65980124", "0.65951717", "0.65951717", "0.6591011", "0.6581987", "0.6581987", "0.65800726", "0.65800726", "0.65800726", "0.65800726", "0.65726537", "0.657254", "0.6554197", "0.6546979", "0.6546979", "0.6546979", "0.6546979", "0.6546979", "0.654121", "0.65365064", "0.65345275", "0.65303797", "0.65303797", "0.65303797", "0.65303797", "0.65303797", "0.65303797", "0.65303797", "0.65303797", "0.65303797", "0.65303797", "0.65303797", "0.65303797", "0.65303797", "0.65303797", "0.65303797", "0.65303797", "0.65303797", "0.65303797", "0.65303797", "0.65303797", "0.65303797", "0.65303797", "0.65303797", "0.65303797", "0.65303797", "0.65303797", "0.65303797", "0.65303797", "0.6528388", "0.6528388", "0.65099084", "0.65099084", "0.65099084", "0.65099084" ]
0.0
-1
helpers Augment a target Object or Array by intercepting the prototype chain using __proto__
function protoAugment (target, src) { /* eslint-disable no-proto */ target.__proto__ = src; /* eslint-enable no-proto */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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\t /* eslint-disable no-proto */\n\t target.__proto__ = src;\n\t /* eslint-enable no-proto */\n\t}", "function protoAugment (target, src) {\n\t /* eslint-disable no-proto */\n\t target.__proto__ = src;\n\t /* eslint-enable no-proto */\n\t}", "function protoAugment (target, src) {\n\t /* eslint-disable no-proto */\n\t target.__proto__ = src;\n\t /* eslint-enable no-proto */\n\t}", "function protoAugment (target, src) {\n\t /* eslint-disable no-proto */\n\t target.__proto__ = src;\n\t /* eslint-enable no-proto */\n\t}", "function protoAugment (target, src) {\n\t /* eslint-disable no-proto */\n\t target.__proto__ = src;\n\t /* eslint-enable no-proto */\n\t}", "function protoAugment (target, src) {\n\t /* eslint-disable no-proto */\n\t target.__proto__ = src;\n\t /* eslint-enable no-proto */\n\t}", "function protoAugment (target, src) {\n\t /* eslint-disable no-proto */\n\t target.__proto__ = src;\n\t /* eslint-enable no-proto */\n\t}", "function protoAugment (target, src) {\n\t /* eslint-disable no-proto */\n\t target.__proto__ = src;\n\t /* eslint-enable no-proto */\n\t}", "function protoAugment(target, src) {\n\t\t /* eslint-disable no-proto */\n\t\t target.__proto__ = src;\n\t\t /* eslint-enable no-proto */\n\t\t}", "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,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 */}", "function protoAugment(target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n }", "function protoAugment (target, src) {\n\t /* eslint-disable no-proto */\n\t target.__proto__ = src\n\t /* eslint-enable no-proto */\n\t}", "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.76513964", "0.7578844", "0.75163007", "0.75073874", "0.75073874", "0.75073874", "0.75073874", "0.75073874", "0.75073874", "0.75073874", "0.750716", "0.75059545", "0.75059545", "0.75001055", "0.75001055", "0.75001055", "0.75001055", "0.74970436", "0.74963814", "0.74963814", "0.7494107", "0.7487837", "0.7470523", "0.7470523", "0.7470523", "0.7470523", "0.7470523", "0.7470523" ]
0.0
-1
Augment a target Object or Array by defining hidden properties. / istanbul ignore next
function copyAugment (target, src, keys) { for (var i = 0, l = keys.length; i < l; i++) { var key = keys[i]; def(target, key, src[key]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function borderLayoutvue_type_script_lang_js_objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n borderLayoutvue_type_script_lang_js_defineProperty(target, key, source[key]);\n });\n }\n\n return target;\n}", "function extend(target) {\n var objs = Array.prototype.slice.call(arguments, 1);\n objs.forEach(function (obj) {\n var props = Object.getOwnPropertyNames(obj);\n props.forEach(function (key) {\n target[key] = obj[key];\n });\n });\n return target;\n }", "extend(target, source) {\n return Object.getOwnPropertyNames(source)\n .reduce((t, v) => {\n t[v] = source[v];\n return t;\n }, target);\n }", "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 */}", "function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { format_defineProperty(target, key, source[key]); }); } return target; }", "function protoAugment (target, src, keys) {\r\n /* eslint-disable no-proto */\r\n target.__proto__ = src;\r\n /* eslint-enable no-proto */\r\n}", "function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { entry_defineProperty(target, key, source[key]); }); } return target; }", "function extendWithNew(target, obj) {\r\n properties(obj).forEach( function(prop) {\r\n if (target[prop]===undefined) target[prop] = obj[prop];\r\n });\r\n}", "function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }", "function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }", "function setHiddenProp(target, prop, value) {\n if (!Object.hasOwnProperty.call(target, prop)) {\n Object.defineProperty(target, prop, {\n enumerable: false,\n configurable: true,\n writable: true,\n value: value\n });\n } else {\n target[prop] = value;\n }\n}", "function setHiddenProp(target, prop, value) {\n if (!Object.hasOwnProperty.call(target, prop)) {\n Object.defineProperty(target, prop, {\n enumerable: false,\n configurable: true,\n writable: true,\n value: value\n });\n } else {\n target[prop] = value;\n }\n}", "function setHiddenProp(target, prop, value) {\n if (!Object.hasOwnProperty.call(target, prop)) {\n Object.defineProperty(target, prop, {\n enumerable: false,\n configurable: true,\n writable: true,\n value: value\n });\n } else {\n target[prop] = value;\n }\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment(target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n }", "function deepMixIn(target, objects) {\n\t var i = 0,\n\t n = arguments.length,\n\t obj;\n\n\t while(++i < n){\n\t obj = arguments[i];\n\t if (obj) {\n\t forOwn(obj, copyProp, target);\n\t }\n\t }\n\n\t return target;\n\t }", "function protoAugment(target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment(target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment(target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment(target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment(target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment(target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment(target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment(target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "static iextend(obj) {\n // eslint-disable-next-line prefer-rest-params\n each(slice.call(arguments, 1), function (source) {\n for (let prop in source) {\n if ({}.hasOwnProperty.call(source, prop)) {\n obj[prop] = source[prop];\n }\n }\n });\n return obj;\n }", "function protoAugment(target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n }", "function softCopyProperties(source, target) {\n _Object__WEBPACK_IMPORTED_MODULE_6__[\"each\"](source, function (key, value) {\n // only if value is set\n if (_utils_Type__WEBPACK_IMPORTED_MODULE_3__[\"hasValue\"](value) && !(_utils_Type__WEBPACK_IMPORTED_MODULE_3__[\"hasValue\"](target[key]))) {\n target[key] = value;\n }\n });\n return target;\n}", "function extend(target, obj) {\n var i,\n toStr = Object.prototype.toString,\n aStr = \"[object Array]\";\n\n target = target || {};\n\n for (i in obj) {\n if (obj.hasOwnProperty(i)) {\n if (typeof obj[i] === \"object\") {\n target[i] = (toStr.call(obj[i]) === aStr) ? [] : {};\n extend(obj[i], target[i]);\n } else {\n target[i] = obj[i];\n }\n }\n }\n\n return target;\n }", "function forward(obj, target, onlyAccessors) {\n onlyAccessors = onlyAccessors || false;\n for (var k in target) {\n (function(k) {\n if (typeof(target[k]) == 'function') {\n if (!onlyAccessors) {\n obj[k] = target[k].bind(target);\n }\n } else {\n Object.defineProperty(obj, k, {\n get: function() { return target[k]; },\n set: function(x) { target[k] = x; }\n });\n }\n })(k);\n }\n}", "function protoAugment (target, src, keys) {\n\t /* eslint-disable no-proto */\n\t target.__proto__ = src;\n\t /* eslint-enable no-proto */\n\t}", "function extend(target, source, noOverwrite, filter) {\r\n if (noOverwrite === void 0) { noOverwrite = false; }\r\n if (filter === void 0) { filter = function () { return true; }; }\r\n if (!objectDefinedNotNull(source)) {\r\n return target;\r\n }\r\n // ensure we don't overwrite things we don't want overwritten\r\n var check = noOverwrite ? function (o, i) { return !(i in o); } : function () { return true; };\r\n // final filter we will use\r\n var f = function (v) { return check(target, v) && filter(v); };\r\n return Object.getOwnPropertyNames(source)\r\n .filter(f)\r\n .reduce(function (t, v) {\r\n t[v] = source[v];\r\n return t;\r\n }, target);\r\n}", "function mixin (target, ...sources){\n Object.assign(target, ...sources); //... here is the spread operator. ie to spread array element got from rest operator\n\n}", "function protoAugment(target, src, keys) {\n\t /* eslint-disable no-proto */\n\t target.__proto__ = src;\n\t /* eslint-enable no-proto */\n\t}", "function protoAugment(target, src, keys) {\n\t /* eslint-disable no-proto */\n\t target.__proto__ = src;\n\t /* eslint-enable no-proto */\n\t}", "function extend (target, source) {\n for(prop in source) {\n target[prop] = source[prop];\n }\n return target;\n }", "function extend(target, obj) {\r\n properties(obj).forEach( function(prop) {\r\n target[prop] = obj[prop];\r\n });\r\n}", "function deepMixIn(target, objects) {\n var i = 0,\n n = arguments.length,\n obj;\n\n while(++i < n){\n obj = arguments[i];\n if (obj) {\n forOwn(obj, copyProp, target);\n }\n }\n\n return target;\n }", "function deepMixIn(target, objects) {\n var i = 0,\n n = arguments.length,\n obj;\n\n while(++i < n){\n obj = arguments[i];\n if (obj) {\n forOwn(obj, copyProp, target);\n }\n }\n\n return target;\n }", "function Extend(target, source){\r\n if((target) && (source) && (typeof source == 'object')) {\r\n for(var property in source) {\r\n if (source.hasOwnProperty(property)) {\r\n try { target[property] = source[property]; } catch (exception) { ; }\r\n }\r\n }\r\n }\r\n return target;\r\n}", "function deepExtend(target, source) {\n if (!(source instanceof Object)) {\n return source;\n }\n switch (source.constructor) {\n case Date:\n return new Date(source.getTime());\n // Treat Dates like scalars; if the target date object had any child\n // properties - they will be lost!\n\n case Object:\n if (target === undefined) {\n target = {};\n }\n break;\n case Array:\n // Always copy the array source and overwrite the target.\n target = [];\n break;\n default:\n // Not a plain Object - treat it as a scalar.\n return source;\n }\n for (var prop in source) {\n if (!source.hasOwnProperty(prop)) {\n continue;\n }\n target[prop] = deepExtend(target[prop], source[prop]);\n }\n return target;\n}", "function deepExtend(target, source) {\n if (!(source instanceof Object)) {\n return source;\n }\n switch (source.constructor) {\n case Date:\n return new Date(source.getTime());\n // Treat Dates like scalars; if the target date object had any child\n // properties - they will be lost!\n\n case Object:\n if (target === undefined) {\n target = {};\n }\n break;\n case Array:\n // Always copy the array source and overwrite the target.\n target = [];\n break;\n default:\n // Not a plain Object - treat it as a scalar.\n return source;\n }\n for (var prop in source) {\n if (!source.hasOwnProperty(prop)) {\n continue;\n }\n target[prop] = deepExtend(target[prop], source[prop]);\n }\n return target;\n}", "function safeMixin(target, source){\n\t\tvar name, t, i = 0, l = d._extraNames.length;\n\t\t// add props adding metadata for incoming functions skipping a constructor\n\t\tfor(name in source){\n\t\t\tt = source[name];\n\t\t\tif((t !== op[name] || !(name in op)) && name != cname){\n\t\t\t\tif(opts.call(t) == \"[object Function]\"){\n\t\t\t\t\t// non-trivial function method => attach its name\n\t\t\t\t\tt.nom = name;\n\t\t\t\t}\n\t\t\t\ttarget[name] = t;\n\t\t\t}\n\t\t}\n\t\t// process unenumerable methods on IE\n\t\tfor(; i < l; ++i){\n\t\t\tname = d._extraNames[i];\n\t\t\tt = source[name];\n\t\t\tif((t !== op[name] || !(name in op)) && name != cname){\n\t\t\t\tif(opts.call(t) == \"[object Function]\"){\n\t\t\t\t\t// non-trivial function method => attach its name\n\t\t\t\t\tt.nom = name;\n\t\t\t\t}\n\t\t\t\ttarget[name] = t;\n\t\t\t}\n\t\t}\n\t\treturn target;\n\t}", "function copyAugment(target: Object, src: Object, keys: Array < string > ) {\n for (let i = 0, l = keys.length; i < l; i++) {\n const key = keys[i]\n def(target, key, src[key])\n }\n}", "function extend(target, obj) {\n properties(obj).forEach( function(prop) {\n target[prop] = obj[prop];\n });\n}", "function extend(target, source, args) {\n var exclude = {};\n \n if (args && args.exclude) {\n for (var i = 0; i < args.exclude.length; ++i) {\n exclude[args.exclude[i]] = true;\n }\n }\n\n for (var prop in source) {\n if (!args || !exclude.hasOwnProperty(prop)) {\n target[prop] = source[prop];\n }\n }\n\n return target;\n }", "function deepExtend(target, source) {\n if (!(source instanceof Object)) {\n return source;\n }\n\n switch (source.constructor) {\n case Date:\n // Treat Dates like scalars; if the target date object had any child\n // properties - they will be lost!\n var dateValue = source;\n return new Date(dateValue.getTime());\n\n case Object:\n if (target === undefined) {\n target = {};\n }\n\n break;\n\n case Array:\n // Always copy the array source and overwrite the target.\n target = [];\n break;\n\n default:\n // Not a plain Object - treat it as a scalar.\n return source;\n }\n\n for (var prop in source) {\n if (!source.hasOwnProperty(prop)) {\n continue;\n }\n\n target[prop] = deepExtend(target[prop], source[prop]);\n }\n\n return target;\n} // TODO: Really needed (for JSCompiler type checking)?", "function extendRemove(target, props) {\n\t$.extend(target, props);\n\tfor (var name in props)\n\t\tif (props[name] == null || props[name] == undefined)\n\t\t\ttarget[name] = props[name];\n\treturn target;\n}", "function extendRemove(target, props) {\n\t$.extend(target, props);\n\tfor (var name in props)\n\t\tif (props[name] == null || props[name] == undefined)\n\t\t\ttarget[name] = props[name];\n\treturn target;\n}", "function extendRemove(target, props) {\n\t$.extend(target, props);\n\tfor (var name in props)\n\t\tif (props[name] == null || props[name] == undefined)\n\t\t\ttarget[name] = props[name];\n\treturn target;\n}", "function extendRemove(target, props) {\n\t$.extend(target, props);\n\tfor (var name in props)\n\t\tif (props[name] == null || props[name] == undefined)\n\t\t\ttarget[name] = props[name];\n\treturn target;\n}" ]
[ "0.62766355", "0.6051237", "0.58810043", "0.5739268", "0.5739268", "0.56967473", "0.5693495", "0.5693272", "0.56831604", "0.56805646", "0.56805646", "0.5673533", "0.5673533", "0.5673533", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5594563", "0.558806", "0.55827916", "0.55827916", "0.55827916", "0.55827916", "0.55827916", "0.55827916", "0.55827916", "0.55827916", "0.557881", "0.55776286", "0.5570627", "0.5568114", "0.555783", "0.5530629", "0.55168015", "0.55114436", "0.5505871", "0.5505871", "0.5504956", "0.54914904", "0.5481547", "0.5481547", "0.5477366", "0.54742867", "0.54742867", "0.54717886", "0.5466937", "0.5465258", "0.5463405", "0.5446209", "0.54434556", "0.54434556", "0.54434556", "0.54434556" ]
0.0
-1
Attempt to create an observer instance for a value, returns the new observer if successfully observed, or the existing observer if the value already has one.
function observe (value, asRootData) { if (!isObject(value) || value instanceof VNode) { return } var ob; if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) { ob = value.__ob__; } else if ( shouldObserve && !isServerRendering() && (Array.isArray(value) || isPlainObject(value)) && Object.isExtensible(value) && !value._isVue ) { ob = new Observer(value); } if (asRootData && ob) { ob.vmCount++; } return ob }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function observer(value) {\n let ob = null;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (Array.isArray(value) || isObject(value)) {\n ob = new Observer(value);\n }\n return ob;\n }", "function observe(value) {\n if (!isObject(value)) {\n return;\n }\n var ob = void 0;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (observerState.shouldConvert && !config._isServer && (Array.isArray(value) || isPlainObject(value)) && Object.isExtensible(value) && !value._isVue) {\n ob = new Observer(value);\n }\n return ob;\n}", "function observe (value) {\n if (!isObject(value)) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !config._isServer &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n return ob\n}", "function observe(value) {\n\t\t if (!isObject(value)) {\n\t\t return;\n\t\t }\n\t\t var ob = void 0;\n\t\t if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n\t\t ob = value.__ob__;\n\t\t } else if (observerState.shouldConvert && !config._isServer && (Array.isArray(value) || isPlainObject(value)) && Object.isExtensible(value) && !value._isVue) {\n\t\t ob = new Observer(value);\n\t\t }\n\t\t return ob;\n\t\t}", "function observe (value) {\n if (!isObject(value)) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n return ob\n}", "function observe (value) {\n\t if (!isObject(value)) {\n\t return\n\t }\n\t var ob;\n\t if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n\t ob = value.__ob__;\n\t } else if (\n\t observerState.shouldConvert &&\n\t !config._isServer &&\n\t (Array.isArray(value) || isPlainObject(value)) &&\n\t Object.isExtensible(value) &&\n\t !value._isVue\n\t ) {\n\t ob = new Observer(value);\n\t }\n\t return ob\n\t}", "function observe (value) {\n\t if (!isObject(value)) {\n\t return\n\t }\n\t var ob;\n\t if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n\t ob = value.__ob__;\n\t } else if (\n\t observerState.shouldConvert &&\n\t !config._isServer &&\n\t (Array.isArray(value) || isPlainObject(value)) &&\n\t Object.isExtensible(value) &&\n\t !value._isVue\n\t ) {\n\t ob = new Observer(value);\n\t }\n\t return ob\n\t}", "function observe (value) {\n\t if (!isObject(value)) {\n\t return\n\t }\n\t var ob\n\t if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n\t ob = value.__ob__\n\t } else if (\n\t observerState.shouldConvert &&\n\t !config._isServer &&\n\t (Array.isArray(value) || isPlainObject(value)) &&\n\t Object.isExtensible(value) &&\n\t !value._isVue\n\t ) {\n\t ob = new Observer(value)\n\t }\n\t return ob\n\t}", "function _create_observable(id, value) {\n //console.log(\"Creating observable ['\" + id + \"'], value: \" + value)\n var observable = ko.observable(value);\n _synced.observables[id] = observable;\n observable.subscribe(function(newValue) {\n _push_change(id, newValue);\n }, null, {avoid: ['server']});\n return observable;\n}", "function Observer(value) {\n this.value = value;\n this.dep = new Dep();\n this.vmCount = 0;\n def(value, '__ob__', this);\n if (Array.isArray(value)) {\n var augment = hasProto ? protoAugment : copyAugment;\n augment(value, arrayMethods, arrayKeys);\n this.observeArray(value);\n } else {\n this.walk(value);\n }\n }", "function observe (value, asRootData) {\n if (!isObject(value)) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}", "function observe (value, asRootData) {\n if (!isObject(value)) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}", "function observe (value, asRootData) {\n if (!isObject(value)) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}", "function observe (value, asRootData) {\n if (!isObject(value)) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}", "function observe (value, asRootData) {\n if (!isObject(value)) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}", "function observe (value, asRootData) {\n if (!isObject(value)) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}", "function observe (value, asRootData) {\n if (!isObject(value)) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}", "function observe (value, asRootData) {\n if (!isObject(value)) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}", "function observe (value, asRootData) {\n if (!isObject(value)) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}", "function observe (value, asRootData) {\n if (!isObject(value)) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}", "function observe (value, asRootData) {\n if (!isObject(value)) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}", "function observe (value, asRootData) {\n if (!isObject(value)) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}", "function observe (value, asRootData) {\n if (!isObject(value)) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}", "function observe (value, asRootData) {\n if (!isObject(value)) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}", "function observe (value, asRootData) {\n if (!isObject(value)) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}", "function observe (value, asRootData) {\n if (!isObject(value)) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}", "function observe (value, asRootData) {\n if (!isObject(value)) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}", "function observe (value, asRootData) {\n if (!isObject(value)) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}", "function observe (value, asRootData) {\n if (!isObject(value)) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}", "function observe (value, asRootData) {\n if (!isObject(value)) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}", "function observe (value, asRootData) {\n if (!isObject(value)) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}", "function observe (value, asRootData) {\n if (!isObject(value)) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}", "function observe (value, asRootData) {\n if (!isObject(value)) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}", "function Observer(value) {\n\t\t this.value = value;\n\t\t this.dep = new Dep();\n\t\t this.vmCount = 0;\n\t\t def(value, '__ob__', this);\n\t\t if (Array.isArray(value)) {\n\t\t var augment = hasProto ? protoAugment : copyAugment;\n\t\t augment(value, arrayMethods, arrayKeys);\n\t\t this.observeArray(value);\n\t\t } else {\n\t\t this.walk(value);\n\t\t }\n\t\t }", "function observe (value, asRootData) {\n\t if (!isObject(value)) {\n\t return\n\t }\n\t var ob;\n\t if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n\t ob = value.__ob__;\n\t } else if (\n\t observerState.shouldConvert &&\n\t !isServerRendering() &&\n\t (Array.isArray(value) || isPlainObject(value)) &&\n\t Object.isExtensible(value) &&\n\t !value._isVue\n\t ) {\n\t ob = new Observer(value);\n\t }\n\t if (asRootData && ob) {\n\t ob.vmCount++;\n\t }\n\t return ob\n\t}", "function observe (value, asRootData) {\n\t if (!isObject(value)) {\n\t return\n\t }\n\t var ob;\n\t if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n\t ob = value.__ob__;\n\t } else if (\n\t observerState.shouldConvert &&\n\t !isServerRendering() &&\n\t (Array.isArray(value) || isPlainObject(value)) &&\n\t Object.isExtensible(value) &&\n\t !value._isVue\n\t ) {\n\t ob = new Observer(value);\n\t }\n\t if (asRootData && ob) {\n\t ob.vmCount++;\n\t }\n\t return ob\n\t}", "function observe (value, asRootData) {\n\t if (!isObject(value)) {\n\t return\n\t }\n\t var ob;\n\t if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n\t ob = value.__ob__;\n\t } else if (\n\t observerState.shouldConvert &&\n\t !isServerRendering() &&\n\t (Array.isArray(value) || isPlainObject(value)) &&\n\t Object.isExtensible(value) &&\n\t !value._isVue\n\t ) {\n\t ob = new Observer(value);\n\t }\n\t if (asRootData && ob) {\n\t ob.vmCount++;\n\t }\n\t return ob\n\t}", "function observe (value, asRootData) {\n\t if (!isObject(value)) {\n\t return\n\t }\n\t var ob;\n\t if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n\t ob = value.__ob__;\n\t } else if (\n\t observerState.shouldConvert &&\n\t !isServerRendering() &&\n\t (Array.isArray(value) || isPlainObject(value)) &&\n\t Object.isExtensible(value) &&\n\t !value._isVue\n\t ) {\n\t ob = new Observer(value);\n\t }\n\t if (asRootData && ob) {\n\t ob.vmCount++;\n\t }\n\t return ob\n\t}", "function observe (value, asRootData) {\n\t if (!isObject(value)) {\n\t return\n\t }\n\t var ob;\n\t if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n\t ob = value.__ob__;\n\t } else if (\n\t observerState.shouldConvert &&\n\t !isServerRendering() &&\n\t (Array.isArray(value) || isPlainObject(value)) &&\n\t Object.isExtensible(value) &&\n\t !value._isVue\n\t ) {\n\t ob = new Observer(value);\n\t }\n\t if (asRootData && ob) {\n\t ob.vmCount++;\n\t }\n\t return ob\n\t}", "function observe(value, asRootData) {\n if (!isObject(value)) {\n return;\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (observerState.shouldConvert && !isServerRendering() && (Array.isArray(value) || isPlainObject(value)) && Object.isExtensible(value) && !value._isVue) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob;\n}", "function observe(value, asRootData) {\n if (!isObject(value)) {\n return;\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (observerState.shouldConvert && !isServerRendering() && (Array.isArray(value) || isPlainObject(value)) && Object.isExtensible(value) && !value._isVue) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob;\n}", "function observe (value, asRootData, key) {\n if (!isObject(value)) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value, key);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}", "function observe(value, asRootData) {\n\t if (!isObject(value)) {\n\t return;\n\t }\n\t var ob;\n\t if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n\t ob = value.__ob__;\n\t } else if (observerState.shouldConvert && !isServerRendering() && (Array.isArray(value) || isPlainObject(value)) && Object.isExtensible(value) && !value._isVue) {\n\t ob = new Observer(value);\n\t }\n\t if (asRootData && ob) {\n\t ob.vmCount++;\n\t }\n\t return ob;\n\t}", "function observe(value, asRootData) {\n\t if (!isObject(value)) {\n\t return;\n\t }\n\t var ob;\n\t if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n\t ob = value.__ob__;\n\t } else if (observerState.shouldConvert && !isServerRendering() && (Array.isArray(value) || isPlainObject(value)) && Object.isExtensible(value) && !value._isVue) {\n\t ob = new Observer(value);\n\t }\n\t if (asRootData && ob) {\n\t ob.vmCount++;\n\t }\n\t return ob;\n\t}", "function observe(value, asRootData) {\n\t if (!isObject(value)) {\n\t return;\n\t }\n\t var ob;\n\t if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n\t ob = value.__ob__;\n\t } else if (observerState.shouldConvert && !isServerRendering() && (Array.isArray(value) || isPlainObject(value)) && Object.isExtensible(value) && !value._isVue) {\n\t ob = new Observer(value);\n\t }\n\t if (asRootData && ob) {\n\t ob.vmCount++;\n\t }\n\t return ob;\n\t}", "function observe(value, asRootData) {\n if (!isObject(value)) {\n // fixme || value instanceof VNode\n return;\n }\n var ob = void 0;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n // observerState.shouldConvert &&\n (Array.isArray(value) || isPlainObject(value)) && Object.isExtensible(value)) {\n ob = new Observer(value);\n }\n\n // fixme\n // if (asRootData && ob) {\n // ob.vmCount++\n // }\n\n return ob;\n}", "function observe (value, asRootData) {\n if (!isObject(value) || value instanceof VNode) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n shouldObserve &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n }", "function observe (value, asRootData) {\n if (!isObject(value) || value instanceof VNode) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n shouldObserve &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n }", "function observe (value, asRootData) {\n if (!isObject(value) || value instanceof VNode) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n shouldObserve &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n }", "function observe (value, asRootData) {\n if (!isObject(value) || value instanceof VNode) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n shouldObserve &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n }", "function observe (value, asRootData) {\n if (!isObject(value) || value instanceof VNode) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n shouldObserve &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n }", "function observe(value, asRootData) {\n if (!isObject(value) || value instanceof VNode) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n shouldObserve &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n }", "function observe(value, asRootData) {\n if (!isObject(value) || value instanceof VNode) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n shouldObserve &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n }", "function observe (value, asRootData) {\n if (!isObject(value) || value instanceof VNode) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}", "function observe (value, asRootData) {\n if (!isObject(value) || value instanceof VNode) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}", "function observe (value, asRootData) {\n if (!isObject(value) || value instanceof VNode) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}", "function observe (value, asRootData) {\n if (!isObject(value) || value instanceof VNode) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}", "function observe (value, asRootData) {\n if (!isObject(value) || value instanceof VNode) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}", "function observe (value, asRootData) {\n if (!isObject(value) || value instanceof VNode) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}", "function observe (value, asRootData) {\n if (!isObject(value) || value instanceof VNode) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}", "function observe (value, asRootData) {\n if (!isObject(value) || value instanceof VNode) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}", "function observe (value, asRootData) {\n if (!isObject(value) || value instanceof VNode) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}", "function observe (value, asRootData) {\n if (!isObject(value) || value instanceof VNode) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}", "function observe (value, asRootData) {\n if (!isObject(value) || value instanceof VNode) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}", "function observe (value, asRootData) {\n if (!isObject(value) || value instanceof VNode) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}", "function observe (value, asRootData) {\n if (!isObject(value) || value instanceof VNode) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}", "function observe (value, asRootData) {\n if (!isObject(value) || value instanceof VNode) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n observerState.shouldConvert &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}", "function observe(value, asRootData) {\n if (!isObject(value) || value instanceof VNode) {\n return;\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (observerState.shouldConvert && !isServerRendering() && (Array.isArray(value) || isPlainObject(value)) && Object.isExtensible(value) && !value._isVue) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob;\n }", "function observe(value, asRootData) {\n if (!isObject(value) || value instanceof VNode) {\n return;\n }\n\n var ob;\n\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (shouldObserve && !isServerRendering() && (Array.isArray(value) || isPlainObject(value)) && Object.isExtensible(value) && !value._isVue) {\n ob = new Observer(value);\n }\n\n if (asRootData && ob) {\n ob.vmCount++;\n }\n\n return ob;\n }", "function observe(value, asRootData) {\n if (!isObject(value) || value instanceof VNode) {\n return;\n }\n var ob;\n if (hasOwn(value, \"__ob__\") && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n shouldObserve &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob;\n }", "function observe (value, asRootData) {\r\n if (!isObject(value) || value instanceof VNode) {\r\n return\r\n }\r\n var ob;\r\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\r\n ob = value.__ob__;\r\n } else if (\r\n shouldObserve &&\r\n !isServerRendering() &&\r\n (Array.isArray(value) || isPlainObject(value)) &&\r\n Object.isExtensible(value) &&\r\n !value._isVue\r\n ) {\r\n ob = new Observer(value);\r\n }\r\n if (asRootData && ob) {\r\n ob.vmCount++;\r\n }\r\n return ob\r\n}", "function observe(value, asRootData) {\n if (!isObject(value) || value instanceof VNode) {\n return;\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n }\n else if (shouldObserve &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob;\n }" ]
[ "0.74129635", "0.652159", "0.6444194", "0.6442786", "0.6413996", "0.64086866", "0.64086866", "0.6364294", "0.5903606", "0.5883659", "0.57971364", "0.57971364", "0.57971364", "0.57971364", "0.57971364", "0.57971364", "0.57971364", "0.57971364", "0.57971364", "0.57971364", "0.57971364", "0.57971364", "0.57971364", "0.57971364", "0.57971364", "0.57971364", "0.57971364", "0.57971364", "0.57971364", "0.57971364", "0.57971364", "0.57971364", "0.57971364", "0.579635", "0.5749436", "0.5749436", "0.5749436", "0.5749436", "0.5749436", "0.5749053", "0.5749053", "0.571947", "0.56709677", "0.56709677", "0.56709677", "0.55909336", "0.55404174", "0.55404174", "0.55404174", "0.55404174", "0.55296856", "0.552234", "0.552234", "0.5518111", "0.5518111", "0.5518111", "0.5518111", "0.5518111", "0.5518111", "0.5518111", "0.5518111", "0.5518111", "0.5518111", "0.5518111", "0.5518111", "0.5518111", "0.5518111", "0.5514814", "0.55054903", "0.54952246", "0.5483417", "0.5481061" ]
0.0
-1
Define a reactive property on an Object.
function defineReactive$$1 ( obj, key, val, customSetter, shallow ) { var dep = new Dep(); var property = Object.getOwnPropertyDescriptor(obj, key); if (property && property.configurable === false) { return } // cater for pre-defined getter/setters var getter = property && property.get; var setter = property && property.set; if ((!getter || setter) && arguments.length === 2) { val = obj[key]; } var childOb = !shallow && observe(val); Object.defineProperty(obj, key, { enumerable: true, configurable: true, get: function reactiveGetter () { var value = getter ? getter.call(obj) : val; if (Dep.target) { dep.depend(); if (childOb) { childOb.dep.depend(); if (Array.isArray(value)) { dependArray(value); } } } return value }, set: function reactiveSetter (newVal) { var value = getter ? getter.call(obj) : val; /* eslint-disable no-self-compare */ if (newVal === value || (newVal !== newVal && value !== value)) { return } /* eslint-enable no-self-compare */ if (false) {} // #7981: for accessor properties without setter if (getter && !setter) { return } if (setter) { setter.call(obj, newVal); } else { val = newVal; } childOb = !shallow && observe(newVal); dep.notify(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function defineReactive(obj,key,val,customSetter,shallow){var dep=new Dep();var property=Object.getOwnPropertyDescriptor(obj,key);if(property&&property.configurable===false){return;}// cater for pre-defined getter/setters\nvar getter=property&&property.get;var setter=property&&property.set;var childOb=!shallow&&observe(val);Object.defineProperty(obj,key,{enumerable:true,configurable:true,get:function reactiveGetter(){var value=getter?getter.call(obj):val;if(Dep.target){dep.depend();if(childOb){childOb.dep.depend();if(Array.isArray(value)){dependArray(value);}}}return value;},set:function reactiveSetter(newVal){var value=getter?getter.call(obj):val;/* eslint-disable no-self-compare */if(newVal===value||newVal!==newVal&&value!==value){return;}/* eslint-enable no-self-compare */if(\"development\"!=='production'&&customSetter){customSetter();}if(setter){setter.call(obj,newVal);}else{val=newVal;}childOb=!shallow&&observe(newVal);dep.notify();}});}", "function defineReactive(obj,key,val,customSetter,shallow){var dep=new Dep();var property=Object.getOwnPropertyDescriptor(obj,key);if(property&&property.configurable===false){return;}// cater for pre-defined getter/setters\nvar getter=property&&property.get;var setter=property&&property.set;var childOb=!shallow&&observe(val);Object.defineProperty(obj,key,{enumerable:true,configurable:true,get:function reactiveGetter(){var value=getter?getter.call(obj):val;if(Dep.target){dep.depend();if(childOb){childOb.dep.depend();if(Array.isArray(value)){dependArray(value);}}}return value;},set:function reactiveSetter(newVal){var value=getter?getter.call(obj):val;/* eslint-disable no-self-compare */if(newVal===value||newVal!==newVal&&value!==value){return;}/* eslint-enable no-self-compare */if(\"development\"!=='production'&&customSetter){customSetter();}if(setter){setter.call(obj,newVal);}else{val=newVal;}childOb=!shallow&&observe(newVal);dep.notify();}});}", "function defineReactive$$1(obj,key,val,customSetter){var dep=new Dep();var property=Object.getOwnPropertyDescriptor(obj,key);if(property&&property.configurable===false){return;}// cater for pre-defined getter/setters\n\tvar getter=property&&property.get;var setter=property&&property.set;var childOb=observe(val);Object.defineProperty(obj,key,{enumerable:true,configurable:true,get:function reactiveGetter(){var value=getter?getter.call(obj):val;if(Dep.target){dep.depend();if(childOb){childOb.dep.depend();}if(Array.isArray(value)){dependArray(value);}}return value;},set:function reactiveSetter(newVal){var value=getter?getter.call(obj):val;/* eslint-disable no-self-compare */if(newVal===value||newVal!==newVal&&value!==value){return;}/* eslint-enable no-self-compare */if(\"development\"!=='production'&&customSetter){customSetter();}if(setter){setter.call(obj,newVal);}else{val=newVal;}childOb=observe(newVal);dep.notify();}});}", "function set$1(obj,key,val){if(Array.isArray(obj)){obj.length=Math.max(obj.length,key);obj.splice(key,1,val);return val;}if(hasOwn(obj,key)){obj[key]=val;return;}var ob=obj.__ob__;if(obj._isVue||ob&&ob.vmCount){\"development\"!=='production'&&warn('Avoid adding reactive properties to a Vue instance or its root $data '+'at runtime - declare it upfront in the data option.');return;}if(!ob){obj[key]=val;return;}defineReactive$$1(ob.value,key,val);ob.dep.notify();return val;}", "function defineReactive(obj, key, val, customSetter) {\n\t\t var dep = new Dep();\n\n\t\t var property = Object.getOwnPropertyDescriptor(obj, key);\n\t\t if (property && property.configurable === false) {\n\t\t return;\n\t\t }\n\n\t\t // cater for pre-defined getter/setters\n\t\t var getter = property && property.get;\n\t\t var setter = property && property.set;\n\n\t\t var childOb = observe(val);\n\t\t Object.defineProperty(obj, key, {\n\t\t enumerable: true,\n\t\t configurable: true,\n\t\t get: function reactiveGetter() {\n\t\t var value = getter ? getter.call(obj) : val;\n\t\t if (Dep.target) {\n\t\t dep.depend();\n\t\t if (childOb) {\n\t\t childOb.dep.depend();\n\t\t }\n\t\t if (Array.isArray(value)) {\n\t\t for (var e, i = 0, l = value.length; i < l; i++) {\n\t\t e = value[i];\n\t\t e && e.__ob__ && e.__ob__.dep.depend();\n\t\t }\n\t\t }\n\t\t }\n\t\t return value;\n\t\t },\n\t\t set: function reactiveSetter(newVal) {\n\t\t var value = getter ? getter.call(obj) : val;\n\t\t if (newVal === value) {\n\t\t return;\n\t\t }\n\t\t if (false) {\n\t\t customSetter();\n\t\t }\n\t\t if (setter) {\n\t\t setter.call(obj, newVal);\n\t\t } else {\n\t\t val = newVal;\n\t\t }\n\t\t childOb = observe(newVal);\n\t\t dep.notify();\n\t\t }\n\t\t });\n\t\t}", "function defineReactive (obj, key, val, customSetter, shallow) {\n const dep = new __WEBPACK_IMPORTED_MODULE_2__dep__[\"a\" /* Dep */]()\n\n const property = Object.getOwnPropertyDescriptor(obj, key)\n if (property && property.configurable === false) {\n return\n }\n const getter = property && property.get\n const setter = property && property.set\n\n if ((!getter || setter) && arguments.length === 2) {\n val = obj[key]\n }\n\n let childOb = !shallow && observe(val)\n\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter() {\n const value = getter ? getter.call(obj) : val\n if (__WEBPACK_IMPORTED_MODULE_2__dep__[\"a\" /* Dep */].target) {\n dep.depend()\n if (childOb) {\n childOb.dep.depend()\n if (Array.isArray(value)) {\n dependArray(value)\n }\n }\n }\n return value\n },\n set: function reactiveSetter(newVal) {\n const value = getter ? getter.call(obj) : val\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n if (setter) {\n setter.call(obj, newVal)\n } else {\n val = newVal\n }\n childOb = !shallow && observe(newVal)\n dep.notify()\n }\n })\n}", "function defineReactive(obj, key, val, customSetter) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return;\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter() {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n }\n if (Array.isArray(value)) {\n for (var e, i = 0, l = value.length; i < l; i++) {\n e = value[i];\n e && e.__ob__ && e.__ob__.dep.depend();\n }\n }\n }\n return value;\n },\n set: function reactiveSetter(newVal) {\n var value = getter ? getter.call(obj) : val;\n if (newVal === value) {\n return;\n }\n if (process.env.NODE_ENV !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = observe(newVal);\n dep.notify();\n }\n });\n}", "function makeReactive(obj) {\n const proto = obj.__proto__;\n Object.defineProperty(obj, '__proto__', {\n get() {\n return proto;\n },\n\n set(value) {\n proto.__proto__ = value;\n }\n\n });\n}", "function defineReactive(obj,key,val){\n var dep=new Dep();\n \n Object.defineProperty(obj,key,{\n get:function(){\n if(Dep.target) dep.addSub(Dep.target)\n return val\n },\n \n set:function(newVal){\n if(newVal===val) return;\n val=newVal;\n dep.notify();\n }\n })\n }", "function defineReactive$$1(obj, key, val, customSetter, shallow) {\n var dep = new Dep();\n var property = Object.getOwnPropertyDescriptor(obj, key);\n\n if (property && property.configurable === false) {\n return;\n } // cater for pre-defined getter/setters\n\n\n var getter = property && property.get;\n var setter = property && property.set;\n\n if ((!getter || setter) && arguments.length === 2) {\n val = obj[key];\n }\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter() {\n var value = getter ? getter.call(obj) : val;\n\n if (Dep.target) {\n dep.depend();\n\n if (childOb) {\n childOb.dep.depend();\n\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n\n return value;\n },\n set: function reactiveSetter(newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n\n if (newVal === value || newVal !== newVal && value !== value) {\n return;\n }\n /* eslint-enable no-self-compare */\n\n\n if (\"development\" !== 'production' && customSetter) {\n customSetter();\n } // #7981: for accessor properties without setter\n\n\n if (getter && !setter) {\n return;\n }\n\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1(obj, key, val, customSetter, shallow) {\n var dep = new Dep();\n var property = Object.getOwnPropertyDescriptor(obj, key);\n\n if (property && property.configurable === false) {\n return;\n } // cater for pre-defined getter/setters\n\n\n var getter = property && property.get;\n var setter = property && property.set;\n\n if ((!getter || setter) && arguments.length === 2) {\n val = obj[key];\n }\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter() {\n var value = getter ? getter.call(obj) : val;\n\n if (Dep.target) {\n dep.depend();\n\n if (childOb) {\n childOb.dep.depend();\n\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n\n return value;\n },\n set: function reactiveSetter(newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n\n if (newVal === value || newVal !== newVal && value !== value) {\n return;\n }\n /* eslint-enable no-self-compare */\n\n\n if (false) {} // #7981: for accessor properties without setter\n\n\n if (getter && !setter) {\n return;\n }\n\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1(obj, key, val, customSetter, shallow) {\n var dep = new Dep();\n var property = Object.getOwnPropertyDescriptor(obj, key);\n\n if (property && property.configurable === false) {\n return;\n } // cater for pre-defined getter/setters\n\n\n var getter = property && property.get;\n var setter = property && property.set;\n\n if ((!getter || setter) && arguments.length === 2) {\n val = obj[key];\n }\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter() {\n var value = getter ? getter.call(obj) : val;\n\n if (Dep.target) {\n dep.depend();\n\n if (childOb) {\n childOb.dep.depend();\n\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n\n return value;\n },\n set: function reactiveSetter(newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n\n if (newVal === value || newVal !== newVal && value !== value) {\n return;\n }\n /* eslint-enable no-self-compare */\n\n\n if (false) {} // #7981: for accessor properties without setter\n\n\n if (getter && !setter) {\n return;\n }\n\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1(obj, key, val, customSetter, shallow) {\n var dep = new Dep();\n var property = Object.getOwnPropertyDescriptor(obj, key);\n\n if (property && property.configurable === false) {\n return;\n } // cater for pre-defined getter/setters\n\n\n var getter = property && property.get;\n var setter = property && property.set;\n\n if ((!getter || setter) && arguments.length === 2) {\n val = obj[key];\n }\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter() {\n var value = getter ? getter.call(obj) : val;\n\n if (Dep.target) {\n dep.depend();\n\n if (childOb) {\n childOb.dep.depend();\n\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n\n return value;\n },\n set: function reactiveSetter(newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n\n if (newVal === value || newVal !== newVal && value !== value) {\n return;\n }\n /* eslint-enable no-self-compare */\n\n\n if (customSetter) {\n customSetter();\n } // #7981: for accessor properties without setter\n\n\n if (getter && !setter) {\n return;\n }\n\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n }", "function defineReactive$$1(obj, key, val, customSetter, shallow) {\n var dep = new Dep();\n var property = Object.getOwnPropertyDescriptor(obj, key);\n\n if (property && property.configurable === false) {\n return;\n } // cater for pre-defined getter/setters\n\n\n var getter = property && property.get;\n var setter = property && property.set;\n\n if ((!getter || setter) && arguments.length === 2) {\n val = obj[key];\n }\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter() {\n var value = getter ? getter.call(obj) : val;\n\n if (Dep.target) {\n dep.depend();\n\n if (childOb) {\n childOb.dep.depend();\n\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n\n return value;\n },\n set: function reactiveSetter(newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n\n if (newVal === value || newVal !== newVal && value !== value) {\n return;\n }\n /* eslint-enable no-self-compare */\n\n\n if ( true && customSetter) {\n customSetter();\n } // #7981: for accessor properties without setter\n\n\n if (getter && !setter) {\n return;\n }\n\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1(obj, key, val, customSetter, shallow) {\n\t var dep = new Dep();\n\t\n\t var property = Object.getOwnPropertyDescriptor(obj, key);\n\t if (property && property.configurable === false) {\n\t return;\n\t }\n\t\n\t // cater for pre-defined getter/setters\n\t var getter = property && property.get;\n\t var setter = property && property.set;\n\t\n\t var childOb = !shallow && observe(val);\n\t Object.defineProperty(obj, key, {\n\t enumerable: true,\n\t configurable: true,\n\t get: function reactiveGetter() {\n\t var value = getter ? getter.call(obj) : val;\n\t if (Dep.target) {\n\t dep.depend();\n\t if (childOb) {\n\t childOb.dep.depend();\n\t }\n\t if (Array.isArray(value)) {\n\t dependArray(value);\n\t }\n\t }\n\t return value;\n\t },\n\t set: function reactiveSetter(newVal) {\n\t var value = getter ? getter.call(obj) : val;\n\t /* eslint-disable no-self-compare */\n\t if (newVal === value || newVal !== newVal && value !== value) {\n\t return;\n\t }\n\t /* eslint-enable no-self-compare */\n\t if (process.env.NODE_ENV !== 'production' && customSetter) {\n\t customSetter();\n\t }\n\t if (setter) {\n\t setter.call(obj, newVal);\n\t } else {\n\t val = newVal;\n\t }\n\t childOb = !shallow && observe(newVal);\n\t dep.notify();\n\t }\n\t });\n\t}", "function defineReactive$$1(obj, key, val, customSetter, shallow) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return;\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter() {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n }\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n return value;\n },\n set: function reactiveSetter(newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || newVal !== newVal && value !== value) {\n return;\n }\n /* eslint-enable no-self-compare */\n if (\"development\" !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1(obj, key, val, customSetter) {\n\t var dep = new Dep();\n\n\t var property = Object.getOwnPropertyDescriptor(obj, key);\n\t if (property && property.configurable === false) {\n\t return;\n\t }\n\n\t // cater for pre-defined getter/setters\n\t var getter = property && property.get;\n\t var setter = property && property.set;\n\n\t var childOb = observe(val);\n\t Object.defineProperty(obj, key, {\n\t enumerable: true,\n\t configurable: true,\n\t get: function reactiveGetter() {\n\t var value = getter ? getter.call(obj) : val;\n\t if (Dep.target) {\n\t dep.depend();\n\t if (childOb) {\n\t childOb.dep.depend();\n\t }\n\t if (Array.isArray(value)) {\n\t dependArray(value);\n\t }\n\t }\n\t return value;\n\t },\n\t set: function reactiveSetter(newVal) {\n\t var value = getter ? getter.call(obj) : val;\n\t /* eslint-disable no-self-compare */\n\t if (newVal === value || newVal !== newVal && value !== value) {\n\t return;\n\t }\n\t /* eslint-enable no-self-compare */\n\t if (process.env.NODE_ENV !== 'production' && customSetter) {\n\t customSetter();\n\t }\n\t if (setter) {\n\t setter.call(obj, newVal);\n\t } else {\n\t val = newVal;\n\t }\n\t childOb = observe(newVal);\n\t dep.notify();\n\t }\n\t });\n\t}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n }\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n if (newVal === value) {\n return\n }\n if (\"development\" !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1(obj, key, val, customSetter, shallow) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return;\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter() {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value;\n },\n set: function reactiveSetter(newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || newVal !== newVal && value !== value) {\n return;\n }\n /* eslint-enable no-self-compare */\n if (process.env.NODE_ENV !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n\t obj,\n\t key,\n\t val,\n\t customSetter\n\t) {\n\t var dep = new Dep();\n\t\n\t var property = Object.getOwnPropertyDescriptor(obj, key);\n\t if (property && property.configurable === false) {\n\t return\n\t }\n\t\n\t // cater for pre-defined getter/setters\n\t var getter = property && property.get;\n\t var setter = property && property.set;\n\t\n\t var childOb = observe(val);\n\t Object.defineProperty(obj, key, {\n\t enumerable: true,\n\t configurable: true,\n\t get: function reactiveGetter () {\n\t var value = getter ? getter.call(obj) : val;\n\t if (Dep.target) {\n\t dep.depend();\n\t if (childOb) {\n\t childOb.dep.depend();\n\t }\n\t if (Array.isArray(value)) {\n\t dependArray(value);\n\t }\n\t }\n\t return value\n\t },\n\t set: function reactiveSetter (newVal) {\n\t var value = getter ? getter.call(obj) : val;\n\t if (newVal === value) {\n\t return\n\t }\n\t if (\"development\" !== 'production' && customSetter) {\n\t customSetter();\n\t }\n\t if (setter) {\n\t setter.call(obj, newVal);\n\t } else {\n\t val = newVal;\n\t }\n\t childOb = observe(newVal);\n\t dep.notify();\n\t }\n\t });\n\t}", "function defineReactive(obj, key, val, customSetter, shallow) {\n var dep = new Dep();\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return;\n }\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n if ((!getter || setter) && arguments.length === 2) {\n val = obj[key];\n }\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter() {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value;\n },\n set: function reactiveSetter(newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return;\n }\n /* eslint-enable no-self-compare */\n if ( customSetter) {\n customSetter();\n }\n // #7981: for accessor properties without setter\n if (getter && !setter)\n return;\n if (setter) {\n setter.call(obj, newVal);\n }\n else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n }", "function defineReactive$$1 (\n\t obj,\n\t key,\n\t val,\n\t customSetter\n\t) {\n\t var dep = new Dep()\n\n\t var property = Object.getOwnPropertyDescriptor(obj, key)\n\t if (property && property.configurable === false) {\n\t return\n\t }\n\n\t // cater for pre-defined getter/setters\n\t var getter = property && property.get\n\t var setter = property && property.set\n\n\t var childOb = observe(val)\n\t Object.defineProperty(obj, key, {\n\t enumerable: true,\n\t configurable: true,\n\t get: function reactiveGetter () {\n\t var value = getter ? getter.call(obj) : val\n\t if (Dep.target) {\n\t dep.depend()\n\t if (childOb) {\n\t childOb.dep.depend()\n\t }\n\t if (Array.isArray(value)) {\n\t for (var e = void 0, i = 0, l = value.length; i < l; i++) {\n\t e = value[i]\n\t e && e.__ob__ && e.__ob__.dep.depend()\n\t }\n\t }\n\t }\n\t return value\n\t },\n\t set: function reactiveSetter (newVal) {\n\t var value = getter ? getter.call(obj) : val\n\t if (newVal === value) {\n\t return\n\t }\n\t if (process.env.NODE_ENV !== 'production' && customSetter) {\n\t customSetter()\n\t }\n\t if (setter) {\n\t setter.call(obj, newVal)\n\t } else {\n\t val = newVal\n\t }\n\t childOb = observe(newVal)\n\t dep.notify()\n\t }\n\t })\n\t}", "function defineReactive$$1(obj, key, val, customSetter, shallow) {\n\t var dep = new Dep();\n\n\t var property = Object.getOwnPropertyDescriptor(obj, key);\n\t if (property && property.configurable === false) {\n\t return;\n\t }\n\n\t // cater for pre-defined getter/setters\n\t var getter = property && property.get;\n\t var setter = property && property.set;\n\n\t var childOb = !shallow && observe(val);\n\t Object.defineProperty(obj, key, {\n\t enumerable: true,\n\t configurable: true,\n\t get: function reactiveGetter() {\n\t var value = getter ? getter.call(obj) : val;\n\t if (Dep.target) {\n\t dep.depend();\n\t if (childOb) {\n\t childOb.dep.depend();\n\t }\n\t if (Array.isArray(value)) {\n\t dependArray(value);\n\t }\n\t }\n\t return value;\n\t },\n\t set: function reactiveSetter(newVal) {\n\t var value = getter ? getter.call(obj) : val;\n\t /* eslint-disable no-self-compare */\n\t if (newVal === value || newVal !== newVal && value !== value) {\n\t return;\n\t }\n\t /* eslint-enable no-self-compare */\n\t if (process.env.NODE_ENV !== 'production' && customSetter) {\n\t customSetter();\n\t }\n\t if (setter) {\n\t setter.call(obj, newVal);\n\t } else {\n\t val = newVal;\n\t }\n\t childOb = !shallow && observe(newVal);\n\t dep.notify();\n\t }\n\t });\n\t}", "function defineReactive(obj, key, val, customSetter, shallow) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return;\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter() {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value;\n },\n set: function reactiveSetter(newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || newVal !== newVal && value !== value) {\n return;\n }\n /* eslint-enable no-self-compare */\n if (\"development\" !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n }", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n }\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (\"development\" !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n }\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (\"development\" !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n }\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (\"development\" !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n }\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (\"development\" !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n }\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (\"development\" !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n }\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (false) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n }\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (false) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n }\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (false) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive(obj, key, val, customSetter, shallow) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return;\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter() {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value;\n },\n set: function reactiveSetter(newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || newVal !== newVal && value !== value) {\n return;\n }\n /* eslint-enable no-self-compare */\n if (\"development\" !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function makeReactive(obj) {\n const proto = obj.__proto__;\n Object.defineProperty(obj, '__proto__', {\n get: function () {\n return proto;\n },\n set: function (value) {\n proto.__proto__ = value;\n }\n });\n }", "function defineReactive$$1 (\n\t obj,\n\t key,\n\t val,\n\t customSetter\n\t) {\n\t var dep = new Dep();\n\t\n\t var property = Object.getOwnPropertyDescriptor(obj, key);\n\t if (property && property.configurable === false) {\n\t return\n\t }\n\t\n\t // cater for pre-defined getter/setters\n\t var getter = property && property.get;\n\t var setter = property && property.set;\n\t\n\t var childOb = observe(val);\n\t Object.defineProperty(obj, key, {\n\t enumerable: true,\n\t configurable: true,\n\t get: function reactiveGetter () {\n\t var value = getter ? getter.call(obj) : val;\n\t if (Dep.target) {\n\t dep.depend();\n\t if (childOb) {\n\t childOb.dep.depend();\n\t }\n\t if (Array.isArray(value)) {\n\t dependArray(value);\n\t }\n\t }\n\t return value\n\t },\n\t set: function reactiveSetter (newVal) {\n\t var value = getter ? getter.call(obj) : val;\n\t /* eslint-disable no-self-compare */\n\t if (newVal === value || (newVal !== newVal && value !== value)) {\n\t return\n\t }\n\t /* eslint-enable no-self-compare */\n\t if (\"development\" !== 'production' && customSetter) {\n\t customSetter();\n\t }\n\t if (setter) {\n\t setter.call(obj, newVal);\n\t } else {\n\t val = newVal;\n\t }\n\t childOb = observe(newVal);\n\t dep.notify();\n\t }\n\t });\n\t}", "function defineReactive$$1 (\n\t obj,\n\t key,\n\t val,\n\t customSetter\n\t) {\n\t var dep = new Dep();\n\t\n\t var property = Object.getOwnPropertyDescriptor(obj, key);\n\t if (property && property.configurable === false) {\n\t return\n\t }\n\t\n\t // cater for pre-defined getter/setters\n\t var getter = property && property.get;\n\t var setter = property && property.set;\n\t\n\t var childOb = observe(val);\n\t Object.defineProperty(obj, key, {\n\t enumerable: true,\n\t configurable: true,\n\t get: function reactiveGetter () {\n\t var value = getter ? getter.call(obj) : val;\n\t if (Dep.target) {\n\t dep.depend();\n\t if (childOb) {\n\t childOb.dep.depend();\n\t }\n\t if (Array.isArray(value)) {\n\t dependArray(value);\n\t }\n\t }\n\t return value\n\t },\n\t set: function reactiveSetter (newVal) {\n\t var value = getter ? getter.call(obj) : val;\n\t /* eslint-disable no-self-compare */\n\t if (newVal === value || (newVal !== newVal && value !== value)) {\n\t return\n\t }\n\t /* eslint-enable no-self-compare */\n\t if (\"development\" !== 'production' && customSetter) {\n\t customSetter();\n\t }\n\t if (setter) {\n\t setter.call(obj, newVal);\n\t } else {\n\t val = newVal;\n\t }\n\t childOb = observe(newVal);\n\t dep.notify();\n\t }\n\t });\n\t}", "function defineReactive$$1 (\n\t obj,\n\t key,\n\t val,\n\t customSetter\n\t) {\n\t var dep = new Dep();\n\t\n\t var property = Object.getOwnPropertyDescriptor(obj, key);\n\t if (property && property.configurable === false) {\n\t return\n\t }\n\t\n\t // cater for pre-defined getter/setters\n\t var getter = property && property.get;\n\t var setter = property && property.set;\n\t\n\t var childOb = observe(val);\n\t Object.defineProperty(obj, key, {\n\t enumerable: true,\n\t configurable: true,\n\t get: function reactiveGetter () {\n\t var value = getter ? getter.call(obj) : val;\n\t if (Dep.target) {\n\t dep.depend();\n\t if (childOb) {\n\t childOb.dep.depend();\n\t }\n\t if (Array.isArray(value)) {\n\t dependArray(value);\n\t }\n\t }\n\t return value\n\t },\n\t set: function reactiveSetter (newVal) {\n\t var value = getter ? getter.call(obj) : val;\n\t /* eslint-disable no-self-compare */\n\t if (newVal === value || (newVal !== newVal && value !== value)) {\n\t return\n\t }\n\t /* eslint-enable no-self-compare */\n\t if (\"development\" !== 'production' && customSetter) {\n\t customSetter();\n\t }\n\t if (setter) {\n\t setter.call(obj, newVal);\n\t } else {\n\t val = newVal;\n\t }\n\t childOb = observe(newVal);\n\t dep.notify();\n\t }\n\t });\n\t}", "function defineReactive$$1 (\n\t obj,\n\t key,\n\t val,\n\t customSetter\n\t) {\n\t var dep = new Dep();\n\t\n\t var property = Object.getOwnPropertyDescriptor(obj, key);\n\t if (property && property.configurable === false) {\n\t return\n\t }\n\t\n\t // cater for pre-defined getter/setters\n\t var getter = property && property.get;\n\t var setter = property && property.set;\n\t\n\t var childOb = observe(val);\n\t Object.defineProperty(obj, key, {\n\t enumerable: true,\n\t configurable: true,\n\t get: function reactiveGetter () {\n\t var value = getter ? getter.call(obj) : val;\n\t if (Dep.target) {\n\t dep.depend();\n\t if (childOb) {\n\t childOb.dep.depend();\n\t }\n\t if (Array.isArray(value)) {\n\t dependArray(value);\n\t }\n\t }\n\t return value\n\t },\n\t set: function reactiveSetter (newVal) {\n\t var value = getter ? getter.call(obj) : val;\n\t /* eslint-disable no-self-compare */\n\t if (newVal === value || (newVal !== newVal && value !== value)) {\n\t return\n\t }\n\t /* eslint-enable no-self-compare */\n\t if ((\"development\") !== 'production' && customSetter) {\n\t customSetter();\n\t }\n\t if (setter) {\n\t setter.call(obj, newVal);\n\t } else {\n\t val = newVal;\n\t }\n\t childOb = observe(newVal);\n\t dep.notify();\n\t }\n\t });\n\t}", "set property(){}", "function defineReactive(obj, key, val, customSetter, shallow) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return;\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter() {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value;\n },\n set: function reactiveSetter(newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || newVal !== newVal && value !== value) {\n return;\n }\n /* eslint-enable no-self-compare */\n if (process.env.NODE_ENV !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive(obj, key, val, customSetter, shallow) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return;\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter() {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value;\n },\n set: function reactiveSetter(newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || newVal !== newVal && value !== value) {\n return;\n }\n /* eslint-enable no-self-compare */\n if (process.env.NODE_ENV !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive(obj, key, val, customSetter, shallow) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return;\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter() {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value;\n },\n set: function reactiveSetter(newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || newVal !== newVal && value !== value) {\n return;\n }\n /* eslint-enable no-self-compare */\n if (process.env.NODE_ENV !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n }\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (process.env.NODE_ENV !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n }\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (process.env.NODE_ENV !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n }\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (process.env.NODE_ENV !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n }\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (process.env.NODE_ENV !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n }\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (process.env.NODE_ENV !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n }\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (process.env.NODE_ENV !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n }\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (process.env.NODE_ENV !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n }\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (process.env.NODE_ENV !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n\t obj,\n\t key,\n\t val,\n\t customSetter\n\t) {\n\t var dep = new Dep();\n\n\t var property = Object.getOwnPropertyDescriptor(obj, key);\n\t if (property && property.configurable === false) {\n\t return\n\t }\n\n\t // cater for pre-defined getter/setters\n\t var getter = property && property.get;\n\t var setter = property && property.set;\n\n\t var childOb = observe(val);\n\t Object.defineProperty(obj, key, {\n\t enumerable: true,\n\t configurable: true,\n\t get: function reactiveGetter () {\n\t var value = getter ? getter.call(obj) : val;\n\t if (Dep.target) {\n\t dep.depend();\n\t if (childOb) {\n\t childOb.dep.depend();\n\t }\n\t if (Array.isArray(value)) {\n\t dependArray(value);\n\t }\n\t }\n\t return value\n\t },\n\t set: function reactiveSetter (newVal) {\n\t var value = getter ? getter.call(obj) : val;\n\t if (newVal === value) {\n\t return\n\t }\n\t if (process.env.NODE_ENV !== 'production' && customSetter) {\n\t customSetter();\n\t }\n\t if (setter) {\n\t setter.call(obj, newVal);\n\t } else {\n\t val = newVal;\n\t }\n\t childOb = observe(newVal);\n\t dep.notify();\n\t }\n\t });\n\t}", "function defineReactive(obj, key, val, customSetter, shallow) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return;\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n if (!getter && arguments.length === 2) {\n val = obj[key];\n }\n var setter = property && property.set;\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter() {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value;\n },\n set: function reactiveSetter(newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || newVal !== newVal && value !== value) {\n return;\n }\n /* eslint-enable no-self-compare */\n if ('development' !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter,\n shallow\n ) {\n var dep = new Dep();\n \n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n \n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n if ((!getter || setter) && arguments.length === 2) {\n val = obj[key];\n }\n \n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (\"debug\" !== 'production' && customSetter) {\n customSetter();\n }\n // #7981: for accessor properties without setter\n if (getter && !setter) { return }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n }", "function defineReactive(obj, key, val, customSetter, shallow) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return;\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n if (!getter && arguments.length === 2) {\n val = obj[key];\n }\n var setter = property && property.set;\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter() {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value;\n },\n set: function reactiveSetter(newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || newVal !== newVal && value !== value) {\n return;\n }\n /* eslint-enable no-self-compare */\n if (process.env.NODE_ENV !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n\t obj,\n\t key,\n\t val,\n\t customSetter\n\t) {\n\t var dep = new Dep();\n\n\t var property = Object.getOwnPropertyDescriptor(obj, key);\n\t if (property && property.configurable === false) {\n\t return\n\t }\n\n\t // cater for pre-defined getter/setters\n\t var getter = property && property.get;\n\t var setter = property && property.set;\n\n\t var childOb = observe(val);\n\t Object.defineProperty(obj, key, {\n\t enumerable: true,\n\t configurable: true,\n\t get: function reactiveGetter () {\n\t var value = getter ? getter.call(obj) : val;\n\t if (Dep.target) {\n\t dep.depend();\n\t if (childOb) {\n\t childOb.dep.depend();\n\t }\n\t if (Array.isArray(value)) {\n\t dependArray(value);\n\t }\n\t }\n\t return value\n\t },\n\t set: function reactiveSetter (newVal) {\n\t var value = getter ? getter.call(obj) : val;\n\t /* eslint-disable no-self-compare */\n\t if (newVal === value || (newVal !== newVal && value !== value)) {\n\t return\n\t }\n\t /* eslint-enable no-self-compare */\n\t if (process.env.NODE_ENV !== 'production' && customSetter) {\n\t customSetter();\n\t }\n\t if (setter) {\n\t setter.call(obj, newVal);\n\t } else {\n\t val = newVal;\n\t }\n\t childOb = observe(newVal);\n\t dep.notify();\n\t }\n\t });\n\t}", "function defineReactive (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (false) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (false) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (false) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1(\n obj,\n key,\n val,\n customSetter,\n shallow,\n ) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return;\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n if ((!getter || setter) && arguments.length === 2) {\n val = obj[key];\n }\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter() {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value;\n },\n set: function reactiveSetter(newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return;\n }\n /* eslint-enable no-self-compare */\n if (customSetter) {\n customSetter();\n }\n // #7981: for accessor properties without setter\n if (getter && !setter) return;\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n },\n });\n }", "function defineReactive (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (\"development\" !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (\"development\" !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (\"development\" !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (\"development\" !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (\"development\" !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (\"development\" !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (\"development\" !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (\"development\" !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (\"development\" !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter,\n shallow\n ) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n if ((!getter || setter) && arguments.length === 2) {\n val = obj[key];\n }\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (customSetter) {\n customSetter();\n }\n // #7981: for accessor properties without setter\n if (getter && !setter) { return }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n }", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter,\n shallow\n ) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n if ((!getter || setter) && arguments.length === 2) {\n val = obj[key];\n }\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (customSetter) {\n customSetter();\n }\n // #7981: for accessor properties without setter\n if (getter && !setter) { return }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n }", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter,\n shallow\n ) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n if ((!getter || setter) && arguments.length === 2) {\n val = obj[key];\n }\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (customSetter) {\n customSetter();\n }\n // #7981: for accessor properties without setter\n if (getter && !setter) { return }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n }", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter,\n shallow\n ) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n if ((!getter || setter) && arguments.length === 2) {\n val = obj[key];\n }\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if ( customSetter) {\n customSetter();\n }\n // #7981: for accessor properties without setter\n if (getter && !setter) { return }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n }", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n if ((!getter || setter) && arguments.length === 2) {\n val = obj[key];\n }\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (\"development\" !== 'production' && customSetter) {\n customSetter();\n }\n // #7981: for accessor properties without setter\n if (getter && !setter) { return }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n if ((!getter || setter) && arguments.length === 2) {\n val = obj[key];\n }\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (\"development\" !== 'production' && customSetter) {\n customSetter();\n }\n // #7981: for accessor properties without setter\n if (getter && !setter) { return }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive (\n\t obj,\n\t key,\n\t val,\n\t customSetter,\n\t shallow\n\t) {\n\t var dep = new Dep();\n\t\n\t var property = Object.getOwnPropertyDescriptor(obj, key);\n\t if (property && property.configurable === false) {\n\t return\n\t }\n\t\n\t // cater for pre-defined getter/setters\n\t var getter = property && property.get;\n\t if (!getter && arguments.length === 2) {\n\t val = obj[key];\n\t }\n\t var setter = property && property.set;\n\t\n\t var childOb = !shallow && observe(val);\n\t Object.defineProperty(obj, key, {\n\t enumerable: true,\n\t configurable: true,\n\t get: function reactiveGetter () {\n\t var value = getter ? getter.call(obj) : val;\n\t if (Dep.target) {\n\t dep.depend();\n\t if (childOb) {\n\t childOb.dep.depend();\n\t if (Array.isArray(value)) {\n\t dependArray(value);\n\t }\n\t }\n\t }\n\t return value\n\t },\n\t set: function reactiveSetter (newVal) {\n\t var value = getter ? getter.call(obj) : val;\n\t /* eslint-disable no-self-compare */\n\t if (newVal === value || (newVal !== newVal && value !== value)) {\n\t return\n\t }\n\t /* eslint-enable no-self-compare */\n\t if (false) {\n\t customSetter();\n\t }\n\t if (setter) {\n\t setter.call(obj, newVal);\n\t } else {\n\t val = newVal;\n\t }\n\t childOb = !shallow && observe(newVal);\n\t dep.notify();\n\t }\n\t });\n\t}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n }\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (\"development\" !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n }\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (\"development\" !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n }\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (false) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n }\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (false) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (false) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (\"development\" !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n if ((!getter || setter) && arguments.length === 2) {\n val = obj[key];\n }\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (false) {\n customSetter();\n }\n // #7981: for accessor properties without setter\n if (getter && !setter) { return }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n if ((!getter || setter) && arguments.length === 2) {\n val = obj[key];\n }\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (false) {\n customSetter();\n }\n // #7981: for accessor properties without setter\n if (getter && !setter) { return }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n if ((!getter || setter) && arguments.length === 2) {\n val = obj[key];\n }\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (false) {\n customSetter();\n }\n // #7981: for accessor properties without setter\n if (getter && !setter) { return }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n if ((!getter || setter) && arguments.length === 2) {\n val = obj[key];\n }\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (false) {\n customSetter();\n }\n // #7981: for accessor properties without setter\n if (getter && !setter) { return }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n if ((!getter || setter) && arguments.length === 2) {\n val = obj[key];\n }\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (false) {\n customSetter();\n }\n // #7981: for accessor properties without setter\n if (getter && !setter) { return }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n if ((!getter || setter) && arguments.length === 2) {\n val = obj[key];\n }\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (false) {\n customSetter();\n }\n // #7981: for accessor properties without setter\n if (getter && !setter) { return }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n if ((!getter || setter) && arguments.length === 2) {\n val = obj[key];\n }\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (false) {\n customSetter();\n }\n // #7981: for accessor properties without setter\n if (getter && !setter) { return }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n if ((!getter || setter) && arguments.length === 2) {\n val = obj[key];\n }\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (false) {\n customSetter();\n }\n // #7981: for accessor properties without setter\n if (getter && !setter) { return }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if ('development' !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n if ((!getter || setter) && arguments.length === 2) {\n val = obj[key];\n }\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (process.env.NODE_ENV !== 'production' && customSetter) {\n customSetter();\n }\n // #7981: for accessor properties without setter\n if (getter && !setter) { return }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n if ((!getter || setter) && arguments.length === 2) {\n val = obj[key];\n }\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (process.env.NODE_ENV !== 'production' && customSetter) {\n customSetter();\n }\n // #7981: for accessor properties without setter\n if (getter && !setter) { return }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1(\n obj,\n key,\n val,\n customSetter,\n shallow\n ) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n if ((!getter || setter) && arguments.length === 2) {\n val = obj[key];\n }\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter() {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter(newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (customSetter) {\n customSetter();\n }\n // #7981: for accessor properties without setter\n if (getter && !setter) {\n return\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n }", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n if ((!getter || setter) && arguments.length === 2) {\n val = obj[key];\n }\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if ( true && customSetter) {\n customSetter();\n }\n // #7981: for accessor properties without setter\n if (getter && !setter) { return }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n if ((!getter || setter) && arguments.length === 2) {\n val = obj[key];\n }\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if ( true && customSetter) {\n customSetter();\n }\n // #7981: for accessor properties without setter\n if (getter && !setter) { return }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n if ((!getter || setter) && arguments.length === 2) {\n val = obj[key];\n }\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if ( true && customSetter) {\n customSetter();\n }\n // #7981: for accessor properties without setter\n if (getter && !setter) { return }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n if ((!getter || setter) && arguments.length === 2) {\n val = obj[key];\n }\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if ( true && customSetter) {\n customSetter();\n }\n // #7981: for accessor properties without setter\n if (getter && !setter) { return }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n if ((!getter || setter) && arguments.length === 2) {\n val = obj[key];\n }\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if ( true && customSetter) {\n customSetter();\n }\n // #7981: for accessor properties without setter\n if (getter && !setter) { return }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n if ((!getter || setter) && arguments.length === 2) {\n val = obj[key];\n }\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if ( true && customSetter) {\n customSetter();\n }\n // #7981: for accessor properties without setter\n if (getter && !setter) { return }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n if ((!getter || setter) && arguments.length === 2) {\n val = obj[key];\n }\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if ( true && customSetter) {\n customSetter();\n }\n // #7981: for accessor properties without setter\n if (getter && !setter) { return }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}", "function defineReactive$$1 (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n if ((!getter || setter) && arguments.length === 2) {\n val = obj[key];\n }\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if ( true && customSetter) {\n customSetter();\n }\n // #7981: for accessor properties without setter\n if (getter && !setter) { return }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}" ]
[ "0.72791314", "0.72791314", "0.727433", "0.7127494", "0.7061651", "0.7045527", "0.6923424", "0.6918172", "0.69101816", "0.68589103", "0.6853851", "0.6853851", "0.685129", "0.68401927", "0.6833513", "0.6816881", "0.68088764", "0.68023205", "0.6798727", "0.6794959", "0.6792586", "0.6790472", "0.6782457", "0.677539", "0.67751724", "0.67751724", "0.67751724", "0.67751724", "0.67751724", "0.67717963", "0.67717963", "0.67717963", "0.677", "0.6764996", "0.67641515", "0.67641515", "0.67641515", "0.67625827", "0.6760894", "0.6753981", "0.6753981", "0.6753981", "0.6750302", "0.6750302", "0.6750302", "0.6750302", "0.6750302", "0.6750302", "0.6750302", "0.6750302", "0.6741428", "0.67230487", "0.6709029", "0.6707045", "0.6702463", "0.670094", "0.670094", "0.670094", "0.67004", "0.66950834", "0.66950834", "0.66950834", "0.66950834", "0.66950834", "0.66950834", "0.66950834", "0.66950834", "0.66950834", "0.66930133", "0.66930133", "0.66930133", "0.6691018", "0.66888356", "0.66888356", "0.668736", "0.6683703", "0.6683703", "0.6683269", "0.6683269", "0.6682974", "0.6682607", "0.66816616", "0.66816616", "0.66816616", "0.66816616", "0.66816616", "0.66816616", "0.66816616", "0.66816616", "0.66784924", "0.6674631", "0.6674631", "0.66738915", "0.667357", "0.667357", "0.667357", "0.667357", "0.667357", "0.667357", "0.667357", "0.667357" ]
0.0
-1
Set a property on an object. Adds the new property and triggers change notification if the property doesn't already exist.
function set (target, key, val) { if (false ) {} if (Array.isArray(target) && isValidArrayIndex(key)) { target.length = Math.max(target.length, key); target.splice(key, 1, val); return val } if (key in target && !(key in Object.prototype)) { target[key] = val; return val } var ob = (target).__ob__; if (target._isVue || (ob && ob.vmCount)) { false && false; return val } if (!ob) { target[key] = val; return val } defineReactive$$1(ob.value, key, val); ob.dep.notify(); return val }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@action\n setProp(property, newVal) {\n this.set(property, newVal);\n }", "set property(){}", "function patchProperty(obj, prop, value) {\n obj[prop] = value;\n}", "function patchProperty(obj, prop, value) {\n obj[prop] = value;\n}", "function patchProperty(obj, prop, value) {\n obj[prop] = value;\n}", "function patchProperty(obj, prop, value) {\n obj[prop] = value;\n}", "function patchProperty(obj, prop, value) {\n obj[prop] = value;\n}", "function patchProperty(obj, prop, value) {\n obj[prop] = value;\n}", "function patchProperty(obj, prop, value) {\n obj[prop] = value;\n}", "function patchProperty(obj, prop, value) {\n obj[prop] = value;\n}", "function patchProperty(obj, prop, value) {\n obj[prop] = value;\n}", "function patchProperty(obj, prop, value) {\n obj[prop] = value;\n}", "function patchProperty(obj, prop, value) {\n obj[prop] = value;\n}", "function patchProperty(obj, prop, value) {\n obj[prop] = value;\n}", "function patchProperty(obj, prop, value) {\n obj[prop] = value;\n}", "function patchProperty(obj, prop, value) {\n obj[prop] = value;\n}", "function patchProperty(obj, prop, value) {\n obj[prop] = value;\n}", "function patchProperty(obj, prop, value) {\n obj[prop] = value;\n}", "function patchProperty(obj, prop, value) {\r\n obj[prop] = value;\r\n}", "function patchProperty(obj, prop, value) {\r\n obj[prop] = value;\r\n}", "function patchProperty(obj, prop, value) {\r\n obj[prop] = value;\r\n}", "function patchProperty(obj, prop, value) {\n\t obj[prop] = value;\n\t}", "setProperty(name, value) {\n const oldValue = this._properties[name];\n\n if (value !== oldValue) {\n this._properties[name] = value;\n\n this._conference.eventEmitter.emit(_JitsiConferenceEvents__WEBPACK_IMPORTED_MODULE_2__[\"PARTICIPANT_PROPERTY_CHANGED\"], this, name, oldValue, value);\n }\n }", "function assignProperty(obj, property, value) {\n while (obj !== null) {\n if (obj.hasOwnProperty(property)) {\n obj[property] = value;\n break;\n }\n obj = Object.getPrototypeOf(obj);\n }\n}", "set property(value) {\n // now check if the property value has changed, which will depend\n // on the final Property type\n\n if (this.property === null && value !== null) {\n // this is the first time we are setting a value to the property\n this._changed = true;\n this._previousValue = {};\n\n } else if (this.property !== null && !this.isEqual(this.property, value)) {\n this._previousValue = super.property;\n this._changed = true;\n }\n\n // finally capture the current value in the base Prototype\n super.property = value;\n }", "function assignProperty(obj, property, value) {\n while (obj !== null) {\n if (obj.hasOwnProperty(property)) {\n obj[property] = value;\n break;\n }\n\n obj = Object.getPrototypeOf(obj);\n }\n}", "function _set(property, value) {\n var stringValue = value === null ? \"\" : value.toString();\n (0, _kolmafia.setProperty)(property, stringValue);\n}", "function setProperty(obj, propertyName, value) {\n var parts = propertyName.split( \".\" ),\n prop = parts.shift();\n\n if(parts.length == 0) {\n obj[prop] = value;\n } else {\n if(typeof obj[prop] == \"undefined\") {\n obj[prop] = {};\n }\n setProperty(obj[prop], parts.join(\".\"), value);\n }\n}", "function set(obj, prop, val){\n\t var parts = (/^(.+)\\.(.+)$/).exec(prop);\n\t if (parts){\n\t namespace(obj, parts[1])[parts[2]] = val;\n\t } else {\n\t obj[prop] = val;\n\t }\n\t }", "function setProperty(property, value)\r\n{\r\n if (\"undefined\" != typeof(property))\r\n {\r\n property = value;\r\n return true;\r\n }\r\n\r\n return false;\r\n}", "function set(obj, prop, val){\n var parts = (/^(.+)\\.(.+)$/).exec(prop);\n if (parts){\n namespace(obj, parts[1])[parts[2]] = val;\n } else {\n obj[prop] = val;\n }\n }", "function set(obj, prop, val){\n var parts = (/^(.+)\\.(.+)$/).exec(prop);\n if (parts){\n namespace(obj, parts[1])[parts[2]] = val;\n } else {\n obj[prop] = val;\n }\n }", "function setObjectProperty(O_obj, str_objProperty, arb_val) {\n O_obj[str_objProperty] = arb_val;\n}", "set(property, newValue) {\n // if property is a string, set a single property\n if (typeof property === \"string\") {\n // forget it if the newValue is our current value\n const currentValue = this.get(property);\n if (newValue === currentValue || (newValue === undefined && !this.state)) return;\n\n // if setting to `undefined`, clear the state property and call forceUpdate manually\n if (newValue === undefined) {\n delete this.state[property];\n this.forceUpdate();\n }\n else {\n this.setState({ [property]: newValue });\n }\n }\n // otherwise assume that property is a map and set each item in the map\n else {\n Object.keys(property).forEach( key => this.set(key, property[key]) );\n }\n }", "setItemProperty(key, prop, value) {\n let item = this.retrieveItem(key)\n\n if (item === null) return\n // TODO: Alternatively we could throw an error or log this...\n // Fail silently for now, it shouldn't pose any issues\n\n //if (item.hasOwnProperty(prop)) {\n // TODO: Maybe a notification that we are setting a property that doesn't exist?\n item[prop] = value\n //}\n }", "function set(obj, prop, val){\n var stringifiedProp = prop.toString();\n // prototype pollution mitigation\n if(stringifiedProp.includes('__proto__') || stringifiedProp.includes('prototype') || stringifiedProp.includes('constructor')) {\n return false;\n }\n var parts = (/^(.+)\\.(.+)$/).exec(stringifiedProp);\n if (parts){\n namespace(obj, parts[1])[parts[2]] = val;\n } else {\n obj[stringifiedProp] = val;\n }\n }", "set(property, value) {\n return new Promise((resolve, reject) => {\n if (property === '_title') {\n // Simulate IO with 1 second delay.\n setTimeout(() => {\n let previousValue = this[property];\n this[property] = value;\n // Set title to new value no matter what.\n if (typeof previousValue === 'undefined') {\n resolve(`Updated Title to ${this.title}.`);\n } else {\n resolve(`Updated Title from '${previousValue}' to '${this.title}'.`);\n }\n }, 1000);\n } else if (property === '_author') {\n // Simulate IO with 1 second delay.\n setTimeout(() => {\n let previousValue = this[property];\n // Set author to new value, if no author property is defined.\n if (typeof previousValue === 'undefined') {\n this[property] = value;\n resolve(`Updated Title to ${this.title}.`);\n } else {\n // If author is already defined, reject update\n // and throw new Error.\n reject(new Error(`Cannot update Author from ${previousValue} to ${value}.`));\n }\n }, 1000);\n }\n });\n }", "function setup_property(obj, prop, opts, failsafe) {\n\ttry {\n\t\t_setup_property(obj, prop, opts);\n\t} catch (err) {\n\t\tobj[prop] = failsafe;\n\t}\n}", "set(property, value) {\n return this[property] = value;\n }", "function track(property, thisArg){\n if(!(property in trackedProperties)){\n trackedProperties[property] = true;\n values[property] = model[property];\n Object.defineProperty(model, property, {\n get: function () { return values[property]; },\n set: function(newValue) {\n var oldValue = values[property];\n values[property] = newValue;\n getListeners(property).forEach(function(callback){\n callback.call(thisArg, newValue, oldValue);\n });\n }\n });\n }\n }", "setGenericProperty(objName, prop, value) {\n if (!objName || !prop) return;\n const elem = this.getElemFromName(objName);\n if (elem.length < 1) return;\n const model = elem.attr(\"class\").split(\" \").pop();\n if (model) {\n try {\n com.fc.JavaScriptDistLib[model].setProperty[prop](objName, value);\n } catch (err) {\n console.warn(\"Could not set \" + prop + \" to \" + objName);\n }\n } else {\n try {\n this.setProperty[prop](objName, value);\n } catch (err) {\n console.warn(\"Could not set \" + prop + \" to \" + objName);\n }\n }\n }", "set(target, prop, val) {\r\n target[prop] = val;\r\n return true;\r\n }", "set(target, prop, val) {\r\n target[prop] = val;\r\n return true;\r\n }", "set(target, prop, val) {\r\n target[prop] = val;\r\n return true;\r\n }", "static set property(){}", "function Property$addChanged(prop, handler, obj, toleratePartial) {\n if (obj === void 0) { obj = null; }\n if (toleratePartial === void 0) { toleratePartial = false; }\n if (prop instanceof Property) {\n Property$_addChangedHandler(prop, handler, obj);\n }\n else if (prop instanceof PropertyChain) {\n PropertyChain$_addChangedHandler(prop, handler, obj, toleratePartial);\n }\n else {\n throw new Error(\"Invalid property passed to `Property$addChanged(prop)`.\");\n }\n}", "function set (obj, key, val) {\n if (Array.isArray(obj)) {\n obj.splice(key, 1, val);\n return val\n }\n if (hasOwn(obj, key)) {\n obj[key] = val;\n return\n }\n var ob = obj.__ob__;\n if (obj._isVue || (ob && ob.vmCount)) {\n \"development\" !== 'production' && warn(\n 'Avoid adding reactive properties to a Vue instance or its root $data ' +\n 'at runtime - declare it upfront in the data option.'\n );\n return\n }\n if (!ob) {\n obj[key] = val;\n return\n }\n defineReactive$$1(ob.value, key, val);\n ob.dep.notify();\n return val\n}", "function setPropertyByPath(obj, path, value, throwErr) {\n if (throwErr === void 0) { throwErr = true; }\n var objPath = getObjectPath(path);\n var obj = getPropertyByPath(obj, objPath, throwErr);\n var propName = getPropertyName(path);\n // TODO: Allow adding properties?\n if (!(propName in obj) && throwErr) {\n throw new Error(xp.formatString('Unable to set property value \"{0}\" by path \"{1}\". Property is unreachable.', value, path));\n }\n obj[propName] = value;\n }", "function updateProperty(index) {\n var prop = properties[index];\n if (prop === Undefined)\n return;\n\n if (prop.update) {\n prop.update();\n return;\n }\n\n if (!prop.binding)\n return;\n\n prop.val = prop.binding();\n prop.changedSignal(prop.val);\n\n if (!prop.dontCallUpdaters)\n for (i in prop.dependantProperties)\n updateProperty(prop.dependantProperties[i]);\n}", "function set (obj, key, val) {\n\t if (Array.isArray(obj)) {\n\t obj.splice(key, 1, val);\n\t return val\n\t }\n\t if (hasOwn(obj, key)) {\n\t obj[key] = val;\n\t return\n\t }\n\t var ob = obj.__ob__;\n\t if (obj._isVue || (ob && ob.vmCount)) {\n\t \"development\" !== 'production' && warn(\n\t 'Avoid adding reactive properties to a Vue instance or its root $data ' +\n\t 'at runtime - declare it upfront in the data option.'\n\t );\n\t return\n\t }\n\t if (!ob) {\n\t obj[key] = val;\n\t return\n\t }\n\t defineReactive$$1(ob.value, key, val);\n\t ob.dep.notify();\n\t return val\n\t}", "function objectSetPropertyIfUnset(object, property, value) {\n if (!arrayContains(Object.keys(object), property)) {\n object[property] = value;\n }\n}", "function updateProperty(selected) {\n // Ignore selected elements which don't have this property\n if (selected[property] !== undefined) {\n // Check if this is a setter, or just assignable\n if (typeof selected[property] === 'function') {\n changed =\n changed || (selected[property]() !== val);\n selected[property](val);\n } else {\n changed =\n changed || (selected[property] !== val);\n selected[property] = val;\n }\n }\n }", "set(property, value) {\n if(this.makeGlobal) {\n window[property] = value\n }\n this.parent[property] = value\n }", "function set (obj, key, val) {\n if (Array.isArray(obj)) {\n obj.length = Math.max(obj.length, key);\n obj.splice(key, 1, val);\n return val\n }\n if (hasOwn(obj, key)) {\n obj[key] = val;\n return\n }\n var ob = obj.__ob__;\n if (obj._isVue || (ob && ob.vmCount)) {\n process.env.NODE_ENV !== 'production' && warn(\n 'Avoid adding reactive properties to a Vue instance or its root $data ' +\n 'at runtime - declare it upfront in the data option.'\n );\n return\n }\n if (!ob) {\n obj[key] = val;\n return\n }\n defineReactive$$1(ob.value, key, val);\n ob.dep.notify();\n return val\n}", "function set (obj, key, val) {\n if (Array.isArray(obj)) {\n obj.length = Math.max(obj.length, key);\n obj.splice(key, 1, val);\n return val\n }\n if (hasOwn(obj, key)) {\n obj[key] = val;\n return\n }\n var ob = obj.__ob__;\n if (obj._isVue || (ob && ob.vmCount)) {\n process.env.NODE_ENV !== 'production' && warn(\n 'Avoid adding reactive properties to a Vue instance or its root $data ' +\n 'at runtime - declare it upfront in the data option.'\n );\n return\n }\n if (!ob) {\n obj[key] = val;\n return\n }\n defineReactive$$1(ob.value, key, val);\n ob.dep.notify();\n return val\n}", "function setProperty(path, obj, val) {\n var parts = path.split('.'),\n last = parts.pop(),\n part;\n\n /* jshint boss: true */\n while (part = parts.shift()) { // assignment\n // rewrite property if it exists but is not an object\n obj = obj[part] = obj[part] instanceof Object ?\n obj[part] : {};\n }\n\n obj[last] = val;\n}", "function set (obj, key, val) {\n\t if (Array.isArray(obj)) {\n\t obj.length = Math.max(obj.length, key);\n\t obj.splice(key, 1, val);\n\t return val\n\t }\n\t if (hasOwn(obj, key)) {\n\t obj[key] = val;\n\t return\n\t }\n\t var ob = obj.__ob__;\n\t if (obj._isVue || (ob && ob.vmCount)) {\n\t \"development\" !== 'production' && warn(\n\t 'Avoid adding reactive properties to a Vue instance or its root $data ' +\n\t 'at runtime - declare it upfront in the data option.'\n\t );\n\t return\n\t }\n\t if (!ob) {\n\t obj[key] = val;\n\t return\n\t }\n\t defineReactive$$1(ob.value, key, val);\n\t ob.dep.notify();\n\t return val\n\t}", "function set(obj, key, val) {\n if (Array.isArray(obj)) {\n obj.splice(key, 1, val);\n return val;\n }\n if (hasOwn(obj, key)) {\n obj[key] = val;\n return;\n }\n var ob = obj.__ob__;\n if (obj._isVue || ob && ob.vmCount) {\n process.env.NODE_ENV !== 'production' && warn('Avoid adding reactive properties to a Vue instance or its root $data ' + 'at runtime - delcare it upfront in the data option.');\n return;\n }\n if (!ob) {\n obj[key] = val;\n return;\n }\n defineReactive(ob.value, key, val);\n ob.dep.notify();\n return val;\n}", "addProperty(name, value) {\n this._properties[name] = value;\n }", "function set(obj, key, val) {\n\t\t if (Array.isArray(obj)) {\n\t\t obj.splice(key, 1, val);\n\t\t return val;\n\t\t }\n\t\t if (hasOwn(obj, key)) {\n\t\t obj[key] = val;\n\t\t return;\n\t\t }\n\t\t var ob = obj.__ob__;\n\t\t if (obj._isVue || ob && ob.vmCount) {\n\t\t (\"production\") !== 'production' && warn('Avoid adding reactive properties to a Vue instance or its root $data ' + 'at runtime - delcare it upfront in the data option.');\n\t\t return;\n\t\t }\n\t\t if (!ob) {\n\t\t obj[key] = val;\n\t\t return;\n\t\t }\n\t\t defineReactive(ob.value, key, val);\n\t\t ob.dep.notify();\n\t\t return val;\n\t\t}", "function set (obj, key, val) {\n\t if (Array.isArray(obj)) {\n\t obj.length = Math.max(obj.length, key);\n\t obj.splice(key, 1, val);\n\t return val\n\t }\n\t if (hasOwn(obj, key)) {\n\t obj[key] = val;\n\t return\n\t }\n\t var ob = obj.__ob__;\n\t if (obj._isVue || (ob && ob.vmCount)) {\n\t process.env.NODE_ENV !== 'production' && warn(\n\t 'Avoid adding reactive properties to a Vue instance or its root $data ' +\n\t 'at runtime - declare it upfront in the data option.'\n\t );\n\t return\n\t }\n\t if (!ob) {\n\t obj[key] = val;\n\t return\n\t }\n\t defineReactive$$1(ob.value, key, val);\n\t ob.dep.notify();\n\t return val\n\t}", "function set (obj, key, val) {\n\t if (Array.isArray(obj)) {\n\t obj.splice(key, 1, val)\n\t return val\n\t }\n\t if (hasOwn(obj, key)) {\n\t obj[key] = val\n\t return\n\t }\n\t var ob = obj.__ob__\n\t if (obj._isVue || (ob && ob.vmCount)) {\n\t process.env.NODE_ENV !== 'production' && warn(\n\t 'Avoid adding reactive properties to a Vue instance or its root $data ' +\n\t 'at runtime - declare it upfront in the data option.'\n\t )\n\t return\n\t }\n\t if (!ob) {\n\t obj[key] = val\n\t return\n\t }\n\t defineReactive$$1(ob.value, key, val)\n\t ob.dep.notify()\n\t return val\n\t}", "function setStorage(property, value) {\r\n if (typeof property !== 'string' && typeof property !== 'number') {\r\n throw new Error('Property argument must be a string or number to set a specific property');\r\n }\r\n return new Deferred(\r\n createPromisefunction('set', {\r\n 'property': property,\r\n 'value': value\r\n })\r\n );\r\n }", "function addWatcherForObjectProperty(objectProperty) {\n $scope.$watch('fabric.selectedObject.' + objectProperty, function(newVal) {\n $scope.fabric.setActiveObjectProperty(objectProperty, newVal);\n $scope.fabric.render();\n });\n }", "function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}", "function addProperty(obj, property, modulePath) {\n // Add properties as getter to delay load the modules on first invocation\n Object.defineProperty(obj, property, {\n configurable: true,\n get: function () {\n var module = require(modulePath);\n // We do not need the getter any more\n obj[property] = module;\n return module;\n }\n });\n}", "function setProperty(target, key, value, receiver, isInitializing) {\n if (main.isDeferred && !isInitializing) {\n enqueue(function () {\n __PS_MV_REG = [];\n return setProperty(target, key, value, receiver, true);\n });\n __PS_MV_REG = [];\n return true;\n };\n if (main.debug) {\n console.log('setProperty', arguments);\n };\n var context = TARGETCONTEXTMAP.get(target);\n var isSetter = value !== undefined;\n var isChanged = target[key] !== value;\n var descriptors = context[key];\n var node = null;\n var type = null;\n var _js20 = descriptors.length;\n for (var _js19 = 0; _js19 < _js20; _js19 += 1) {\n var descriptor = descriptors[_js19];\n node = descriptor.node;\n type = descriptor.type;\n if (Object.prototype.hasOwnProperty.call(context, key) && (isChanged || isInitializing)) {\n if (type in PROPERTYHANDLERS && typeof value !== 'function') {\n PROPERTYHANDLERS[type](node, descriptor.name, value);\n } else {\n if (type === CONTEXTEVENT) {\n setEvent(target, value, descriptor, receiver);\n };\n if (type === CONTEXTSLOT) {\n var proxy = setSlot(target, key, value, descriptor, isInitializing);\n if (proxy) {\n __PS_MV_REG = [];\n return Reflect.set(target, key, proxy, receiver);\n };\n };\n };\n };\n if (type === CONTEXTVALUE && !descriptor.isListening) {\n node.addEventListener('input', function (event) {\n return Reflect.set(target, key, event.target.value, receiver);\n });\n descriptor.isListening = true;\n };\n };\n if (isSetter) {\n Reflect.set(target, key, value, receiver);\n } else {\n delete target[key];\n };\n __PS_MV_REG = [];\n return true;\n}", "setProp(obj, index, value) {\n return this._propSetters[index](obj, value);\n }", "function set$1 (obj, key, val) {\n if (Array.isArray(obj)) {\n obj.length = Math.max(obj.length, key);\n obj.splice(key, 1, val);\n return val\n }\n if (hasOwn(obj, key)) {\n obj[key] = val;\n return\n }\n var ob = obj.__ob__;\n if (obj._isVue || (ob && ob.vmCount)) {\n \"development\" !== 'production' && warn(\n 'Avoid adding reactive properties to a Vue instance or its root $data ' +\n 'at runtime - declare it upfront in the data option.'\n );\n return\n }\n if (!ob) {\n obj[key] = val;\n return\n }\n defineReactive$$1(ob.value, key, val);\n ob.dep.notify();\n return val\n}", "function set$1 (obj, key, val) {\n if (Array.isArray(obj)) {\n obj.length = Math.max(obj.length, key);\n obj.splice(key, 1, val);\n return val\n }\n if (hasOwn(obj, key)) {\n obj[key] = val;\n return\n }\n var ob = obj.__ob__;\n if (obj._isVue || (ob && ob.vmCount)) {\n \"development\" !== 'production' && warn(\n 'Avoid adding reactive properties to a Vue instance or its root $data ' +\n 'at runtime - declare it upfront in the data option.'\n );\n return\n }\n if (!ob) {\n obj[key] = val;\n return\n }\n defineReactive$$1(ob.value, key, val);\n ob.dep.notify();\n return val\n}", "function set$1 (obj, key, val) {\n if (Array.isArray(obj)) {\n obj.length = Math.max(obj.length, key);\n obj.splice(key, 1, val);\n return val\n }\n if (hasOwn(obj, key)) {\n obj[key] = val;\n return\n }\n var ob = obj.__ob__;\n if (obj._isVue || (ob && ob.vmCount)) {\n process.env.NODE_ENV !== 'production' && warn(\n 'Avoid adding reactive properties to a Vue instance or its root $data ' +\n 'at runtime - declare it upfront in the data option.'\n );\n return\n }\n if (!ob) {\n obj[key] = val;\n return\n }\n defineReactive$$1(ob.value, key, val);\n ob.dep.notify();\n return val\n}", "function set$1 (obj, key, val) {\n if (Array.isArray(obj)) {\n obj.length = Math.max(obj.length, key);\n obj.splice(key, 1, val);\n return val\n }\n if (hasOwn(obj, key)) {\n obj[key] = val;\n return\n }\n var ob = obj.__ob__;\n if (obj._isVue || (ob && ob.vmCount)) {\n process.env.NODE_ENV !== 'production' && warn(\n 'Avoid adding reactive properties to a Vue instance or its root $data ' +\n 'at runtime - declare it upfront in the data option.'\n );\n return\n }\n if (!ob) {\n obj[key] = val;\n return\n }\n defineReactive$$1(ob.value, key, val);\n ob.dep.notify();\n return val\n}", "function defineProperty(on, name, value) {\r\n try {\r\n Object.defineProperty(on, name, {\r\n value: value,\r\n writable: true,\r\n configurable: true,\r\n enumerable: false\r\n });\r\n } catch (e) { // for browsers that don't support Object.defineProperty\r\n on[name] = value;\r\n }\r\n}", "function wrapproperty(obj, prop, message) {\n if (!obj || typeof obj !== 'object' && typeof obj !== 'function') {\n throw new TypeError('argument obj must be object');\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(obj, prop);\n\n if (!descriptor) {\n throw new TypeError('must call property on owner object');\n }\n\n if (!descriptor.configurable) {\n throw new TypeError('property must be configurable');\n }\n\n var deprecate = this;\n var stack = getStack();\n var site = callSiteLocation(stack[1]); // set site name\n\n site.name = prop; // convert data descriptor\n\n if ('value' in descriptor) {\n descriptor = convertDataDescriptorToAccessor(obj, prop, message);\n }\n\n var get = descriptor.get;\n var set = descriptor.set; // wrap getter\n\n if (typeof get === 'function') {\n descriptor.get = function getter() {\n log.call(deprecate, message, site);\n return get.apply(this, arguments);\n };\n } // wrap setter\n\n\n if (typeof set === 'function') {\n descriptor.set = function setter() {\n log.call(deprecate, message, site);\n return set.apply(this, arguments);\n };\n }\n\n Object.defineProperty(obj, prop, descriptor);\n}", "function addProperty(property) {\r\n\t\t\tvar i, length = aProperties.length;\r\n\t\t\tfor(i = 0; i < length; i++) {\r\n\t\t\t\tif (aProperties[i] === property) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\taProperties.push(property);\r\n\t\t}", "function define_property(obj, propertyname, func){\n\t\tif( Object.defineProperty ){\n\t\t\tObject.defineProperty( obj, propertyname, { get: func });\n\t\t} else {\n\t\t\tobj.__defineGetter__(propertyname, func);\n\t\t}\n\t}", "function set$1 (obj, key, val) {\n\t if (Array.isArray(obj)) {\n\t obj.length = Math.max(obj.length, key);\n\t obj.splice(key, 1, val);\n\t return val\n\t }\n\t if (hasOwn(obj, key)) {\n\t obj[key] = val;\n\t return\n\t }\n\t var ob = obj.__ob__;\n\t if (obj._isVue || (ob && ob.vmCount)) {\n\t process.env.NODE_ENV !== 'production' && warn(\n\t 'Avoid adding reactive properties to a Vue instance or its root $data ' +\n\t 'at runtime - declare it upfront in the data option.'\n\t );\n\t return\n\t }\n\t if (!ob) {\n\t obj[key] = val;\n\t return\n\t }\n\t defineReactive$$1(ob.value, key, val);\n\t ob.dep.notify();\n\t return val\n\t}", "setIntercomProperty(property, value) {\n\t\tif (this._intercom) this._intercomSettings[property] = value;\n\t}", "set (obj, prop, value) {\n let store = obj.store;\n let setStore = controller.setState.bind ({controller, store});\n setStore ({[prop]: value});\n\n return true;\n }", "set propertyPath(value) {}", "set( property ) { \n\n \n var currentClass = this,\n guard = this.guard();\n\n Object.keys(property).forEach(function(key) {\n if(!guard.includes(key))\n eval(`currentClass.${key} = property[[key]]`);\n }) \n }", "function onValue(object, property, callback) {\n Object.defineProperty(object, property, {\n enumerable: true,\n configurable: true,\n get: function () { return; },\n set: function (v) {\n Object.defineProperty(object, property, {\n enumerable: true,\n configurable: true,\n value: v\n });\n // Protect from callback errors.\n try {\n callback(v);\n } catch (e) {\n console.error(\"Error trying to invoke callback for %s: %o\", property, e);\n }\n }\n });\n }", "function wrapproperty(obj, prop, message) {\n if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n throw new TypeError('argument obj must be object')\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(obj, prop)\n\n if (!descriptor) {\n throw new TypeError('must call property on owner object')\n }\n\n if (!descriptor.configurable) {\n throw new TypeError('property must be configurable')\n }\n\n var deprecate = this\n var stack = getStack()\n var site = callSiteLocation(stack[1])\n\n // set site name\n site.name = prop\n\n // convert data descriptor\n if ('value' in descriptor) {\n descriptor = convertDataDescriptorToAccessor(obj, prop, message)\n }\n\n var get = descriptor.get\n var set = descriptor.set\n\n // wrap getter\n if (typeof get === 'function') {\n descriptor.get = function getter() {\n log.call(deprecate, message, site)\n return get.apply(this, arguments)\n }\n }\n\n // wrap setter\n if (typeof set === 'function') {\n descriptor.set = function setter() {\n log.call(deprecate, message, site)\n return set.apply(this, arguments)\n }\n }\n\n Object.defineProperty(obj, prop, descriptor)\n}", "function wrapproperty(obj, prop, message) {\n if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n throw new TypeError('argument obj must be object')\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(obj, prop)\n\n if (!descriptor) {\n throw new TypeError('must call property on owner object')\n }\n\n if (!descriptor.configurable) {\n throw new TypeError('property must be configurable')\n }\n\n var deprecate = this\n var stack = getStack()\n var site = callSiteLocation(stack[1])\n\n // set site name\n site.name = prop\n\n // convert data descriptor\n if ('value' in descriptor) {\n descriptor = convertDataDescriptorToAccessor(obj, prop, message)\n }\n\n var get = descriptor.get\n var set = descriptor.set\n\n // wrap getter\n if (typeof get === 'function') {\n descriptor.get = function getter() {\n log.call(deprecate, message, site)\n return get.apply(this, arguments)\n }\n }\n\n // wrap setter\n if (typeof set === 'function') {\n descriptor.set = function setter() {\n log.call(deprecate, message, site)\n return set.apply(this, arguments)\n }\n }\n\n Object.defineProperty(obj, prop, descriptor)\n}", "function wrapproperty(obj, prop, message) {\n if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n throw new TypeError('argument obj must be object')\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(obj, prop)\n\n if (!descriptor) {\n throw new TypeError('must call property on owner object')\n }\n\n if (!descriptor.configurable) {\n throw new TypeError('property must be configurable')\n }\n\n var deprecate = this\n var stack = getStack()\n var site = callSiteLocation(stack[1])\n\n // set site name\n site.name = prop\n\n // convert data descriptor\n if ('value' in descriptor) {\n descriptor = convertDataDescriptorToAccessor(obj, prop, message)\n }\n\n var get = descriptor.get\n var set = descriptor.set\n\n // wrap getter\n if (typeof get === 'function') {\n descriptor.get = function getter() {\n log.call(deprecate, message, site)\n return get.apply(this, arguments)\n }\n }\n\n // wrap setter\n if (typeof set === 'function') {\n descriptor.set = function setter() {\n log.call(deprecate, message, site)\n return set.apply(this, arguments)\n }\n }\n\n Object.defineProperty(obj, prop, descriptor)\n}", "function wrapproperty(obj,prop,message){if(!obj||(typeof obj==='undefined'?'undefined':(0,_typeof3.default)(obj))!=='object'&&typeof obj!=='function'){throw new TypeError('argument obj must be object');}var descriptor=(0,_getOwnPropertyDescriptor2.default)(obj,prop);if(!descriptor){throw new TypeError('must call property on owner object');}if(!descriptor.configurable){throw new TypeError('property must be configurable');}}", "function set(target, propertyKey, V /* , receiver */) {\n\t var receiver = arguments.length < 4 ? target : arguments[3];\n\t var ownDesc = _objectGopd.f(_anObject(target), propertyKey);\n\t var existingDescriptor, proto;\n\t if (!ownDesc) {\n\t if (_isObject(proto = _objectGpo(target))) {\n\t return set(proto, propertyKey, V, receiver);\n\t }\n\t ownDesc = _propertyDesc(0);\n\t }\n\t if (_has(ownDesc, 'value')) {\n\t if (ownDesc.writable === false || !_isObject(receiver)) return false;\n\t if (existingDescriptor = _objectGopd.f(receiver, propertyKey)) {\n\t if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false;\n\t existingDescriptor.value = V;\n\t _objectDp.f(receiver, propertyKey, existingDescriptor);\n\t } else _objectDp.f(receiver, propertyKey, _propertyDesc(0, V));\n\t return true;\n\t }\n\t return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true);\n\t}", "set(definingType, propertyName, value) {\r\n let baseName = definingType.prototype.baseName;\r\n let collection = this.properties[baseName];\r\n if (!collection) {\r\n collection = this.properties[baseName] = {};\r\n }\r\n // Do not store direct references to objects.\r\n if (value instanceof MUDObject) {\r\n value = wrap(value);\r\n }\r\n collection[propertyName] = value;\r\n return true;\r\n }", "function set$1(obj, key, val) {\n\t if (Array.isArray(obj)) {\n\t obj.length = Math.max(obj.length, key);\n\t obj.splice(key, 1, val);\n\t return val;\n\t }\n\t if (hasOwn(obj, key)) {\n\t obj[key] = val;\n\t return;\n\t }\n\t var ob = obj.__ob__;\n\t if (obj._isVue || ob && ob.vmCount) {\n\t process.env.NODE_ENV !== 'production' && warn('Avoid adding reactive properties to a Vue instance or its root $data ' + 'at runtime - declare it upfront in the data option.');\n\t return;\n\t }\n\t if (!ob) {\n\t obj[key] = val;\n\t return;\n\t }\n\t defineReactive$$1(ob.value, key, val);\n\t ob.dep.notify();\n\t return val;\n\t}", "function change(obj, prop, val) {\n let orig = obj[prop];\n obj[prop] = typeof val == \"function\" ? val(orig) : val;\n unload(function() obj[prop] = orig, window);\n }", "_redefineProperty(propertyName) {\n const that = this;\n\n Object.defineProperty(that, propertyName, {\n get: function () {\n return that.properties[propertyName].value;\n },\n set(value) {\n function replacer(key, value) {\n if (value instanceof JQX.Utilities.BigNumber) {\n return value.toString();\n }\n\n return value;\n }\n\n const oldValue = that.properties[propertyName].value,\n stringifiedOldValue = JSON.stringify(oldValue, replacer),\n stringifiedValue = JSON.stringify(value, replacer);\n\n if (stringifiedOldValue === stringifiedValue) {\n return;\n }\n\n that.properties[propertyName].value = value;\n\n if (that.isReady && (!that.ownerElement || (that.ownerElement && that.ownerElement.isReady)) && that.context !== that) {\n const context = that.context;\n\n that.context = that;\n that.propertyChangedHandler(propertyName, oldValue, value);\n that.context = context;\n }\n }\n });\n }", "changeProp (propertyToSet, cssProp, context, val) {\n if (cssProp) {\n let cssObject = this.state.css;\n cssObject[cssProp] = val;\n this.setState({ css : cssObject });\n } else {\n this.setState({ [propertyToSet] : val });\n }\n }", "changeProp (propertyToSet, cssProp, context, val) {\n if (cssProp) {\n let cssObject = this.state.css;\n cssObject[cssProp] = val;\n this.setState({ css : cssObject });\n } else {\n this.setState({ [propertyToSet] : val });\n }\n }", "function wrapproperty (obj, prop, message) {\n if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n throw new TypeError('argument obj must be object')\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(obj, prop)\n\n if (!descriptor) {\n throw new TypeError('must call property on owner object')\n }\n\n if (!descriptor.configurable) {\n throw new TypeError('property must be configurable')\n }\n\n var deprecate = this\n var stack = getStack()\n var site = callSiteLocation(stack[1])\n\n // set site name\n site.name = prop\n\n // convert data descriptor\n if ('value' in descriptor) {\n descriptor = convertDataDescriptorToAccessor(obj, prop, message)\n }\n\n var get = descriptor.get\n var set = descriptor.set\n\n // wrap getter\n if (typeof get === 'function') {\n descriptor.get = function getter () {\n log.call(deprecate, message, site)\n return get.apply(this, arguments)\n }\n }\n\n // wrap setter\n if (typeof set === 'function') {\n descriptor.set = function setter () {\n log.call(deprecate, message, site)\n return set.apply(this, arguments)\n }\n }\n\n Object.defineProperty(obj, prop, descriptor)\n}", "function wrapproperty (obj, prop, message) {\n if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n throw new TypeError('argument obj must be object')\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(obj, prop)\n\n if (!descriptor) {\n throw new TypeError('must call property on owner object')\n }\n\n if (!descriptor.configurable) {\n throw new TypeError('property must be configurable')\n }\n\n var deprecate = this\n var stack = getStack()\n var site = callSiteLocation(stack[1])\n\n // set site name\n site.name = prop\n\n // convert data descriptor\n if ('value' in descriptor) {\n descriptor = convertDataDescriptorToAccessor(obj, prop, message)\n }\n\n var get = descriptor.get\n var set = descriptor.set\n\n // wrap getter\n if (typeof get === 'function') {\n descriptor.get = function getter () {\n log.call(deprecate, message, site)\n return get.apply(this, arguments)\n }\n }\n\n // wrap setter\n if (typeof set === 'function') {\n descriptor.set = function setter () {\n log.call(deprecate, message, site)\n return set.apply(this, arguments)\n }\n }\n\n Object.defineProperty(obj, prop, descriptor)\n}", "function wrapproperty (obj, prop, message) {\n if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n throw new TypeError('argument obj must be object')\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(obj, prop)\n\n if (!descriptor) {\n throw new TypeError('must call property on owner object')\n }\n\n if (!descriptor.configurable) {\n throw new TypeError('property must be configurable')\n }\n\n var deprecate = this\n var stack = getStack()\n var site = callSiteLocation(stack[1])\n\n // set site name\n site.name = prop\n\n // convert data descriptor\n if ('value' in descriptor) {\n descriptor = convertDataDescriptorToAccessor(obj, prop, message)\n }\n\n var get = descriptor.get\n var set = descriptor.set\n\n // wrap getter\n if (typeof get === 'function') {\n descriptor.get = function getter () {\n log.call(deprecate, message, site)\n return get.apply(this, arguments)\n }\n }\n\n // wrap setter\n if (typeof set === 'function') {\n descriptor.set = function setter () {\n log.call(deprecate, message, site)\n return set.apply(this, arguments)\n }\n }\n\n Object.defineProperty(obj, prop, descriptor)\n}", "function wrapproperty (obj, prop, message) {\n if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n throw new TypeError('argument obj must be object')\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(obj, prop)\n\n if (!descriptor) {\n throw new TypeError('must call property on owner object')\n }\n\n if (!descriptor.configurable) {\n throw new TypeError('property must be configurable')\n }\n\n var deprecate = this\n var stack = getStack()\n var site = callSiteLocation(stack[1])\n\n // set site name\n site.name = prop\n\n // convert data descriptor\n if ('value' in descriptor) {\n descriptor = convertDataDescriptorToAccessor(obj, prop, message)\n }\n\n var get = descriptor.get\n var set = descriptor.set\n\n // wrap getter\n if (typeof get === 'function') {\n descriptor.get = function getter () {\n log.call(deprecate, message, site)\n return get.apply(this, arguments)\n }\n }\n\n // wrap setter\n if (typeof set === 'function') {\n descriptor.set = function setter () {\n log.call(deprecate, message, site)\n return set.apply(this, arguments)\n }\n }\n\n Object.defineProperty(obj, prop, descriptor)\n}", "function wrapproperty (obj, prop, message) {\n if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n throw new TypeError('argument obj must be object')\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(obj, prop)\n\n if (!descriptor) {\n throw new TypeError('must call property on owner object')\n }\n\n if (!descriptor.configurable) {\n throw new TypeError('property must be configurable')\n }\n\n var deprecate = this\n var stack = getStack()\n var site = callSiteLocation(stack[1])\n\n // set site name\n site.name = prop\n\n // convert data descriptor\n if ('value' in descriptor) {\n descriptor = convertDataDescriptorToAccessor(obj, prop, message)\n }\n\n var get = descriptor.get\n var set = descriptor.set\n\n // wrap getter\n if (typeof get === 'function') {\n descriptor.get = function getter () {\n log.call(deprecate, message, site)\n return get.apply(this, arguments)\n }\n }\n\n // wrap setter\n if (typeof set === 'function') {\n descriptor.set = function setter () {\n log.call(deprecate, message, site)\n return set.apply(this, arguments)\n }\n }\n\n Object.defineProperty(obj, prop, descriptor)\n}", "function wrapproperty (obj, prop, message) {\n if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n throw new TypeError('argument obj must be object')\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(obj, prop)\n\n if (!descriptor) {\n throw new TypeError('must call property on owner object')\n }\n\n if (!descriptor.configurable) {\n throw new TypeError('property must be configurable')\n }\n\n var deprecate = this\n var stack = getStack()\n var site = callSiteLocation(stack[1])\n\n // set site name\n site.name = prop\n\n // convert data descriptor\n if ('value' in descriptor) {\n descriptor = convertDataDescriptorToAccessor(obj, prop, message)\n }\n\n var get = descriptor.get\n var set = descriptor.set\n\n // wrap getter\n if (typeof get === 'function') {\n descriptor.get = function getter () {\n log.call(deprecate, message, site)\n return get.apply(this, arguments)\n }\n }\n\n // wrap setter\n if (typeof set === 'function') {\n descriptor.set = function setter () {\n log.call(deprecate, message, site)\n return set.apply(this, arguments)\n }\n }\n\n Object.defineProperty(obj, prop, descriptor)\n}", "function wrapproperty (obj, prop, message) {\n if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n throw new TypeError('argument obj must be object')\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(obj, prop)\n\n if (!descriptor) {\n throw new TypeError('must call property on owner object')\n }\n\n if (!descriptor.configurable) {\n throw new TypeError('property must be configurable')\n }\n\n var deprecate = this\n var stack = getStack()\n var site = callSiteLocation(stack[1])\n\n // set site name\n site.name = prop\n\n // convert data descriptor\n if ('value' in descriptor) {\n descriptor = convertDataDescriptorToAccessor(obj, prop, message)\n }\n\n var get = descriptor.get\n var set = descriptor.set\n\n // wrap getter\n if (typeof get === 'function') {\n descriptor.get = function getter () {\n log.call(deprecate, message, site)\n return get.apply(this, arguments)\n }\n }\n\n // wrap setter\n if (typeof set === 'function') {\n descriptor.set = function setter () {\n log.call(deprecate, message, site)\n return set.apply(this, arguments)\n }\n }\n\n Object.defineProperty(obj, prop, descriptor)\n}", "function wrapproperty (obj, prop, message) {\n if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n throw new TypeError('argument obj must be object')\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(obj, prop)\n\n if (!descriptor) {\n throw new TypeError('must call property on owner object')\n }\n\n if (!descriptor.configurable) {\n throw new TypeError('property must be configurable')\n }\n\n var deprecate = this\n var stack = getStack()\n var site = callSiteLocation(stack[1])\n\n // set site name\n site.name = prop\n\n // convert data descriptor\n if ('value' in descriptor) {\n descriptor = convertDataDescriptorToAccessor(obj, prop, message)\n }\n\n var get = descriptor.get\n var set = descriptor.set\n\n // wrap getter\n if (typeof get === 'function') {\n descriptor.get = function getter () {\n log.call(deprecate, message, site)\n return get.apply(this, arguments)\n }\n }\n\n // wrap setter\n if (typeof set === 'function') {\n descriptor.set = function setter () {\n log.call(deprecate, message, site)\n return set.apply(this, arguments)\n }\n }\n\n Object.defineProperty(obj, prop, descriptor)\n}" ]
[ "0.75906134", "0.7324178", "0.7164509", "0.7164509", "0.7164509", "0.7164509", "0.7164509", "0.7164509", "0.7164509", "0.7164509", "0.7164509", "0.7164509", "0.7164509", "0.7164509", "0.7164509", "0.7164509", "0.7164509", "0.7164509", "0.71371394", "0.71371394", "0.71371394", "0.70350313", "0.6853625", "0.680945", "0.68025607", "0.67902046", "0.6788186", "0.6625732", "0.66144013", "0.6600414", "0.65370667", "0.65370667", "0.64986885", "0.64743453", "0.64413077", "0.64353734", "0.6382881", "0.6382258", "0.63610524", "0.62772256", "0.6272535", "0.62511706", "0.62511706", "0.62511706", "0.6250074", "0.62378687", "0.61829704", "0.6177943", "0.61721146", "0.61458206", "0.614265", "0.61410075", "0.6132014", "0.612568", "0.612568", "0.6110807", "0.61041415", "0.6098729", "0.6098203", "0.6092857", "0.60912216", "0.60842746", "0.60842174", "0.6073193", "0.6072889", "0.60657907", "0.60593295", "0.6050389", "0.6010172", "0.6010172", "0.59978384", "0.59978384", "0.59932613", "0.59708506", "0.5970349", "0.5954677", "0.59545", "0.5954283", "0.5953081", "0.5949951", "0.5936135", "0.5929241", "0.59180903", "0.59180903", "0.59180903", "0.591612", "0.59160453", "0.5913528", "0.591237", "0.59120816", "0.5911767", "0.5911362", "0.5911362", "0.59057754", "0.59057754", "0.59057754", "0.59057754", "0.59057754", "0.59057754", "0.59057754", "0.59057754" ]
0.0
-1
Delete a property and trigger change if necessary.
function del (target, key) { if (false ) {} if (Array.isArray(target) && isValidArrayIndex(key)) { target.splice(key, 1); return } var ob = (target).__ob__; if (target._isVue || (ob && ob.vmCount)) { false && false; return } if (!hasOwn(target, key)) { return } delete target[key]; if (!ob) { return } ob.dep.notify(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removeProperty(aProperty){\n let propIndex = this._indexOfProperty(aProperty);\n if(propIndex >= 0){\n this._properties.splice(propIndex, 1);\n\n }\n }", "deleteProperty(group, propertyIndex) {\n group.properties.splice(propertyIndex, 1);\n }", "function DeleteProperty(target, scope, name) {\n if(!(this instanceof DeleteProperty)) return new DeleteProperty(target, scope, name);\n else Write.call(this, target, scope);\n\n Object.defineProperties(this, {\n \"name\": {\n value: name\n },\n \"origin\": {\n value: (Object.prototype.hasOwnProperty.call(target, name) ? target[name] : undefined)\n },\n \"snapshot\": {\n value: (Object.prototype.hasOwnProperty.call(scope, name) ? scope[name] : undefined)\n }\n });\n\n // define commit\n Object.defineProperty(this, \"commit\", {value:function() {\n return (delete target[name]);\n }});\n // define rollback\n Object.defineProperty(this, \"rollback\", {value:function() {\n return (target[name]=this.snapshot);\n }});\n // define stat\n Object.defineProperty(this, \"stat\", {get:function() {\n return (Object.prototype.hasOwnProperty.call(target, name) ? target[name] : undefined)===value; // TODO\n }});\n // define diff\n Object.defineProperty(this, \"diff\", {get:function() {\n return (Object.prototype.hasOwnProperty.call(target, name) ? target[name] : undefined)===this.origin;\n }});\n\n\n }", "deleteProperty (obj, key) {\n if (!(key in obj)) return true\n del(obj, key)\n delete obj[key]\n return true\n }", "function del (target, key) {\n if (\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n }", "function del (target, key) {\n if (isUndef(target) || isPrimitive(target)\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n }", "function del (target, key) {\n if (isUndef(target) || isPrimitive(target)\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n }", "function del (target, key) {\n if (isUndef(target) || isPrimitive(target)\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n }", "function deleteStorage(property) {\r\n return new Deferred(\r\n createPromisefunction('delete', {\r\n 'property': property,\r\n 'value': null\r\n })\r\n );\r\n }", "function del (target, key) {\n if (\"debug\" !== 'production' &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n \"debug\" !== 'production' && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n }", "function del (target, key) {\n\t if (false\n\t ) {\n\t warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n\t }\n\t if (Array.isArray(target) && isValidArrayIndex(key)) {\n\t target.splice(key, 1);\n\t return\n\t }\n\t var ob = (target).__ob__;\n\t if (target._isVue || (ob && ob.vmCount)) {\n\t (\"production\") !== 'production' && warn(\n\t 'Avoid deleting properties on a Vue instance or its root $data ' +\n\t '- just set it to null.'\n\t );\n\t return\n\t }\n\t if (!hasOwn(target, key)) {\n\t return\n\t }\n\t delete target[key];\n\t if (!ob) {\n\t return\n\t }\n\t ob.dep.notify();\n\t}", "function del (target, key) {\r\n if (\"development\" !== 'production' &&\r\n (isUndef(target) || isPrimitive(target))\r\n ) {\r\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\r\n }\r\n if (Array.isArray(target) && isValidArrayIndex(key)) {\r\n target.splice(key, 1);\r\n return\r\n }\r\n var ob = (target).__ob__;\r\n if (target._isVue || (ob && ob.vmCount)) {\r\n \"development\" !== 'production' && warn(\r\n 'Avoid deleting properties on a Vue instance or its root $data ' +\r\n '- just set it to null.'\r\n );\r\n return\r\n }\r\n if (!hasOwn(target, key)) {\r\n return\r\n }\r\n delete target[key];\r\n if (!ob) {\r\n return\r\n }\r\n ob.dep.notify();\r\n}", "function DeleteProperty(sandbox, target, name) {\n if(!(this instanceof DeleteProperty)) return new DeleteProperty(sandbox, target, name);\n else Write.call(this, sandbox, target);\n\n Object.defineProperties(this, {\n \"name\": {\n value: name\n }\n });\n }", "function del (target, key) {\n if (false\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n \"production\" !== 'production' && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (false\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n \"production\" !== 'production' && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (false\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n \"production\" !== 'production' && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (false\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n \"production\" !== 'production' && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (false\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n \"production\" !== 'production' && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (false\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n \"production\" !== 'production' && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (false\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n \"production\" !== 'production' && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (false\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n \"production\" !== 'production' && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (false\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n \"production\" !== 'production' && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (false\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n \"production\" !== 'production' && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (false\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n \"production\" !== 'production' && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (false\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n \"production\" !== 'production' && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (\"development\" !== 'production' &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n \"development\" !== 'production' && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (\"development\" !== 'production' &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n \"development\" !== 'production' && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (\"development\" !== 'production' &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n \"development\" !== 'production' && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (\"development\" !== 'production' &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n \"development\" !== 'production' && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (\"development\" !== 'production' &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n \"development\" !== 'production' && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (\"development\" !== 'production' &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n \"development\" !== 'production' && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (\"development\" !== 'production' &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n \"development\" !== 'production' && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (\"development\" !== 'production' &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n \"development\" !== 'production' && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (\"development\" !== 'production' &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n \"development\" !== 'production' && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (\"development\" !== 'production' &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n \"development\" !== 'production' && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (\"development\" !== 'production' &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n \"development\" !== 'production' && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (\"development\" !== 'production' &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n \"development\" !== 'production' && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (\"development\" !== 'production' &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n \"development\" !== 'production' && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del(target, key) {\n if (\"development\" !== 'production' &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n \"development\" !== 'production' && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n }", "function del (target, key) {\n if (\"production\" !== 'production' &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n \"production\" !== 'production' && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (\"production\" !== 'production' &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n \"production\" !== 'production' && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (isUndef(target) || isPrimitive(target)\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (isUndef(target) || isPrimitive(target)\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (isUndef(target) || isPrimitive(target)\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (isUndef(target) || isPrimitive(target)\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (isUndef(target) || isPrimitive(target)\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (isUndef(target) || isPrimitive(target)\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (isUndef(target) || isPrimitive(target)\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (isUndef(target) || isPrimitive(target)\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (isUndef(target) || isPrimitive(target)\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (isUndef(target) || isPrimitive(target)\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (isUndef(target) || isPrimitive(target)\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (isUndef(target) || isPrimitive(target)\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (isUndef(target) || isPrimitive(target)\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (isUndef(target) || isPrimitive(target)\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (isUndef(target) || isPrimitive(target)\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (isUndef(target) || isPrimitive(target)\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (isUndef(target) || isPrimitive(target)\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (isUndef(target) || isPrimitive(target)\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (isUndef(target) || isPrimitive(target)\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (isUndef(target) || isPrimitive(target)\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (isUndef(target) || isPrimitive(target)\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (isUndef(target) || isPrimitive(target)\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (isUndef(target) || isPrimitive(target)\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (isUndef(target) || isPrimitive(target)\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (isUndef(target) || isPrimitive(target)\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (isUndef(target) || isPrimitive(target)\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (isUndef(target) || isPrimitive(target)\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (isUndef(target) || isPrimitive(target)\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (isUndef(target) || isPrimitive(target)\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (isUndef(target) || isPrimitive(target)\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (isUndef(target) || isPrimitive(target)\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (isUndef(target) || isPrimitive(target)\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (isUndef(target) || isPrimitive(target)\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (isUndef(target) || isPrimitive(target)\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (isUndef(target) || isPrimitive(target)\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if (isUndef(target) || isPrimitive(target)\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if ( true &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n true && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if ( true &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n true && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if ( true &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n true && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if ( true &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n true && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if ( true &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n true && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if ( true &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n true && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if ( true &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n true && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if ( true &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n true && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if ( true &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n true && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if ( true &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n true && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if ( true &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n true && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if ( true &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n true && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if ( true &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n true && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if ( true &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n true && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if ( true &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n true && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if ( true &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n true && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if ( true &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n true && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if ( true &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n true && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if ( true &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n true && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if ( true &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n true && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if ( true &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n true && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if ( true &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n true && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if ( true &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n true && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}", "function del (target, key) {\n if ( true &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n true && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}" ]
[ "0.7100229", "0.69204336", "0.6754852", "0.66636324", "0.65777886", "0.65464354", "0.65464354", "0.65464354", "0.6531929", "0.6495098", "0.6456183", "0.64530337", "0.64501435", "0.64452565", "0.64452565", "0.64452565", "0.64452565", "0.64452565", "0.64452565", "0.64452565", "0.64452565", "0.64452565", "0.64452565", "0.64452565", "0.64452565", "0.64405054", "0.64405054", "0.64405054", "0.64405054", "0.64405054", "0.64405054", "0.64405054", "0.64405054", "0.64405054", "0.64405054", "0.64405054", "0.64405054", "0.64405054", "0.64268607", "0.6414315", "0.6414315", "0.6413841", "0.6413841", "0.6413841", "0.6413841", "0.6413841", "0.6413841", "0.6413841", "0.6413841", "0.6413841", "0.6413841", "0.6413841", "0.6413841", "0.6413841", "0.6413841", "0.6413841", "0.6413841", "0.6413841", "0.6413841", "0.6413841", "0.6413841", "0.6413841", "0.6413841", "0.6413841", "0.6413841", "0.6413841", "0.6413841", "0.6413841", "0.6413841", "0.6413841", "0.6413841", "0.6413841", "0.6413841", "0.6413841", "0.6413841", "0.6413841", "0.6413841", "0.640546", "0.640546", "0.640546", "0.640546", "0.640546", "0.640546", "0.640546", "0.640546", "0.640546", "0.640546", "0.640546", "0.640546", "0.640546", "0.640546", "0.640546", "0.640546", "0.640546", "0.640546", "0.640546", "0.640546", "0.640546", "0.640546", "0.640546", "0.640546" ]
0.0
-1
Collect dependencies on array elements when the array is touched, since we cannot intercept array element access like property getters.
function dependArray (value) { for (var e = (void 0), i = 0, l = value.length; i < l; i++) { e = value[i]; e && e.__ob__ && e.__ob__.dep.depend(); if (Array.isArray(e)) { dependArray(e); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dependArray (value) {\n for (var e = (void 0), i = 0, l = value.length; i < l; i++) {\n e = value[i];\n e && e.__ob__ && e.__ob__.dep.depend();\n if (Array.isArray(e)) {\n dependArray(e);\n }\n }\n }", "function dependArray (value) {\n for (var e = (void 0), i = 0, l = value.length; i < l; i++) {\n e = value[i];\n e && e.__ob__ && e.__ob__.dep.depend();\n if (Array.isArray(e)) {\n dependArray(e);\n }\n }\n }", "function dependArray (value) {\n for (var e = (void 0), i = 0, l = value.length; i < l; i++) {\n e = value[i];\n e && e.__ob__ && e.__ob__.dep.depend();\n if (Array.isArray(e)) {\n dependArray(e);\n }\n }\n }", "function dependArray (value) {\n for (var e = (void 0), i = 0, l = value.length; i < l; i++) {\n e = value[i];\n e && e.__ob__ && e.__ob__.dep.depend();\n if (Array.isArray(e)) {\n dependArray(e);\n }\n }\n }", "function dependArray (value) {\n for (var e = (void 0), i = 0, l = value.length; i < l; i++) {\n e = value[i];\n e && e.__ob__ && e.__ob__.dep.depend();\n if (Array.isArray(e)) {\n dependArray(e);\n }\n }\n }", "function dependArray(value) {\n for (var e = (void 0), i = 0, l = value.length; i < l; i++) {\n e = value[i];\n e && e.__ob__ && e.__ob__.dep.depend();\n if (Array.isArray(e)) {\n dependArray(e);\n }\n }\n }", "function dependArray (value) {\n\t for (var e = (void 0), i = 0, l = value.length; i < l; i++) {\n\t e = value[i];\n\t e && e.__ob__ && e.__ob__.dep.depend();\n\t if (Array.isArray(e)) {\n\t dependArray(e);\n\t }\n\t }\n\t}", "function dependArray (value) {\n\t for (var e = (void 0), i = 0, l = value.length; i < l; i++) {\n\t e = value[i];\n\t e && e.__ob__ && e.__ob__.dep.depend();\n\t if (Array.isArray(e)) {\n\t dependArray(e);\n\t }\n\t }\n\t}", "function dependArray (value) {\n\t for (var e = (void 0), i = 0, l = value.length; i < l; i++) {\n\t e = value[i];\n\t e && e.__ob__ && e.__ob__.dep.depend();\n\t if (Array.isArray(e)) {\n\t dependArray(e);\n\t }\n\t }\n\t}", "function dependArray (value) {\n\t for (var e = (void 0), i = 0, l = value.length; i < l; i++) {\n\t e = value[i];\n\t e && e.__ob__ && e.__ob__.dep.depend();\n\t if (Array.isArray(e)) {\n\t dependArray(e);\n\t }\n\t }\n\t}", "function dependArray (value) {\n\t for (var e = (void 0), i = 0, l = value.length; i < l; i++) {\n\t e = value[i];\n\t e && e.__ob__ && e.__ob__.dep.depend();\n\t if (Array.isArray(e)) {\n\t dependArray(e);\n\t }\n\t }\n\t}", "function dependArray (value) {\n\t for (var e = (void 0), i = 0, l = value.length; i < l; i++) {\n\t e = value[i];\n\t e && e.__ob__ && e.__ob__.dep.depend();\n\t if (Array.isArray(e)) {\n\t dependArray(e);\n\t }\n\t }\n\t}", "function dependArray(value) {\n for (var e = void 0, i = 0, l = value.length; i < l; i++) {\n e = value[i];\n e && e.__ob__ && e.__ob__.dep.depend();\n if (Array.isArray(e)) {\n dependArray(e);\n }\n }\n }", "function dependArray(value) {\n for (var e = void 0, i = 0, l = value.length; i < l; i++) {\n e = value[i];\n e && e.__ob__ && e.__ob__.dep.depend();\n\n if (Array.isArray(e)) {\n dependArray(e);\n }\n }\n }", "function dependArray(value) {\n for (var e = void 0, i = 0, l = value.length; i < l; i++) {\n e = value[i];\n e && e.__ob__ && e.__ob__.dep.depend();\n if (Array.isArray(e)) {\n dependArray(e);\n }\n }\n }", "function dependArray(value) {\n for (var e = (void 0), i = 0, l = value.length; i < l; i++) {\n e = value[i];\n e && e.__ob__ && e.__ob__.dep.depend();\n if (Array.isArray(e)) {\n dependArray(e);\n }\n }\n }", "function dependArray(value) {\n for (var e = (void 0), i = 0, l = value.length; i < l; i++) {\n e = value[i];\n e && e.__ob__ && e.__ob__.dep.depend();\n if (Array.isArray(e)) {\n dependArray(e);\n }\n }\n }", "function dependArray (value) {\r\n for (var e = (void 0), i = 0, l = value.length; i < l; i++) {\r\n e = value[i];\r\n e && e.__ob__ && e.__ob__.dep.depend();\r\n if (Array.isArray(e)) {\r\n dependArray(e);\r\n }\r\n }\r\n}", "function dependArray(value){for(var e=void 0,i=0,l=value.length;i<l;i++){e=value[i];e&&e.__ob__&&e.__ob__.dep.depend();if(Array.isArray(e)){dependArray(e);}}}", "function dependArray(value){for(var e=void 0,i=0,l=value.length;i<l;i++){e=value[i];e&&e.__ob__&&e.__ob__.dep.depend();if(Array.isArray(e)){dependArray(e);}}}", "function dependArray(value){for(var e=void 0,i=0,l=value.length;i<l;i++){e=value[i];e&&e.__ob__&&e.__ob__.dep.depend();if(Array.isArray(e)){dependArray(e);}}}" ]
[ "0.6504594", "0.6504594", "0.6504594", "0.6504594", "0.64865226", "0.6479281", "0.64195865", "0.64195865", "0.64195865", "0.64195865", "0.64195865", "0.64195865", "0.6416323", "0.64133656", "0.6411051", "0.63963705", "0.63963705", "0.63921195", "0.6370724", "0.6370724", "0.6370724" ]
0.0
-1
Helper that recursively merges two data objects together.
function mergeData (to, from) { if (!from) { return to } var key, toVal, fromVal; var keys = hasSymbol ? Reflect.ownKeys(from) : Object.keys(from); for (var i = 0; i < keys.length; i++) { key = keys[i]; // in case the object is already observed... if (key === '__ob__') { continue } toVal = to[key]; fromVal = from[key]; if (!hasOwn(to, key)) { set(to, key, fromVal); } else if ( toVal !== fromVal && isPlainObject(toVal) && isPlainObject(fromVal) ) { mergeData(toVal, fromVal); } } return to }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mergeData(to,from){if(!from){return to;}var key,toVal,fromVal;var keys=Object.keys(from);for(var i=0;i<keys.length;i++){key=keys[i];toVal=to[key];fromVal=from[key];if(!hasOwn(to,key)){set(to,key,fromVal);}else if(isPlainObject(toVal)&&isPlainObject(fromVal)){mergeData(toVal,fromVal);}}return to;}", "function mergeData(to,from){if(!from){return to;}var key,toVal,fromVal;var keys=Object.keys(from);for(var i=0;i<keys.length;i++){key=keys[i];toVal=to[key];fromVal=from[key];if(!hasOwn(to,key)){set(to,key,fromVal);}else if(isPlainObject(toVal)&&isPlainObject(fromVal)){mergeData(toVal,fromVal);}}return to;}", "function mergeData(to,from){if(!from){return to;}var key,toVal,fromVal;var keys=Object.keys(from);for(var i=0;i<keys.length;i++){key=keys[i];toVal=to[key];fromVal=from[key];if(!hasOwn(to,key)){set$1(to,key,fromVal);}else if(isPlainObject(toVal)&&isPlainObject(fromVal)){mergeData(toVal,fromVal);}}return to;}", "function MergeRecursive(obj1, obj2) {\n for (var p in obj2) {\n try {\n if (obj2[p].constructor == Object) {\n obj1[p] = MergeRecursive(obj1[p], obj2[p]);\n } else {\n obj1[p] = obj2[p];\n }\n } catch (e) {\n obj1[p] = obj2[p];\n }\n }\n return obj1;\n}", "function mergeData (to, from) {\n\t\t var key, toVal, fromVal\n\t\t for (key in from) {\n\t\t toVal = to[key]\n\t\t fromVal = from[key]\n\t\t if (!to.hasOwnProperty(key)) {\n\t\t _.set(to, key, fromVal)\n\t\t } else if (_.isObject(toVal) && _.isObject(fromVal)) {\n\t\t mergeData(toVal, fromVal)\n\t\t }\n\t\t }\n\t\t return to\n\t\t}", "function mergeData (to, from) {\n\t var key, toVal, fromVal\n\t for (key in from) {\n\t toVal = to[key]\n\t fromVal = from[key]\n\t if (!to.hasOwnProperty(key)) {\n\t to.$add(key, fromVal)\n\t } else if (_.isObject(toVal) && _.isObject(fromVal)) {\n\t mergeData(toVal, fromVal)\n\t }\n\t }\n\t return to\n\t}", "function mergeData (to, from) {\n\t var key, toVal, fromVal\n\t for (key in from) {\n\t toVal = to[key]\n\t fromVal = from[key]\n\t if (!to.hasOwnProperty(key)) {\n\t to.$add(key, fromVal)\n\t } else if (_.isObject(toVal) && _.isObject(fromVal)) {\n\t mergeData(toVal, fromVal)\n\t }\n\t }\n\t return to\n\t}", "function MergeRecursive(o1, o2) {\n for ( var p in o2 ) {\n try {\n if ( o2[p].constructor == Object ) {\n o1[p] = MergeRecursive(o1[p], o2[p]);\n } else {\n o1[p] = o2[p];\n }\n } catch(e) {\n o1[p] = o2[p];\n }\n }\n\n return o1;\n}", "function mergeData (to, from) {\n var key, toVal, fromVal\n for (key in from) {\n toVal = to[key]\n fromVal = from[key]\n if (!to.hasOwnProperty(key)) {\n to.$add(key, fromVal)\n } else if (_.isObject(toVal) && _.isObject(fromVal)) {\n mergeData(toVal, fromVal)\n }\n }\n return to\n}", "function mergeData (to, from) {\n var key, toVal, fromVal\n for (key in from) {\n toVal = to[key]\n fromVal = from[key]\n if (!to.hasOwnProperty(key)) {\n to.$add(key, fromVal)\n } else if (_.isObject(toVal) && _.isObject(fromVal)) {\n mergeData(toVal, fromVal)\n }\n }\n return to\n}", "function mergeData (to, from) {\n\t var key, toVal, fromVal\n\t for (key in from) {\n\t toVal = to[key]\n\t fromVal = from[key]\n\t if (!hasOwn(to, key)) {\n\t set(to, key, fromVal)\n\t } else if (isObject(toVal) && isObject(fromVal)) {\n\t mergeData(toVal, fromVal)\n\t }\n\t }\n\t return to\n\t}", "function mergeData(to, from) {\n var key, toVal, fromVal;\n for (key in from) {\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isObject(toVal) && isObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n }", "function mergeData(to, from) {\n var key, toVal, fromVal;\n for (key in from) {\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isObject(toVal) && isObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n }", "function mergeData(to, from) {\n var key, toVal, fromVal;\n for (key in from) {\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isObject(toVal) && isObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n }", "function mergeData(to, from) {\n if (!from) {\n return to;\n }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n }", "function mergeData (to, from) {\n\t var key, toVal, fromVal;\n\t for (key in from) {\n\t toVal = to[key];\n\t fromVal = from[key];\n\t if (!hasOwn(to, key)) {\n\t set(to, key, fromVal);\n\t } else if (isObject(toVal) && isObject(fromVal)) {\n\t mergeData(toVal, fromVal);\n\t }\n\t }\n\t return to\n\t}", "function mergeData (to, from) {\n\t var key, toVal, fromVal;\n\t for (key in from) {\n\t toVal = to[key];\n\t fromVal = from[key];\n\t if (!hasOwn(to, key)) {\n\t set(to, key, fromVal);\n\t } else if (isObject(toVal) && isObject(fromVal)) {\n\t mergeData(toVal, fromVal);\n\t }\n\t }\n\t return to\n\t}", "function mergeObjects(obj1, obj2) {\n Object.keys(obj2).forEach(function(obj2key) {\n if (obj2key in obj1) {\n if (obj1[obj2key].constructor == Object) {\n // Recurse\n mergeObjects(obj1[obj2key], obj2[obj2key]);\n } else {\n // Merge value\n obj1[obj2key] = obj2[obj2key];\n }\n } else {\n // Can merge entire subtree\n obj1[obj2key] = obj2[obj2key];\n }\n });\n}", "function mergeData(to, from) {\n var key, toVal, fromVal;\n for (key in from) {\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isObject(toVal) && isObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n}", "function mergeData(to, from) {\n var key, toVal, fromVal;\n for (key in from) {\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isObject(toVal) && isObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n}", "function mergeData(to, from) {\n var key, toVal, fromVal;\n for (key in from) {\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isObject(toVal) && isObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n}", "function mergeData(to, from) {\n var key, toVal, fromVal;\n for (key in from) {\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isObject(toVal) && isObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n}", "function mergeData(to, from) {\n var key, toVal, fromVal;\n for (key in from) {\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isObject(toVal) && isObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n}", "function mergeData(to, from) {\n var key, toVal, fromVal;\n for (key in from) {\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isObject(toVal) && isObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n}", "function mergeData(to, from) {\n var key, toVal, fromVal;\n for (key in from) {\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isObject(toVal) && isObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n}", "function mergeData(to, from) {\n\t\t var key = void 0,\n\t\t toVal = void 0,\n\t\t fromVal = void 0;\n\t\t for (key in from) {\n\t\t toVal = to[key];\n\t\t fromVal = from[key];\n\t\t if (!hasOwn(to, key)) {\n\t\t set(to, key, fromVal);\n\t\t } else if (isObject(toVal) && isObject(fromVal)) {\n\t\t mergeData(toVal, fromVal);\n\t\t }\n\t\t }\n\t\t return to;\n\t\t}", "function mergeData(to, from) {\n\t var key, toVal, fromVal;\n\t for (key in from) {\n\t toVal = to[key];\n\t fromVal = from[key];\n\t if (!hasOwn(to, key)) {\n\t set(to, key, fromVal);\n\t } else if (isObject(toVal) && isObject(fromVal)) {\n\t mergeData(toVal, fromVal);\n\t }\n\t }\n\t return to;\n\t}", "function mergeData(to, from) {\n\t var key, toVal, fromVal;\n\t for (key in from) {\n\t toVal = to[key];\n\t fromVal = from[key];\n\t if (!hasOwn(to, key)) {\n\t set(to, key, fromVal);\n\t } else if (isObject(toVal) && isObject(fromVal)) {\n\t mergeData(toVal, fromVal);\n\t }\n\t }\n\t return to;\n\t}", "function mergeData(to, from) {\n\t var key, toVal, fromVal;\n\t for (key in from) {\n\t toVal = to[key];\n\t fromVal = from[key];\n\t if (!hasOwn(to, key)) {\n\t set(to, key, fromVal);\n\t } else if (isObject(toVal) && isObject(fromVal)) {\n\t mergeData(toVal, fromVal);\n\t }\n\t }\n\t return to;\n\t}", "function mergeData(to, from) {\n\t var key, toVal, fromVal;\n\t for (key in from) {\n\t toVal = to[key];\n\t fromVal = from[key];\n\t if (!hasOwn(to, key)) {\n\t set(to, key, fromVal);\n\t } else if (isObject(toVal) && isObject(fromVal)) {\n\t mergeData(toVal, fromVal);\n\t }\n\t }\n\t return to;\n\t}", "function mergeData(to, from) {\n\t var key, toVal, fromVal;\n\t for (key in from) {\n\t toVal = to[key];\n\t fromVal = from[key];\n\t if (!hasOwn(to, key)) {\n\t set(to, key, fromVal);\n\t } else if (isObject(toVal) && isObject(fromVal)) {\n\t mergeData(toVal, fromVal);\n\t }\n\t }\n\t return to;\n\t}", "function mergeData(to, from) {\n\t var key, toVal, fromVal;\n\t for (key in from) {\n\t toVal = to[key];\n\t fromVal = from[key];\n\t if (!hasOwn(to, key)) {\n\t set(to, key, fromVal);\n\t } else if (isObject(toVal) && isObject(fromVal)) {\n\t mergeData(toVal, fromVal);\n\t }\n\t }\n\t return to;\n\t}", "function mergeData(to, from) {\n\t var key, toVal, fromVal;\n\t for (key in from) {\n\t toVal = to[key];\n\t fromVal = from[key];\n\t if (!hasOwn(to, key)) {\n\t set(to, key, fromVal);\n\t } else if (isObject(toVal) && isObject(fromVal)) {\n\t mergeData(toVal, fromVal);\n\t }\n\t }\n\t return to;\n\t}", "function mergeData(to, from) {\n\t if (!from) {\n\t return to;\n\t }\n\t var key, toVal, fromVal;\n\t var keys = Object.keys(from);\n\t for (var i = 0; i < keys.length; i++) {\n\t key = keys[i];\n\t toVal = to[key];\n\t fromVal = from[key];\n\t if (!hasOwn(to, key)) {\n\t set(to, key, fromVal);\n\t } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n\t mergeData(toVal, fromVal);\n\t }\n\t }\n\t return to;\n\t}", "function mergeData(to, from) {\n\t if (!from) {\n\t return to;\n\t }\n\t var key, toVal, fromVal;\n\t var keys = Object.keys(from);\n\t for (var i = 0; i < keys.length; i++) {\n\t key = keys[i];\n\t toVal = to[key];\n\t fromVal = from[key];\n\t if (!hasOwn(to, key)) {\n\t set(to, key, fromVal);\n\t } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n\t mergeData(toVal, fromVal);\n\t }\n\t }\n\t return to;\n\t}", "function mergeData(to, from) {\n\t if (!from) {\n\t return to;\n\t }\n\t var key, toVal, fromVal;\n\t var keys = Object.keys(from);\n\t for (var i = 0; i < keys.length; i++) {\n\t key = keys[i];\n\t toVal = to[key];\n\t fromVal = from[key];\n\t if (!hasOwn(to, key)) {\n\t set$1(to, key, fromVal);\n\t } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n\t mergeData(toVal, fromVal);\n\t }\n\t }\n\t return to;\n\t}", "function mergeData (to, from) {\n var key, toVal, fromVal;\n for (key in from) {\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isObject(toVal) && isObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n\t if (!from) { return to }\n\t var key, toVal, fromVal;\n\t var keys = Object.keys(from);\n\t for (var i = 0; i < keys.length; i++) {\n\t key = keys[i];\n\t toVal = to[key];\n\t fromVal = from[key];\n\t if (!hasOwn(to, key)) {\n\t set(to, key, fromVal);\n\t } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n\t mergeData(toVal, fromVal);\n\t }\n\t }\n\t return to\n\t}", "function mergeData (to, from) {\n\t if (!from) { return to }\n\t var key, toVal, fromVal;\n\t var keys = Object.keys(from);\n\t for (var i = 0; i < keys.length; i++) {\n\t key = keys[i];\n\t toVal = to[key];\n\t fromVal = from[key];\n\t if (!hasOwn(to, key)) {\n\t set(to, key, fromVal);\n\t } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n\t mergeData(toVal, fromVal);\n\t }\n\t }\n\t return to\n\t}", "function mergeData (to, from) {\n\t if (!from) { return to }\n\t var key, toVal, fromVal;\n\t var keys = Object.keys(from);\n\t for (var i = 0; i < keys.length; i++) {\n\t key = keys[i];\n\t toVal = to[key];\n\t fromVal = from[key];\n\t if (!hasOwn(to, key)) {\n\t set(to, key, fromVal);\n\t } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n\t mergeData(toVal, fromVal);\n\t }\n\t }\n\t return to\n\t}", "function mergeData (to, from) {\n\t if (!from) { return to }\n\t var key, toVal, fromVal;\n\t var keys = Object.keys(from);\n\t for (var i = 0; i < keys.length; i++) {\n\t key = keys[i];\n\t toVal = to[key];\n\t fromVal = from[key];\n\t if (!hasOwn(to, key)) {\n\t set(to, key, fromVal);\n\t } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n\t mergeData(toVal, fromVal);\n\t }\n\t }\n\t return to\n\t}", "function mergeData (to, from) {\n\t if (!from) { return to }\n\t var key, toVal, fromVal;\n\t var keys = Object.keys(from);\n\t for (var i = 0; i < keys.length; i++) {\n\t key = keys[i];\n\t toVal = to[key];\n\t fromVal = from[key];\n\t if (!hasOwn(to, key)) {\n\t set(to, key, fromVal);\n\t } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n\t mergeData(toVal, fromVal);\n\t }\n\t }\n\t return to\n\t}", "function mergeData (to, from) {\n\t if (!from) { return to }\n\t var key, toVal, fromVal;\n\t var keys = Object.keys(from);\n\t for (var i = 0; i < keys.length; i++) {\n\t key = keys[i];\n\t toVal = to[key];\n\t fromVal = from[key];\n\t if (!hasOwn(to, key)) {\n\t set$1(to, key, fromVal);\n\t } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n\t mergeData(toVal, fromVal);\n\t }\n\t }\n\t return to\n\t}", "function mergeData(to, from) {\n if (!from) {\n return to;\n }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n}", "function mergeData(to, from) {\n if (!from) {\n return to;\n }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n}", "function mergeData(to, from) {\n if (!from) {\n return to;\n }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n}", "function mergeData(to, from) {\n if (!from) {\n return to;\n }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n}", "function mergeData(to, from) {\n if (!from) {\n return to;\n }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n}", "function mergeData(to, from) {\n if (!from) {\n return to;\n }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n}", "function mergeData(to, from) {\n if (!from) {\n return to;\n }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n}", "function mergeData(to, from) {\n if (!from) {\n return to;\n }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n}", "function mergeRecursive(obj1, obj2) {\n for (var p in obj2) {\n try {\n // Property in destination object set; update its value.\n if (obj2[p].constructor == Object) {\n obj1[p] = mergeRecursive(obj1[p], obj2[p])\n } else {\n obj1[p] = obj2[p]\n }\n } catch(e) {\n // Property in destination object not set; create it and set its value.\n obj1[p] = obj2[p]\n\n }\n }\n return obj1\n}", "function mergeData(to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n }", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n }", "function merge(a, b) {\r\n\t for (var key in b) {\r\n\t if (typeof b[key] !== 'object' || b[key] === null) {\r\n\t a[key] = b[key];\r\n\t }\r\n\t else if (Array.isArray(b[key])) {\r\n\t a[key] = (a[key] || []).concat(clone(b[key]));\r\n\t }\r\n\t else if (typeof a[key] !== 'object' || a[key] === null || Array.isArray(a[key])) {\r\n\t a[key] = merge({}, b[key]);\r\n\t }\r\n\t else {\r\n\t a[key] = merge(a[key], b[key]);\r\n\t }\r\n\t }\r\n\t return a;\r\n\t}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}" ]
[ "0.72979534", "0.72979534", "0.7292702", "0.7285061", "0.7261572", "0.72569245", "0.72569245", "0.7234436", "0.7123602", "0.7123602", "0.71093124", "0.7063697", "0.7063697", "0.7063697", "0.7060833", "0.705406", "0.705406", "0.7036377", "0.7035759", "0.7035759", "0.7035759", "0.7035759", "0.7035759", "0.7035759", "0.7035759", "0.7030756", "0.7028112", "0.7028112", "0.7028112", "0.7028112", "0.7028112", "0.7028112", "0.7028112", "0.7012684", "0.7012684", "0.70037985", "0.7003312", "0.6988146", "0.6988146", "0.6988146", "0.6988146", "0.6988146", "0.69825524", "0.6982475", "0.6982475", "0.6982475", "0.6982475", "0.6982475", "0.6982475", "0.6982475", "0.6982475", "0.69771165", "0.6976487", "0.6971575", "0.69398314", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404", "0.69210404" ]
0.0
-1
Hooks and props are merged as arrays.
function mergeHook ( parentVal, childVal ) { var res = childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal; return res ? dedupeHooks(res) : res }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function $merge(){\r\n var mix = {};\r\n for (var i = 0; i < arguments.length; i++) {\r\n for (var property in arguments[i]) {\r\n var ap = arguments[i][property];\r\n var mp = mix[property];\r\n if (mp && $type(ap) == 'object' && $type(mp) == 'object') \r\n mix[property] = $merge(mp, ap);\r\n else \r\n mix[property] = ap;\r\n }\r\n }\r\n return mix;\r\n }", "merge(hooks) {\n hooks.hooks.before.forEach((actionHooks, action) => {\n actionHooks.forEach((handler) => {\n this.addResolvedHandler('before', action, handler);\n });\n });\n hooks.hooks.after.forEach((actionHooks, action) => {\n actionHooks.forEach((handler) => {\n this.addResolvedHandler('after', action, handler);\n });\n });\n }", "function getStuff2() {\r\n\t\t\tvar stuff = [];\r\n\t\t\tfor (i in props) {\r\n\t\t\t\tstuff.push(argsXF[i](arguments[i]));\r\n\t\t\t};\r\n\t\t\treturn stuff;\r\n\t\t}", "function mergeData() {\n const mergeTarget = {};\n let i = arguments.length;\n let prop;\n let event; // Allow for variadic argument length.\n\n while (i--) {\n // Iterate through the data properties and execute merge strategies\n // Object.keys eliminates need for hasOwnProperty call\n for (prop of Object.keys(arguments[i])) {\n switch (prop) {\n // Array merge strategy (array concatenation)\n case 'class':\n case 'style':\n case 'directives':\n if (!Array.isArray(mergeTarget[prop])) {\n mergeTarget[prop] = [];\n } // Repackaging in an array allows Vue runtime\n // to merge class/style bindings regardless of type.\n\n\n mergeTarget[prop] = mergeTarget[prop].concat(arguments[i][prop]);\n break;\n // Space delimited string concatenation strategy\n\n case 'staticClass':\n if (!arguments[i][prop]) {\n break;\n }\n\n if (mergeTarget[prop] === undefined) {\n mergeTarget[prop] = '';\n }\n\n if (mergeTarget[prop]) {\n // Not an empty string, so concatenate\n mergeTarget[prop] += ' ';\n }\n\n mergeTarget[prop] += arguments[i][prop].trim();\n break;\n // Object, the properties of which to merge via array merge strategy (array concatenation).\n // Callback merge strategy merges callbacks to the beginning of the array,\n // so that the last defined callback will be invoked first.\n // This is done since to mimic how Object.assign merging\n // uses the last given value to assign.\n\n case 'on':\n case 'nativeOn':\n if (!mergeTarget[prop]) {\n mergeTarget[prop] = {};\n }\n\n const listeners = mergeTarget[prop];\n\n for (event of Object.keys(arguments[i][prop] || {})) {\n // Concat function to array of functions if callback present.\n if (listeners[event]) {\n // Insert current iteration data in beginning of merged array.\n listeners[event] = Array().concat( // eslint-disable-line\n listeners[event], arguments[i][prop][event]);\n } else {\n // Straight assign.\n listeners[event] = arguments[i][prop][event];\n }\n }\n\n break;\n // Object merge strategy\n\n case 'attrs':\n case 'props':\n case 'domProps':\n case 'scopedSlots':\n case 'staticStyle':\n case 'hook':\n case 'transition':\n if (!mergeTarget[prop]) {\n mergeTarget[prop] = {};\n }\n\n mergeTarget[prop] = { ...arguments[i][prop],\n ...mergeTarget[prop]\n };\n break;\n // Reassignment strategy (no merge)\n\n case 'slot':\n case 'key':\n case 'ref':\n case 'tag':\n case 'show':\n case 'keepAlive':\n default:\n if (!mergeTarget[prop]) {\n mergeTarget[prop] = arguments[i][prop];\n }\n\n }\n }\n }\n\n return mergeTarget;\n}", "attachHooks(hooks){\n if(!hooks){ return false}\n if([] instanceof Array){\n _hooks.concat(hooks)\n }else {\n _hooks.push(hooks)\n }\n return true;\n }", "function hooks(){return hookCallback.apply(null,arguments)}", "function hooks(){return hookCallback.apply(null,arguments)}", "combine(...args) {\n return Object.assign({}, ...args);\n }", "function mergeHook(parentVal, childVal) {\n var res = childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal;\n return res ? dedupeHooks(res) : res;\n}", "function mergeHook(parentVal, childVal) {\n var res = childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal;\n return res ? dedupeHooks(res) : res;\n}", "function mergeHook(parentVal, childVal) {\n var res = childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal;\n return res ? dedupeHooks(res) : res;\n}", "function mergeHook(parentVal, childVal) {\n var res = childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal;\n return res ? dedupeHooks(res) : res;\n}", "function mergeHook(parentVal, childVal) {\n var res = childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal;\n return res ? dedupeHooks(res) : res;\n}", "function mergeHook(parentVal, childVal) {\n var res = childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal;\n return res ? dedupeHooks(res) : res;\n }", "function applyMixins(proto, mixins) {\n\tfor (var key in mixins) { if (mixins.hasOwnProperty(key)) {\n\t\tproto[key] = multihook(\n\t\t\tmixins[key].concat(proto[key] || ARR),\n\t\t\tkey==='getDefaultProps' || key==='getInitialState' || key==='getChildContext'\n\t\t);\n\t} }\n}", "function applyMixins(proto, mixins) {\n\tfor (var key in mixins) { if (mixins.hasOwnProperty(key)) {\n\t\tproto[key] = multihook(\n\t\t\tmixins[key].concat(proto[key] || ARR),\n\t\t\tkey==='getDefaultProps' || key==='getInitialState' || key==='getChildContext'\n\t\t);\n\t} }\n}", "function applyMixins(proto, mixins) {\n\tfor (var key in mixins) { if (mixins.hasOwnProperty(key)) {\n\t\tproto[key] = multihook(\n\t\t\tmixins[key].concat(proto[key] || ARR),\n\t\t\tkey==='getDefaultProps' || key==='getInitialState' || key==='getChildContext'\n\t\t);\n\t} }\n}", "function applyMixins(proto, mixins) {\n\tfor (var key in mixins) {\n\t\tif (mixins.hasOwnProperty(key)) {\n\t\t\tproto[key] = multihook(mixins[key].concat(proto[key] || ARR), key === 'getDefaultProps' || key === 'getInitialState' || key === 'getChildContext');\n\t\t}\n\t}\n}", "function applyMixins(proto, mixins) {\n\tfor (var key in mixins) {\n\t\tif (mixins.hasOwnProperty(key)) {\n\t\t\tproto[key] = multihook(mixins[key].concat(proto[key] || ARR), key === 'getDefaultProps' || key === 'getInitialState' || key === 'getChildContext');\n\t\t}\n\t}\n}", "static getDerivedStateFromProps(props) {\n return {\n data: [...props.data],\n };\n }", "function mergeHook(\n parentVal,\n childVal,\n ) {\n var res = childVal\n ? parentVal\n ? parentVal.concat(childVal)\n : Array.isArray(childVal)\n ? childVal\n : [childVal]\n : parentVal;\n return res ? dedupeHooks(res) : res;\n }", "function mergeHook(parentVal,childVal){return childVal?parentVal?parentVal.concat(childVal):Array.isArray(childVal)?childVal:[childVal]:parentVal;}", "function mergeHook(parentVal,childVal){return childVal?parentVal?parentVal.concat(childVal):Array.isArray(childVal)?childVal:[childVal]:parentVal;}", "function mergeHook(parentVal,childVal){return childVal?parentVal?parentVal.concat(childVal):Array.isArray(childVal)?childVal:[childVal]:parentVal;}", "function mergeHook(parentVal, childVal) {\n\t\t return childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal;\n\t\t}", "function mix(){\n let args, props,child = {},max = arguments.length;\n for (args = 0; args < max; args += 1) {\n for (props in arguments[args]) {\n if (arguments[args].hasOwnProperty(props)){\n child[props] = arguments[args][props]\n }\n }\n }\n return child;\n}", "function mergeHook (\n parentVal,\n childVal\n ) {\n var res = childVal\n ? parentVal\n ? parentVal.concat(childVal)\n : Array.isArray(childVal)\n ? childVal\n : [childVal]\n : parentVal;\n return res\n ? dedupeHooks(res)\n : res\n }", "function mergeHook (\n parentVal,\n childVal\n ) {\n var res = childVal\n ? parentVal\n ? parentVal.concat(childVal)\n : Array.isArray(childVal)\n ? childVal\n : [childVal]\n : parentVal;\n return res\n ? dedupeHooks(res)\n : res\n }", "function mergeHook (\n parentVal,\n childVal\n ) {\n var res = childVal\n ? parentVal\n ? parentVal.concat(childVal)\n : Array.isArray(childVal)\n ? childVal\n : [childVal]\n : parentVal;\n return res\n ? dedupeHooks(res)\n : res\n }", "function mergeHook(parentVal, childVal) {\n\t return childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal;\n\t}", "function mergeHook(parentVal, childVal) {\n\t return childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal;\n\t}", "function mergeHook(parentVal, childVal) {\n\t return childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal;\n\t}", "function mergeHook (\n parentVal,\n childVal\n ) {\n var res = childVal\n ? parentVal\n ? parentVal.concat(childVal)\n : Array.isArray(childVal)\n ? childVal\n : [childVal]\n : parentVal;\n return res\n ? dedupeHooks(res)\n : res\n }", "function getExtendedPassedProps(passedProps) {\n var plugins = passedProps.plugins || [];\n var pluginProps = plugins.reduce(function (acc, plugin) {\n var name = plugin.name,\n defaultValue = plugin.defaultValue;\n\n if (name) {\n acc[name] = passedProps[name] !== undefined ? passedProps[name] : defaultValue;\n }\n\n return acc;\n }, {});\n return _extends({}, passedProps, {}, pluginProps);\n}" ]
[ "0.5942144", "0.59220487", "0.581958", "0.577723", "0.56988394", "0.5694502", "0.5694502", "0.55787134", "0.5573753", "0.5573753", "0.5573753", "0.5573753", "0.5573753", "0.55637807", "0.555034", "0.555034", "0.555034", "0.5546893", "0.5546893", "0.55361134", "0.5495715", "0.54819506", "0.54819506", "0.54819506", "0.54539233", "0.5446197", "0.5412659", "0.5412659", "0.5412659", "0.5401011", "0.5401011", "0.5401011", "0.5398894", "0.5391535" ]
0.0
-1
Assets When a vm is present (instance creation), we need to do a threeway merge between constructor options, instance options and parent options.
function mergeAssets ( parentVal, childVal, vm, key ) { var res = Object.create(parentVal || null); if (childVal) { false && false; return extend(res, childVal) } else { return res } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mergeAssets(parentVal,childVal,vm,key){var res=Object.create(parentVal||null);if(childVal){\"development\"!=='production'&&assertObjectType(key,childVal,vm);return extend(res,childVal);}else{return res;}}", "function mergeAssets(parentVal,childVal,vm,key){var res=Object.create(parentVal||null);if(childVal){\"development\"!=='production'&&assertObjectType(key,childVal,vm);return extend(res,childVal);}else{return res;}}", "function mergeAssets(parentVal, childVal, vm, key) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n process.env.NODE_ENV !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal);\n } else {\n return res;\n }\n}", "function mergeAssets(parentVal, childVal, vm, key) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n process.env.NODE_ENV !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal);\n } else {\n return res;\n }\n}", "function mergeAssets(parentVal, childVal, vm, key) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n process.env.NODE_ENV !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal);\n } else {\n return res;\n }\n}", "function mergeAssets(parentVal, childVal, vm, key) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n process.env.NODE_ENV !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal);\n } else {\n return res;\n }\n}", "function mergeAssets(parentVal, childVal, vm, key) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal);\n } else {\n return res;\n }\n}", "function mergeOptions(parent,child,vm){if(true){checkComponents(child);}if(typeof child==='function'){child=child.options;}normalizeProps(child,vm);normalizeInject(child,vm);normalizeDirectives(child);var extendsFrom=child.extends;if(extendsFrom){parent=mergeOptions(parent,extendsFrom,vm);}if(child.mixins){for(var i=0,l=child.mixins.length;i<l;i++){parent=mergeOptions(parent,child.mixins[i],vm);}}var options={};var key;for(key in parent){mergeField(key);}for(key in child){if(!hasOwn(parent,key)){mergeField(key);}}function mergeField(key){var strat=strats[key]||defaultStrat;options[key]=strat(parent[key],child[key],vm,key);}return options;}", "function mergeOptions(parent,child,vm){if(true){checkComponents(child);}if(typeof child==='function'){child=child.options;}normalizeProps(child,vm);normalizeInject(child,vm);normalizeDirectives(child);var extendsFrom=child.extends;if(extendsFrom){parent=mergeOptions(parent,extendsFrom,vm);}if(child.mixins){for(var i=0,l=child.mixins.length;i<l;i++){parent=mergeOptions(parent,child.mixins[i],vm);}}var options={};var key;for(key in parent){mergeField(key);}for(key in child){if(!hasOwn(parent,key)){mergeField(key);}}function mergeField(key){var strat=strats[key]||defaultStrat;options[key]=strat(parent[key],child[key],vm,key);}return options;}", "function mergeAssets(parentVal, childVal, vm, key) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal);\n } else {\n return res;\n }\n }", "function mergeAssets(parentVal, childVal, vm, key) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n 'development' !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal);\n } else {\n return res;\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets(parentVal, childVal, vm, key) {\n var res = Object.create(parentVal || null);\n\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal);\n } else {\n return res;\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n process.env.NODE_ENV !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n process.env.NODE_ENV !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n process.env.NODE_ENV !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n process.env.NODE_ENV !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n process.env.NODE_ENV !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n process.env.NODE_ENV !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n process.env.NODE_ENV !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n process.env.NODE_ENV !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n process.env.NODE_ENV !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n process.env.NODE_ENV !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n process.env.NODE_ENV !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n 'development' !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"production\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"production\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"production\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"production\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"production\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"production\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"production\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"production\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"production\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"production\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"production\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"production\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"production\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"production\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"production\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"production\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"production\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"production\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"production\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\r\n parentVal,\r\n childVal,\r\n vm,\r\n key\r\n) {\r\n var res = Object.create(parentVal || null);\r\n if (childVal) {\r\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\r\n return extend(res, childVal)\r\n } else {\r\n return res\r\n }\r\n}", "function mergeOptions(parent,child,vm){{checkComponents(child);}normalizeProps(child);normalizeDirectives(child);var extendsFrom=child.extends;if(extendsFrom){parent=typeof extendsFrom==='function'?mergeOptions(parent,extendsFrom.options,vm):mergeOptions(parent,extendsFrom,vm);}if(child.mixins){for(var i=0,l=child.mixins.length;i<l;i++){var mixin=child.mixins[i];if(mixin.prototype instanceof Vue$3){mixin=mixin.options;}parent=mergeOptions(parent,mixin,vm);}}var options={};var key;for(key in parent){mergeField(key);}for(key in child){if(!hasOwn(parent,key)){mergeField(key);}}function mergeField(key){var strat=strats[key]||defaultStrat;options[key]=strat(parent[key],child[key],vm,key);}return options;}", "function mergeOptions(parent, child, vm) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t checkComponents(child);\n\t }\n\t\n\t if (typeof child === 'function') {\n\t child = child.options;\n\t }\n\t\n\t normalizeProps(child);\n\t normalizeInject(child);\n\t normalizeDirectives(child);\n\t var extendsFrom = child.extends;\n\t if (extendsFrom) {\n\t parent = mergeOptions(parent, extendsFrom, vm);\n\t }\n\t if (child.mixins) {\n\t for (var i = 0, l = child.mixins.length; i < l; i++) {\n\t parent = mergeOptions(parent, child.mixins[i], vm);\n\t }\n\t }\n\t var options = {};\n\t var key;\n\t for (key in parent) {\n\t mergeField(key);\n\t }\n\t for (key in child) {\n\t if (!hasOwn(parent, key)) {\n\t mergeField(key);\n\t }\n\t }\n\t function mergeField(key) {\n\t var strat = strats[key] || defaultStrat;\n\t options[key] = strat(parent[key], child[key], vm, key);\n\t }\n\t return options;\n\t}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n ) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"debug\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n }", "function mergeAssets(\n parentVal,\n childVal,\n vm,\n key\n ) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n }", "function mergeOptions(parent, child, vm) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t checkComponents(child);\n\t }\n\n\t if (typeof child === 'function') {\n\t child = child.options;\n\t }\n\n\t normalizeProps(child);\n\t normalizeInject(child);\n\t normalizeDirectives(child);\n\t var extendsFrom = child.extends;\n\t if (extendsFrom) {\n\t parent = mergeOptions(parent, extendsFrom, vm);\n\t }\n\t if (child.mixins) {\n\t for (var i = 0, l = child.mixins.length; i < l; i++) {\n\t parent = mergeOptions(parent, child.mixins[i], vm);\n\t }\n\t }\n\t var options = {};\n\t var key;\n\t for (key in parent) {\n\t mergeField(key);\n\t }\n\t for (key in child) {\n\t if (!hasOwn(parent, key)) {\n\t mergeField(key);\n\t }\n\t }\n\t function mergeField(key) {\n\t var strat = strats[key] || defaultStrat;\n\t options[key] = strat(parent[key], child[key], vm, key);\n\t }\n\t return options;\n\t}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n ) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n }", "function mergeAssets(parentVal, childVal, vm, key) {\n var res = Object.create(parentVal || null);\n\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal);\n } else {\n return res;\n }\n }", "function mergeAssets(parentVal, childVal, vm, key) {\n var res = Object.create(parentVal || null);\n\n if (childVal) {\n true && assertObjectType(key, childVal, vm);\n return extend(res, childVal);\n } else {\n return res;\n }\n}", "function mergeOptions (\n parent,\n child,\n vm\n) {\n if ('production' !== 'production') {\n checkComponents(child);\n }\n\n if (typeof child === 'function') {\n child = child.options;\n }\n\n normalizeProps(child);\n normalizeInject(child);\n normalizeDirectives(child);\n var extendsFrom = child.extends;\n if (extendsFrom) {\n parent = mergeOptions(parent, extendsFrom, vm);\n }\n if (child.mixins) {\n for (var i = 0, l = child.mixins.length; i < l; i++) {\n parent = mergeOptions(parent, child.mixins[i], vm);\n }\n }\n var options = {};\n var key;\n for (key in parent) {\n mergeField(key);\n }\n for (key in child) {\n if (!hasOwn(parent, key)) {\n mergeField(key);\n }\n }\n function mergeField (key) {\n var strat = strats[key] || defaultStrat;\n options[key] = strat(parent[key], child[key], vm, key);\n }\n return options\n}", "function mergeOptions(parent, child, vm) {\n if (process.env.NODE_ENV !== 'production') {\n checkComponents(child);\n }\n\n if (typeof child === 'function') {\n child = child.options;\n }\n\n normalizeProps(child);\n normalizeInject(child);\n normalizeDirectives(child);\n var extendsFrom = child.extends;\n if (extendsFrom) {\n parent = mergeOptions(parent, extendsFrom, vm);\n }\n if (child.mixins) {\n for (var i = 0, l = child.mixins.length; i < l; i++) {\n parent = mergeOptions(parent, child.mixins[i], vm);\n }\n }\n var options = {};\n var key;\n for (key in parent) {\n mergeField(key);\n }\n for (key in child) {\n if (!hasOwn(parent, key)) {\n mergeField(key);\n }\n }\n function mergeField(key) {\n var strat = strats[key] || defaultStrat;\n options[key] = strat(parent[key], child[key], vm, key);\n }\n return options;\n}", "function mergeOptions(parent, child, vm) {\n if (\"development\" !== 'production') {\n checkComponents(child);\n }\n\n if (typeof child === 'function') {\n child = child.options;\n }\n\n normalizeProps(child, vm);\n normalizeInject(child, vm);\n normalizeDirectives(child);\n var extendsFrom = child.extends;\n if (extendsFrom) {\n parent = mergeOptions(parent, extendsFrom, vm);\n }\n if (child.mixins) {\n for (var i = 0, l = child.mixins.length; i < l; i++) {\n parent = mergeOptions(parent, child.mixins[i], vm);\n }\n }\n var options = {};\n var key;\n for (key in parent) {\n mergeField(key);\n }\n for (key in child) {\n if (!hasOwn(parent, key)) {\n mergeField(key);\n }\n }\n function mergeField(key) {\n var strat = strats[key] || defaultStrat;\n options[key] = strat(parent[key], child[key], vm, key);\n }\n return options;\n}", "function mergeAssets(\n parentVal,\n childVal,\n vm,\n key,\n ) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal);\n } else {\n return res;\n }\n }", "function mergeOptions(parent, child, vm) {\n if ('development' !== 'production') {\n checkComponents(child);\n }\n\n if (typeof child === 'function') {\n child = child.options;\n }\n\n normalizeProps(child, vm);\n normalizeInject(child, vm);\n normalizeDirectives(child);\n var extendsFrom = child.extends;\n if (extendsFrom) {\n parent = mergeOptions(parent, extendsFrom, vm);\n }\n if (child.mixins) {\n for (var i = 0, l = child.mixins.length; i < l; i++) {\n parent = mergeOptions(parent, child.mixins[i], vm);\n }\n }\n var options = {};\n var key;\n for (key in parent) {\n mergeField(key);\n }\n for (key in child) {\n if (!hasOwn(parent, key)) {\n mergeField(key);\n }\n }\n function mergeField(key) {\n var strat = strats[key] || defaultStrat;\n options[key] = strat(parent[key], child[key], vm, key);\n }\n return options;\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n ) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n }", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n ) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n }", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n ) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n }", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}" ]
[ "0.6300831", "0.6300831", "0.6089327", "0.6089327", "0.6089327", "0.6089327", "0.60666543", "0.60659266", "0.60659266", "0.60654974", "0.60507345", "0.6047087", "0.6047087", "0.6047087", "0.6047087", "0.6047087", "0.6047087", "0.6047087", "0.6047087", "0.6047087", "0.6047087", "0.6047087", "0.6047087", "0.6047087", "0.6047087", "0.6047087", "0.6047087", "0.6047087", "0.6047087", "0.6047087", "0.6047087", "0.6047087", "0.6047087", "0.6047087", "0.6044756", "0.6022716", "0.6022716", "0.6022716", "0.6022716", "0.6022716", "0.6022716", "0.6022716", "0.6022716", "0.6022716", "0.6022716", "0.6022716", "0.60226667", "0.6003963", "0.6003963", "0.6003963", "0.6003963", "0.6003963", "0.6003963", "0.6003963", "0.6003963", "0.6003963", "0.6003963", "0.6003963", "0.6003963", "0.6003963", "0.6003963", "0.6003963", "0.6003963", "0.6003963", "0.6003963", "0.6003963", "0.59985894", "0.59871364", "0.59739363", "0.59665227", "0.59344447", "0.5920735", "0.5917531", "0.59093684", "0.59047407", "0.5903208", "0.5900057", "0.5899452", "0.58980274", "0.5896429", "0.5890821", "0.5890821", "0.5890821", "0.5883351", "0.5883351", "0.5883351", "0.5883351", "0.5883351", "0.5883351", "0.5883351", "0.5883351", "0.5883351", "0.5883351", "0.5883351", "0.5883351", "0.5883351", "0.5883351", "0.5883351", "0.5883351", "0.5883351", "0.5883351" ]
0.0
-1
Ensure all props option syntax are normalized into the Objectbased format.
function normalizeProps (options, vm) { var props = options.props; if (!props) { return } var res = {}; var i, val, name; if (Array.isArray(props)) { i = props.length; while (i--) { val = props[i]; if (typeof val === 'string') { name = camelize(val); res[name] = { type: null }; } else if (false) {} } } else if (isPlainObject(props)) { for (var key in props) { val = props[key]; name = camelize(key); res[name] = isPlainObject(val) ? val : { type: val }; } } else if (false) {} options.props = res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n }", "function normalizeProps(options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val) ?\n val : { type: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n }", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n }", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n }", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n }", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n }", "function normalizeProps(options, vm) {\n var props = options.props;\n if (!props) return;\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === \"string\") {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn(\"props must be strings when using array syntax.\");\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val) ? val : { type: val };\n }\n } else {\n warn(\n 'Invalid value for option \"props\": expected an Array or an Object, ' +\n \"but got \" + (toRawType(props)) + \".\",\n vm,\n );\n }\n options.props = res;\n }", "function normalizeProps(options, vm) {\n var props = options.props;\n if (!props) {\n return\n }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = {type: null};\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : {type: val};\n }\n } else {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n }", "function normalizeProps(options, vm) {\n var props = options.props;\n if (!props)\n return;\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n }\n else {\n warn('props must be strings when using array syntax.');\n }\n }\n }\n else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val) ? val : { type: val };\n }\n }\n else {\n warn(\"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n (\"but got \" + toRawType(props) + \".\"), vm);\n }\n options.props = res;\n }", "function normalizeProps(options,vm){var props=options.props;if(!props){return;}var res={};var i,val,name;if(Array.isArray(props)){i=props.length;while(i--){val=props[i];if(typeof val==='string'){name=camelize(val);res[name]={type:null};}else if(true){warn('props must be strings when using array syntax.');}}}else if(isPlainObject(props)){for(var key in props){val=props[key];name=camelize(key);res[name]=isPlainObject(val)?val:{type:val};}}else if(true){warn(\"Invalid value for option \\\"props\\\": expected an Array or an Object, \"+\"but got \"+toRawType(props)+\".\",vm);}options.props=res;}", "function normalizeProps(options,vm){var props=options.props;if(!props){return;}var res={};var i,val,name;if(Array.isArray(props)){i=props.length;while(i--){val=props[i];if(typeof val==='string'){name=camelize(val);res[name]={type:null};}else if(true){warn('props must be strings when using array syntax.');}}}else if(isPlainObject(props)){for(var key in props){val=props[key];name=camelize(key);res[name]=isPlainObject(val)?val:{type:val};}}else if(true){warn(\"Invalid value for option \\\"props\\\": expected an Array or an Object, \"+\"but got \"+toRawType(props)+\".\",vm);}options.props=res;}", "function normalizeProps(options, vm) {\n var props = options.props;\n if (!props) {\n return;\n }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val) ? val : { type: val };\n }\n } else {\n warn(\"Invalid value for option \\\"props\\\": expected an Array or an Object, \" + \"but got \" + toRawType(props) + \".\", vm);\n }\n options.props = res;\n }", "function normalizeProps (options, vm) {\n\t var props = options.props;\n\t if (!props) { return }\n\t var res = {};\n\t var i, val, name;\n\t if (Array.isArray(props)) {\n\t i = props.length;\n\t while (i--) {\n\t val = props[i];\n\t if (typeof val === 'string') {\n\t name = camelize(val);\n\t res[name] = { type: null };\n\t } else if (false) {\n\t warn('props must be strings when using array syntax.');\n\t }\n\t }\n\t } else if (isPlainObject(props)) {\n\t for (var key in props) {\n\t val = props[key];\n\t name = camelize(key);\n\t res[name] = isPlainObject(val)\n\t ? val\n\t : { type: val };\n\t }\n\t } else if (false) {\n\t warn(\n\t \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n\t \"but got \" + (toRawType(props)) + \".\",\n\t vm\n\t );\n\t }\n\t options.props = res;\n\t}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (true) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps(options){var props=options.props;if(!props){return;}var res={};var i,val,name;if(Array.isArray(props)){i=props.length;while(i--){val=props[i];if(typeof val==='string'){name=camelize(val);res[name]={type:null};}else{warn('props must be strings when using array syntax.');}}}else if(isPlainObject(props)){for(var key in props){val=props[key];name=camelize(key);res[name]=isPlainObject(val)?val:{type:val};}}options.props=res;}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (false) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (false) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (false) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (false) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (false) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (false) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (false) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (false) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (false) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (false) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (false) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (false) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (false) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (false) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (false) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (false) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (false) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (false) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (false) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (false) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (false) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (false) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (false) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (false) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (false) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (false) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (false) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (false) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (false) {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (false) {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}", "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}" ]
[ "0.7324989", "0.7296385", "0.7291816", "0.7291816", "0.7291816", "0.7291816", "0.7290848", "0.72862524", "0.72693557", "0.72679484", "0.72679484", "0.72540116", "0.7219422", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.7185131", "0.71751946", "0.7161213", "0.7161213", "0.7161213", "0.7161213", "0.7161213", "0.7161213", "0.7161213", "0.7161213", "0.7161213", "0.7161213", "0.7161213", "0.7161213", "0.7161213", "0.7161213", "0.7161213", "0.7160688", "0.7160688", "0.7160688", "0.7160688", "0.7160688", "0.7160688", "0.7160688", "0.7160688", "0.7160688", "0.7160688", "0.7160688", "0.7160688", "0.7160688", "0.7160688", "0.7160688", "0.7160688", "0.7160688", "0.7160688", "0.7160688", "0.7160688", "0.7160688", "0.7160688" ]
0.0
-1
Normalize all injections into Objectbased format
function normalizeInject (options, vm) { var inject = options.inject; if (!inject) { return } var normalized = options.inject = {}; if (Array.isArray(inject)) { for (var i = 0; i < inject.length; i++) { normalized[inject[i]] = { from: inject[i] }; } } else if (isPlainObject(inject)) { for (var key in inject) { var val = inject[key]; normalized[key] = isPlainObject(val) ? extend({ from: key }, val) : { from: val }; } } else if (false) {} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function normalizeInject(options) {\n\t var inject = options.inject;\n\t if (Array.isArray(inject)) {\n\t var normalized = options.inject = {};\n\t for (var i = 0; i < inject.length; i++) {\n\t normalized[inject[i]] = inject[i];\n\t }\n\t }\n\t}", "function normalizeInject(options) {\n\t var inject = options.inject;\n\t if (Array.isArray(inject)) {\n\t var normalized = options.inject = {};\n\t for (var i = 0; i < inject.length; i++) {\n\t normalized[inject[i]] = inject[i];\n\t }\n\t }\n\t}", "function normalizeInject (options) {\n var inject = options.inject;\n if (Array.isArray(inject)) {\n var normalized = options.inject = {};\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = inject[i];\n }\n }\n}", "function normalizeInject (options) {\n var inject = options.inject;\n if (Array.isArray(inject)) {\n var normalized = options.inject = {};\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = inject[i];\n }\n }\n}", "function normalizeInject (options) {\n var inject = options.inject;\n if (Array.isArray(inject)) {\n var normalized = options.inject = {};\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = inject[i];\n }\n }\n}", "function normalizeInject (options) {\n var inject = options.inject;\n if (Array.isArray(inject)) {\n var normalized = options.inject = {};\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = inject[i];\n }\n }\n}", "function normalizeInject (options) {\n var inject = options.inject;\n if (Array.isArray(inject)) {\n var normalized = options.inject = {};\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = inject[i];\n }\n }\n}", "function normalizeInject (options) {\n var inject = options.inject;\n if (Array.isArray(inject)) {\n var normalized = options.inject = {};\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = inject[i];\n }\n }\n}", "function normalizeInject (options) {\n var inject = options.inject;\n if (Array.isArray(inject)) {\n var normalized = options.inject = {};\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = inject[i];\n }\n }\n}", "function normalizeInject (options) {\n var inject = options.inject;\n if (Array.isArray(inject)) {\n var normalized = options.inject = {};\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = inject[i];\n }\n }\n}", "function normalizeInject (options) {\n var inject = options.inject;\n if (Array.isArray(inject)) {\n var normalized = options.inject = {};\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = inject[i];\n }\n }\n}", "function normalizeInject(options, vm) {\n var inject = options.inject;\n\n if (!inject) {\n return;\n }\n\n var normalized = options.inject = {};\n\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = {\n from: inject[i]\n };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val) ? extend({\n from: key\n }, val) : {\n from: val\n };\n }\n } else if (false) {}\n}", "function normalizeInject(options, vm) {\n var inject = options.inject;\n\n if (!inject) {\n return;\n }\n\n var normalized = options.inject = {};\n\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = {\n from: inject[i]\n };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val) ? extend({\n from: key\n }, val) : {\n from: val\n };\n }\n } else if (false) {}\n}", "function normalizeInject(options) {\n var inject = options.inject;\n if (Array.isArray(inject)) {\n var normalized = options.inject = {};\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = inject[i];\n }\n }\n}", "function normalizeInject(options) {\n var inject = options.inject;\n if (Array.isArray(inject)) {\n var normalized = options.inject = {};\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = inject[i];\n }\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n }", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n }", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n }", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n }", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n }", "function normalizeInject(options, vm) {\n var inject = options.inject;\n if (!inject) return;\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n 'Invalid value for option \"inject\": expected an Array or an Object, ' +\n \"but got \" + (toRawType(inject)) + \".\",\n vm,\n );\n }\n }", "function normalizeInject (options, vm) {\n var inject = options.inject;\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else if (false) {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else if (false) {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject(options, vm) {\n var inject = options.inject;\n if (!inject)\n return;\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n }\n else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n }\n else {\n warn(\"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n (\"but got \" + toRawType(inject) + \".\"), vm);\n }\n }", "function normalizeInject(options, vm) {\n var inject = options.inject;\n if (!inject) {\n return\n }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = {from: inject[i]};\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({from: key}, val)\n : {from: val};\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n }", "function normalizeInject (options, vm) {\n\t var inject = options.inject;\n\t if (!inject) { return }\n\t var normalized = options.inject = {};\n\t if (Array.isArray(inject)) {\n\t for (var i = 0; i < inject.length; i++) {\n\t normalized[inject[i]] = { from: inject[i] };\n\t }\n\t } else if (isPlainObject(inject)) {\n\t for (var key in inject) {\n\t var val = inject[key];\n\t normalized[key] = isPlainObject(val)\n\t ? extend({ from: key }, val)\n\t : { from: val };\n\t }\n\t } else if (false) {\n\t warn(\n\t \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n\t \"but got \" + (toRawType(inject)) + \".\",\n\t vm\n\t );\n\t }\n\t}", "function normalizeInject(options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val) ?\n extend({ from: key }, val) : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n }", "function normalizeInject(options,vm){var inject=options.inject;var normalized=options.inject={};if(Array.isArray(inject)){for(var i=0;i<inject.length;i++){normalized[inject[i]]={from:inject[i]};}}else if(isPlainObject(inject)){for(var key in inject){var val=inject[key];normalized[key]=isPlainObject(val)?extend({from:key},val):{from:val};}}else if(\"development\"!=='production'&&inject){warn(\"Invalid value for option \\\"inject\\\": expected an Array or an Object, \"+\"but got \"+toRawType(inject)+\".\",vm);}}", "function normalizeInject(options,vm){var inject=options.inject;var normalized=options.inject={};if(Array.isArray(inject)){for(var i=0;i<inject.length;i++){normalized[inject[i]]={from:inject[i]};}}else if(isPlainObject(inject)){for(var key in inject){var val=inject[key];normalized[key]=isPlainObject(val)?extend({from:key},val):{from:val};}}else if(\"development\"!=='production'&&inject){warn(\"Invalid value for option \\\"inject\\\": expected an Array or an Object, \"+\"but got \"+toRawType(inject)+\".\",vm);}}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else if (false) {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else if (false) {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else if (false) {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else if (false) {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else if (false) {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else if (false) {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else if (false) {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else if (false) {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else if (false) {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else if (false) {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else if (false) {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else if (false) {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else if (false) {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\r\n var inject = options.inject;\r\n if (!inject) { return }\r\n var normalized = options.inject = {};\r\n if (Array.isArray(inject)) {\r\n for (var i = 0; i < inject.length; i++) {\r\n normalized[inject[i]] = { from: inject[i] };\r\n }\r\n } else if (isPlainObject(inject)) {\r\n for (var key in inject) {\r\n var val = inject[key];\r\n normalized[key] = isPlainObject(val)\r\n ? extend({ from: key }, val)\r\n : { from: val };\r\n }\r\n } else {\r\n warn(\r\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\r\n \"but got \" + (toRawType(inject)) + \".\",\r\n vm\r\n );\r\n }\r\n}", "function normalizeInject(options, vm) {\n var inject = options.inject;\n\n if (!inject) {\n return;\n }\n\n var normalized = options.inject = {};\n\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = {\n from: inject[i]\n };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val) ? extend({\n from: key\n }, val) : {\n from: val\n };\n }\n } else {\n warn(\"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" + \"but got \" + toRawType(inject) + \".\", vm);\n }\n }", "function normalizeInject (options, vm) {\n\t\tvar inject = options.inject;\n\t\tif (!inject) { return }\n\t\tvar normalized = options.inject = {};\n\t\tif (Array.isArray(inject)) {\n\t\t\tfor (var i = 0; i < inject.length; i++) {\n\t\t\t\tnormalized[inject[i]] = { from: inject[i] };\n\t\t\t}\n\t\t} else if (isPlainObject(inject)) {\n\t\t\tfor (var key in inject) {\n\t\t\t\tvar val = inject[key];\n\t\t\t\tnormalized[key] = isPlainObject(val)\n\t\t\t\t\t? extend({ from: key }, val)\n\t\t\t\t\t: { from: val };\n\t\t\t}\n\t\t} else {\n\t\t\twarn(\n\t\t\t\t\"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n\t\t\t\t\"but got \" + (toRawType(inject)) + \".\".\n\t\t\t\tvm\n\t\t\t);\n\t\t}\n\t}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}", "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else if (true) {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}" ]
[ "0.6662807", "0.6662807", "0.6650511", "0.6650511", "0.6650511", "0.6650511", "0.6650511", "0.6650511", "0.6650511", "0.6650511", "0.6650511", "0.6635942", "0.6635942", "0.66333044", "0.66333044", "0.65843964", "0.65843964", "0.65843964", "0.65843964", "0.65576065", "0.654783", "0.65450084", "0.65450084", "0.65411335", "0.65381384", "0.6531929", "0.6531231", "0.6523711", "0.6523711", "0.65025973", "0.65025973", "0.65025973", "0.65025973", "0.65025973", "0.65025973", "0.65025973", "0.65025973", "0.65025973", "0.65025973", "0.65025973", "0.65025973", "0.65025973", "0.65025973", "0.65025973", "0.65025973", "0.65025973", "0.65025973", "0.65025973", "0.65025973", "0.65025973", "0.65025973", "0.65025973", "0.65025973", "0.65025973", "0.65025973", "0.65025973", "0.65025973", "0.65025973", "0.65025973", "0.65025973", "0.65025973", "0.65025973", "0.65025973", "0.65025973", "0.65025973", "0.65025973", "0.65025973", "0.64856356", "0.64856356", "0.64856356", "0.64856356", "0.64856356", "0.64856356", "0.64856356", "0.64856356", "0.64856356", "0.64856356", "0.64856356", "0.64856356", "0.64856356", "0.64755505", "0.6474918", "0.64745486", "0.64676434", "0.64676434", "0.64676434", "0.64676434", "0.64676434", "0.64676434", "0.64676434", "0.64676434", "0.64676434", "0.64676434", "0.64676434", "0.64676434" ]
0.67549723
5
Normalize raw function directives into object format.
function normalizeDirectives (options) { var dirs = options.directives; if (dirs) { for (var key in dirs) { var def$$1 = dirs[key]; if (typeof def$$1 === 'function') { dirs[key] = { bind: def$$1, update: def$$1 }; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function unwrapFunctions(obj){\n\t\tvar res = {};\n\t\tfor(var p in obj){\n\t\t\tvar tp = typeof(obj[p]); \n\t\t\tif(tp == 'function'){\n\t\t\t\tres[p] = obj[p]();\n\t\t\t}else if(tp == 'object'){\n\t\t\t\tvar un = obj[p]; \n\t\t\t\tif(obj[p] && obj[p]['toJSON']){\n\t\t\t\t\tun = obj[p]['toJSON']();\n\t\t\t\t}\n\t\t\t\tres[p] = unwrapFunctions(un);\n\t\t\t}else{\n\t\t\t\tres[p] = obj[p];\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}", "function tokensToFunction(tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n if (typeof token === 'string') {\n path += token;\n continue;\n }\n var value = data[token.name];\n var segment;\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n continue;\n }\n else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined');\n }\n }\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`');\n }\n if (value.length === 0) {\n if (token.optional) {\n continue;\n }\n else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty');\n }\n }\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`');\n }\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n continue;\n }\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"');\n }\n path += token.prefix + segment;\n }\n return path;\n };\n}", "function tokensToFunction (tokens) {\n\t // Compile all the tokens into regexps.\n\t var matches = new Array(tokens.length);\n\t\n\t // Compile all the patterns before compilation.\n\t for (var i = 0; i < tokens.length; i++) {\n\t if (typeof tokens[i] === 'object') {\n\t matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n\t }\n\t }\n\t\n\t return function (obj, opts) {\n\t var path = '';\n\t var data = obj || {};\n\t var options = opts || {};\n\t var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\t\n\t for (var i = 0; i < tokens.length; i++) {\n\t var token = tokens[i];\n\t\n\t if (typeof token === 'string') {\n\t path += token;\n\t\n\t continue\n\t }\n\t\n\t var value = data[token.name];\n\t var segment;\n\t\n\t if (value == null) {\n\t if (token.optional) {\n\t // Prepend partial segment prefixes.\n\t if (token.partial) {\n\t path += token.prefix;\n\t }\n\t\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to be defined')\n\t }\n\t }\n\t\n\t if (isarray(value)) {\n\t if (!token.repeat) {\n\t throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n\t }\n\t\n\t if (value.length === 0) {\n\t if (token.optional) {\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n\t }\n\t }\n\t\n\t for (var j = 0; j < value.length; j++) {\n\t segment = encode(value[j]);\n\t\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n\t }\n\t\n\t path += (j === 0 ? token.prefix : token.delimiter) + segment;\n\t }\n\t\n\t continue\n\t }\n\t\n\t segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\t\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n\t }\n\t\n\t path += token.prefix + segment;\n\t }\n\t\n\t return path\n\t }\n\t}", "function tokensToFunction (tokens) {\n\t // Compile all the tokens into regexps.\n\t var matches = new Array(tokens.length);\n\t\n\t // Compile all the patterns before compilation.\n\t for (var i = 0; i < tokens.length; i++) {\n\t if (typeof tokens[i] === 'object') {\n\t matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n\t }\n\t }\n\t\n\t return function (obj, opts) {\n\t var path = '';\n\t var data = obj || {};\n\t var options = opts || {};\n\t var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\t\n\t for (var i = 0; i < tokens.length; i++) {\n\t var token = tokens[i];\n\t\n\t if (typeof token === 'string') {\n\t path += token;\n\t\n\t continue\n\t }\n\t\n\t var value = data[token.name];\n\t var segment;\n\t\n\t if (value == null) {\n\t if (token.optional) {\n\t // Prepend partial segment prefixes.\n\t if (token.partial) {\n\t path += token.prefix;\n\t }\n\t\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to be defined')\n\t }\n\t }\n\t\n\t if (isarray(value)) {\n\t if (!token.repeat) {\n\t throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n\t }\n\t\n\t if (value.length === 0) {\n\t if (token.optional) {\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n\t }\n\t }\n\t\n\t for (var j = 0; j < value.length; j++) {\n\t segment = encode(value[j]);\n\t\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n\t }\n\t\n\t path += (j === 0 ? token.prefix : token.delimiter) + segment;\n\t }\n\t\n\t continue\n\t }\n\t\n\t segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\t\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n\t }\n\t\n\t path += token.prefix + segment;\n\t }\n\t\n\t return path\n\t }\n\t}", "function tokensToFunction (tokens) {\n\t // Compile all the tokens into regexps.\n\t var matches = new Array(tokens.length);\n\t\n\t // Compile all the patterns before compilation.\n\t for (var i = 0; i < tokens.length; i++) {\n\t if (typeof tokens[i] === 'object') {\n\t matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n\t }\n\t }\n\t\n\t return function (obj, opts) {\n\t var path = '';\n\t var data = obj || {};\n\t var options = opts || {};\n\t var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\t\n\t for (var i = 0; i < tokens.length; i++) {\n\t var token = tokens[i];\n\t\n\t if (typeof token === 'string') {\n\t path += token;\n\t\n\t continue\n\t }\n\t\n\t var value = data[token.name];\n\t var segment;\n\t\n\t if (value == null) {\n\t if (token.optional) {\n\t // Prepend partial segment prefixes.\n\t if (token.partial) {\n\t path += token.prefix;\n\t }\n\t\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to be defined')\n\t }\n\t }\n\t\n\t if (isarray(value)) {\n\t if (!token.repeat) {\n\t throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n\t }\n\t\n\t if (value.length === 0) {\n\t if (token.optional) {\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n\t }\n\t }\n\t\n\t for (var j = 0; j < value.length; j++) {\n\t segment = encode(value[j]);\n\t\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n\t }\n\t\n\t path += (j === 0 ? token.prefix : token.delimiter) + segment;\n\t }\n\t\n\t continue\n\t }\n\t\n\t segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\t\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n\t }\n\t\n\t path += token.prefix + segment;\n\t }\n\t\n\t return path\n\t }\n\t}", "function tokensToFunction (tokens) {\n\t // Compile all the tokens into regexps.\n\t var matches = new Array(tokens.length);\n\t\n\t // Compile all the patterns before compilation.\n\t for (var i = 0; i < tokens.length; i++) {\n\t if (typeof tokens[i] === 'object') {\n\t matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n\t }\n\t }\n\t\n\t return function (obj, opts) {\n\t var path = '';\n\t var data = obj || {};\n\t var options = opts || {};\n\t var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\t\n\t for (var i = 0; i < tokens.length; i++) {\n\t var token = tokens[i];\n\t\n\t if (typeof token === 'string') {\n\t path += token;\n\t\n\t continue\n\t }\n\t\n\t var value = data[token.name];\n\t var segment;\n\t\n\t if (value == null) {\n\t if (token.optional) {\n\t // Prepend partial segment prefixes.\n\t if (token.partial) {\n\t path += token.prefix;\n\t }\n\t\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to be defined')\n\t }\n\t }\n\t\n\t if (isarray(value)) {\n\t if (!token.repeat) {\n\t throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n\t }\n\t\n\t if (value.length === 0) {\n\t if (token.optional) {\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n\t }\n\t }\n\t\n\t for (var j = 0; j < value.length; j++) {\n\t segment = encode(value[j]);\n\t\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n\t }\n\t\n\t path += (j === 0 ? token.prefix : token.delimiter) + segment;\n\t }\n\t\n\t continue\n\t }\n\t\n\t segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\t\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n\t }\n\t\n\t path += token.prefix + segment;\n\t }\n\t\n\t return path\n\t }\n\t}", "function tokensToFunction(tokens) {\n\t // Compile all the tokens into regexps.\n\t var matches = new Array(tokens.length);\n\t\n\t // Compile all the patterns before compilation.\n\t for (var i = 0; i < tokens.length; i++) {\n\t if (_typeof(tokens[i]) === 'object') {\n\t matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n\t }\n\t }\n\t\n\t return function (obj, opts) {\n\t var path = '';\n\t var data = obj || {};\n\t var options = opts || {};\n\t var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\t\n\t for (var i = 0; i < tokens.length; i++) {\n\t var token = tokens[i];\n\t\n\t if (typeof token === 'string') {\n\t path += token;\n\t\n\t continue;\n\t }\n\t\n\t var value = data[token.name];\n\t var segment;\n\t\n\t if (value == null) {\n\t if (token.optional) {\n\t // Prepend partial segment prefixes.\n\t if (token.partial) {\n\t path += token.prefix;\n\t }\n\t\n\t continue;\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to be defined');\n\t }\n\t }\n\t\n\t if (isarray(value)) {\n\t if (!token.repeat) {\n\t throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`');\n\t }\n\t\n\t if (value.length === 0) {\n\t if (token.optional) {\n\t continue;\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to not be empty');\n\t }\n\t }\n\t\n\t for (var j = 0; j < value.length; j++) {\n\t segment = encode(value[j]);\n\t\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`');\n\t }\n\t\n\t path += (j === 0 ? token.prefix : token.delimiter) + segment;\n\t }\n\t\n\t continue;\n\t }\n\t\n\t segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\t\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"');\n\t }\n\t\n\t path += token.prefix + segment;\n\t }\n\t\n\t return path;\n\t };\n\t}", "function tokensToFunction(tokens) {\r\n // Compile all the tokens into regexps.\r\n var matches = new Array(tokens.length);\r\n\r\n // Compile all the patterns before compilation.\r\n for (var i = 0; i < tokens.length; i++) {\r\n if (_typeof(tokens[i]) === 'object') {\r\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\r\n }\r\n }\r\n\r\n return function (obj, opts) {\r\n var path = '';\r\n var data = obj || {};\r\n var options = opts || {};\r\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\r\n\r\n for (var i = 0; i < tokens.length; i++) {\r\n var token = tokens[i];\r\n\r\n if (typeof token === 'string') {\r\n path += token;\r\n\r\n continue;\r\n }\r\n\r\n var value = data[token.name];\r\n var segment;\r\n\r\n if (value == null) {\r\n if (token.optional) {\r\n // Prepend partial segment prefixes.\r\n if (token.partial) {\r\n path += token.prefix;\r\n }\r\n\r\n continue;\r\n } else {\r\n throw new TypeError('Expected \"' + token.name + '\" to be defined');\r\n }\r\n }\r\n\r\n if (isarray(value)) {\r\n if (!token.repeat) {\r\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`');\r\n }\r\n\r\n if (value.length === 0) {\r\n if (token.optional) {\r\n continue;\r\n } else {\r\n throw new TypeError('Expected \"' + token.name + '\" to not be empty');\r\n }\r\n }\r\n\r\n for (var j = 0; j < value.length; j++) {\r\n segment = encode(value[j]);\r\n\r\n if (!matches[i].test(segment)) {\r\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`');\r\n }\r\n\r\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\r\n }\r\n\r\n continue;\r\n }\r\n\r\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\r\n\r\n if (!matches[i].test(segment)) {\r\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"');\r\n }\r\n\r\n path += token.prefix + segment;\r\n }\r\n\r\n return path;\r\n };\r\n }", "function normalizedFunctionString(fn) {\n return fn.toString().replace('function(', 'function (');\n}", "function tokensToFunction (tokens) {\n\t // Compile all the tokens into regexps.\n\t var matches = new Array(tokens.length)\n\t\n\t // Compile all the patterns before compilation.\n\t for (var i = 0; i < tokens.length; i++) {\n\t if (typeof tokens[i] === 'object') {\n\t matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n\t }\n\t }\n\t\n\t return function (obj, opts) {\n\t var path = ''\n\t var data = obj || {}\n\t var options = opts || {}\n\t var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\t\n\t for (var i = 0; i < tokens.length; i++) {\n\t var token = tokens[i]\n\t\n\t if (typeof token === 'string') {\n\t path += token\n\t\n\t continue\n\t }\n\t\n\t var value = data[token.name]\n\t var segment\n\t\n\t if (value == null) {\n\t if (token.optional) {\n\t // Prepend partial segment prefixes.\n\t if (token.partial) {\n\t path += token.prefix\n\t }\n\t\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to be defined')\n\t }\n\t }\n\t\n\t if (isarray(value)) {\n\t if (!token.repeat) {\n\t throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n\t }\n\t\n\t if (value.length === 0) {\n\t if (token.optional) {\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n\t }\n\t }\n\t\n\t for (var j = 0; j < value.length; j++) {\n\t segment = encode(value[j])\n\t\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n\t }\n\t\n\t path += (j === 0 ? token.prefix : token.delimiter) + segment\n\t }\n\t\n\t continue\n\t }\n\t\n\t segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\t\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n\t }\n\t\n\t path += token.prefix + segment\n\t }\n\t\n\t return path\n\t }\n\t}", "function tokensToFunction (tokens) {\n\t // Compile all the tokens into regexps.\n\t var matches = new Array(tokens.length)\n\t\n\t // Compile all the patterns before compilation.\n\t for (var i = 0; i < tokens.length; i++) {\n\t if (typeof tokens[i] === 'object') {\n\t matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n\t }\n\t }\n\t\n\t return function (obj, opts) {\n\t var path = ''\n\t var data = obj || {}\n\t var options = opts || {}\n\t var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\t\n\t for (var i = 0; i < tokens.length; i++) {\n\t var token = tokens[i]\n\t\n\t if (typeof token === 'string') {\n\t path += token\n\t\n\t continue\n\t }\n\t\n\t var value = data[token.name]\n\t var segment\n\t\n\t if (value == null) {\n\t if (token.optional) {\n\t // Prepend partial segment prefixes.\n\t if (token.partial) {\n\t path += token.prefix\n\t }\n\t\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to be defined')\n\t }\n\t }\n\t\n\t if (isarray(value)) {\n\t if (!token.repeat) {\n\t throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n\t }\n\t\n\t if (value.length === 0) {\n\t if (token.optional) {\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n\t }\n\t }\n\t\n\t for (var j = 0; j < value.length; j++) {\n\t segment = encode(value[j])\n\t\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n\t }\n\t\n\t path += (j === 0 ? token.prefix : token.delimiter) + segment\n\t }\n\t\n\t continue\n\t }\n\t\n\t segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\t\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n\t }\n\t\n\t path += token.prefix + segment\n\t }\n\t\n\t return path\n\t }\n\t}", "function tokensToFunction (tokens) {\n\t // Compile all the tokens into regexps.\n\t var matches = new Array(tokens.length)\n\t\n\t // Compile all the patterns before compilation.\n\t for (var i = 0; i < tokens.length; i++) {\n\t if (typeof tokens[i] === 'object') {\n\t matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n\t }\n\t }\n\t\n\t return function (obj, opts) {\n\t var path = ''\n\t var data = obj || {}\n\t var options = opts || {}\n\t var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\t\n\t for (var i = 0; i < tokens.length; i++) {\n\t var token = tokens[i]\n\t\n\t if (typeof token === 'string') {\n\t path += token\n\t\n\t continue\n\t }\n\t\n\t var value = data[token.name]\n\t var segment\n\t\n\t if (value == null) {\n\t if (token.optional) {\n\t // Prepend partial segment prefixes.\n\t if (token.partial) {\n\t path += token.prefix\n\t }\n\t\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to be defined')\n\t }\n\t }\n\t\n\t if (isarray(value)) {\n\t if (!token.repeat) {\n\t throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n\t }\n\t\n\t if (value.length === 0) {\n\t if (token.optional) {\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n\t }\n\t }\n\t\n\t for (var j = 0; j < value.length; j++) {\n\t segment = encode(value[j])\n\t\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n\t }\n\t\n\t path += (j === 0 ? token.prefix : token.delimiter) + segment\n\t }\n\t\n\t continue\n\t }\n\t\n\t segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\t\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n\t }\n\t\n\t path += token.prefix + segment\n\t }\n\t\n\t return path\n\t }\n\t}", "function normalize(obj) {\n var result = obj;\n if (typeof obj !== \"function\") {\n if (typeof obj !== \"undefined\") {\n if (typeof obj !== \"object\") {\n result = (function(value) { return function() { return value; }; })(obj);\n } else {\n result = (function(o) { return function(key) {\n if (o[key] === void 0) {\n if (o.__default) {\n return o.__default;\n }\n return key;\n } else {\n return o[key];\n }\n }; })(obj);\n }\n } else {\n result = function(passthru) { return passthru; };\n }\n }\n return result;\n}", "function tokensToFunction (tokens) {\n\t // Compile all the tokens into regexps.\n\t var matches = new Array(tokens.length);\n\t\n\t // Compile all the patterns before compilation.\n\t for (var i = 0; i < tokens.length; i++) {\n\t if (typeof tokens[i] === 'object') {\n\t matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n\t }\n\t }\n\t\n\t return function (obj, opts) {\n\t var path = '';\n\t var data = obj || {};\n\t var options = opts || {};\n\t var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\t\n\t for (var i = 0; i < tokens.length; i++) {\n\t var token = tokens[i];\n\t\n\t if (typeof token === 'string') {\n\t path += token;\n\t\n\t continue\n\t }\n\t\n\t var value = data[token.name];\n\t var segment;\n\t\n\t if (value == null) {\n\t if (token.optional) {\n\t // Prepend partial segment prefixes.\n\t if (token.partial) {\n\t path += token.prefix;\n\t }\n\t\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to be defined')\n\t }\n\t }\n\t\n\t if (index$1(value)) {\n\t if (!token.repeat) {\n\t throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n\t }\n\t\n\t if (value.length === 0) {\n\t if (token.optional) {\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n\t }\n\t }\n\t\n\t for (var j = 0; j < value.length; j++) {\n\t segment = encode(value[j]);\n\t\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n\t }\n\t\n\t path += (j === 0 ? token.prefix : token.delimiter) + segment;\n\t }\n\t\n\t continue\n\t }\n\t\n\t segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\t\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n\t }\n\t\n\t path += token.prefix + segment;\n\t }\n\t\n\t return path\n\t }\n\t}", "function tokensToFunction (tokens) {\r\n // Compile all the tokens into regexps.\r\n var matches = new Array(tokens.length);\r\n\r\n // Compile all the patterns before compilation.\r\n for (var i = 0; i < tokens.length; i++) {\r\n if (typeof tokens[i] === 'object') {\r\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\r\n }\r\n }\r\n\r\n return function (obj, opts) {\r\n var path = '';\r\n var data = obj || {};\r\n var options = opts || {};\r\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\r\n\r\n for (var i = 0; i < tokens.length; i++) {\r\n var token = tokens[i];\r\n\r\n if (typeof token === 'string') {\r\n path += token;\r\n\r\n continue\r\n }\r\n\r\n var value = data[token.name];\r\n var segment;\r\n\r\n if (value == null) {\r\n if (token.optional) {\r\n // Prepend partial segment prefixes.\r\n if (token.partial) {\r\n path += token.prefix;\r\n }\r\n\r\n continue\r\n } else {\r\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\r\n }\r\n }\r\n\r\n if (isarray(value)) {\r\n if (!token.repeat) {\r\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\r\n }\r\n\r\n if (value.length === 0) {\r\n if (token.optional) {\r\n continue\r\n } else {\r\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\r\n }\r\n }\r\n\r\n for (var j = 0; j < value.length; j++) {\r\n segment = encode(value[j]);\r\n\r\n if (!matches[i].test(segment)) {\r\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\r\n }\r\n\r\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\r\n }\r\n\r\n continue\r\n }\r\n\r\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\r\n\r\n if (!matches[i].test(segment)) {\r\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\r\n }\r\n\r\n path += token.prefix + segment;\r\n }\r\n\r\n return path\r\n }\r\n}", "function tokensToFunction(tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length); // Compile all the patterns before compilation.\n\n for (var i = 0; i < tokens.length; i++) {\n if (_typeof(tokens[i]) === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n continue;\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined');\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`');\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty');\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`');\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue;\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"');\n }\n\n path += token.prefix + segment;\n }\n\n return path;\n };\n}", "function tokensToFunction(tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length); // Compile all the patterns before compilation.\n\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n continue;\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined');\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`');\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty');\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`');\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue;\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"');\n }\n\n path += token.prefix + segment;\n }\n\n return path;\n };\n}", "function tokensToFunction(tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length); // Compile all the patterns before compilation.\n\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n continue;\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined');\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`');\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty');\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`');\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue;\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"');\n }\n\n path += token.prefix + segment;\n }\n\n return path;\n };\n}", "function tokensToFunction(tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length); // Compile all the patterns before compilation.\n\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n continue;\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined');\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`');\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty');\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`');\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue;\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"');\n }\n\n path += token.prefix + segment;\n }\n\n return path;\n };\n}", "function tokensToFunction(tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (_typeof(tokens[i]) === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue;\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined');\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`');\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty');\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`');\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue;\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"');\n }\n\n path += token.prefix + segment;\n }\n\n return path;\n };\n}", "function tokensToFunction(tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (_typeof(tokens[i]) === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue;\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined');\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`');\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty');\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`');\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue;\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"');\n }\n\n path += token.prefix + segment;\n }\n\n return path;\n };\n}", "function tokensToFunction(tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (_typeof(tokens[i]) === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue;\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined');\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`');\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty');\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`');\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue;\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"');\n }\n\n path += token.prefix + segment;\n }\n\n return path;\n };\n}", "function tokensToFunction(tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (_typeof(tokens[i]) === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue;\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined');\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`');\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty');\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`');\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue;\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"');\n }\n\n path += token.prefix + segment;\n }\n\n return path;\n };\n}", "function tokensToFunction(tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (_typeof(tokens[i]) === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue;\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined');\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`');\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty');\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`');\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue;\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"');\n }\n\n path += token.prefix + segment;\n }\n\n return path;\n };\n}", "function tokensToFunction(tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (_typeof(tokens[i]) === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue;\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined');\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`');\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty');\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`');\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue;\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"');\n }\n\n path += token.prefix + segment;\n }\n\n return path;\n };\n}", "function tokensToFunction(tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (_typeof(tokens[i]) === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue;\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined');\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`');\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty');\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`');\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue;\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"');\n }\n\n path += token.prefix + segment;\n }\n\n return path;\n };\n}", "function tokensToFunction(tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue;\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined');\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`');\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty');\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`');\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue;\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"');\n }\n\n path += token.prefix + segment;\n }\n\n return path;\n };\n}", "function tokensToFunction(tokens){// Compile all the tokens into regexps.\nvar matches=new Array(tokens.length);// Compile all the patterns before compilation.\nfor(var i=0;i<tokens.length;i++){if(_typeof(tokens[i])==='object'){matches[i]=new RegExp('^(?:'+tokens[i].pattern+')$');}}return function(obj,opts){var path='';var data=obj||{};var options=opts||{};var encode=options.pretty?encodeURIComponentPretty:encodeURIComponent;for(var i=0;i<tokens.length;i++){var token=tokens[i];if(typeof token==='string'){path+=token;continue;}var value=data[token.name];var segment;if(value==null){if(token.optional){// Prepend partial segment prefixes.\nif(token.partial){path+=token.prefix;}continue;}else{throw new TypeError('Expected \"'+token.name+'\" to be defined');}}if(isarray(value)){if(!token.repeat){throw new TypeError('Expected \"'+token.name+'\" to not repeat, but received `'+JSON.stringify(value)+'`');}if(value.length===0){if(token.optional){continue;}else{throw new TypeError('Expected \"'+token.name+'\" to not be empty');}}for(var j=0;j<value.length;j++){segment=encode(value[j]);if(!matches[i].test(segment)){throw new TypeError('Expected all \"'+token.name+'\" to match \"'+token.pattern+'\", but received `'+JSON.stringify(segment)+'`');}path+=(j===0?token.prefix:token.delimiter)+segment;}continue;}segment=token.asterisk?encodeAsterisk(value):encode(value);if(!matches[i].test(segment)){throw new TypeError('Expected \"'+token.name+'\" to match \"'+token.pattern+'\", but received \"'+segment+'\"');}path+=token.prefix+segment;}return path;};}", "function tokensToFunction(tokens){// Compile all the tokens into regexps.\nvar matches=new Array(tokens.length);// Compile all the patterns before compilation.\nfor(var i=0;i<tokens.length;i++){if(_typeof(tokens[i])==='object'){matches[i]=new RegExp('^(?:'+tokens[i].pattern+')$');}}return function(obj,opts){var path='';var data=obj||{};var options=opts||{};var encode=options.pretty?encodeURIComponentPretty:encodeURIComponent;for(var i=0;i<tokens.length;i++){var token=tokens[i];if(typeof token==='string'){path+=token;continue;}var value=data[token.name];var segment;if(value==null){if(token.optional){// Prepend partial segment prefixes.\nif(token.partial){path+=token.prefix;}continue;}else{throw new TypeError('Expected \"'+token.name+'\" to be defined');}}if(isarray(value)){if(!token.repeat){throw new TypeError('Expected \"'+token.name+'\" to not repeat, but received `'+JSON.stringify(value)+'`');}if(value.length===0){if(token.optional){continue;}else{throw new TypeError('Expected \"'+token.name+'\" to not be empty');}}for(var j=0;j<value.length;j++){segment=encode(value[j]);if(!matches[i].test(segment)){throw new TypeError('Expected all \"'+token.name+'\" to match \"'+token.pattern+'\", but received `'+JSON.stringify(segment)+'`');}path+=(j===0?token.prefix:token.delimiter)+segment;}continue;}segment=token.asterisk?encodeAsterisk(value):encode(value);if(!matches[i].test(segment)){throw new TypeError('Expected \"'+token.name+'\" to match \"'+token.pattern+'\", but received \"'+segment+'\"');}path+=token.prefix+segment;}return path;};}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "static _parseFunctionData (index, data) {\n var func, name;\n\n if (typeof (data) == 'function') {\n func = data;\n name = index;\n } else {\n func = data.functionCall;\n name = data.name;\n }\n\n return { func, name }\n }", "function tokensToFunction (tokens) {\n\t // Compile all the tokens into regexps.\n\t var matches = new Array(tokens.length);\n\n\t // Compile all the patterns before compilation.\n\t for (var i = 0; i < tokens.length; i++) {\n\t if (typeof tokens[i] === 'object') {\n\t matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n\t }\n\t }\n\n\t return function (obj, opts) {\n\t var path = '';\n\t var data = obj || {};\n\t var options = opts || {};\n\t var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n\t for (var i = 0; i < tokens.length; i++) {\n\t var token = tokens[i];\n\n\t if (typeof token === 'string') {\n\t path += token;\n\n\t continue\n\t }\n\n\t var value = data[token.name];\n\t var segment;\n\n\t if (value == null) {\n\t if (token.optional) {\n\t // Prepend partial segment prefixes.\n\t if (token.partial) {\n\t path += token.prefix;\n\t }\n\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to be defined')\n\t }\n\t }\n\n\t if (isarray(value)) {\n\t if (!token.repeat) {\n\t throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n\t }\n\n\t if (value.length === 0) {\n\t if (token.optional) {\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n\t }\n\t }\n\n\t for (var j = 0; j < value.length; j++) {\n\t segment = encode(value[j]);\n\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n\t }\n\n\t path += (j === 0 ? token.prefix : token.delimiter) + segment;\n\t }\n\n\t continue\n\t }\n\n\t segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n\t }\n\n\t path += token.prefix + segment;\n\t }\n\n\t return path\n\t }\n\t}", "function tokensToFunction (tokens) {\n\t // Compile all the tokens into regexps.\n\t var matches = new Array(tokens.length);\n\n\t // Compile all the patterns before compilation.\n\t for (var i = 0; i < tokens.length; i++) {\n\t if (typeof tokens[i] === 'object') {\n\t matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n\t }\n\t }\n\n\t return function (obj, opts) {\n\t var path = '';\n\t var data = obj || {};\n\t var options = opts || {};\n\t var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n\t for (var i = 0; i < tokens.length; i++) {\n\t var token = tokens[i];\n\n\t if (typeof token === 'string') {\n\t path += token;\n\n\t continue\n\t }\n\n\t var value = data[token.name];\n\t var segment;\n\n\t if (value == null) {\n\t if (token.optional) {\n\t // Prepend partial segment prefixes.\n\t if (token.partial) {\n\t path += token.prefix;\n\t }\n\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to be defined')\n\t }\n\t }\n\n\t if (isarray(value)) {\n\t if (!token.repeat) {\n\t throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n\t }\n\n\t if (value.length === 0) {\n\t if (token.optional) {\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n\t }\n\t }\n\n\t for (var j = 0; j < value.length; j++) {\n\t segment = encode(value[j]);\n\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n\t }\n\n\t path += (j === 0 ? token.prefix : token.delimiter) + segment;\n\t }\n\n\t continue\n\t }\n\n\t segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n\t }\n\n\t path += token.prefix + segment;\n\t }\n\n\t return path\n\t }\n\t}", "function tokensToFunction (tokens) {\n\t // Compile all the tokens into regexps.\n\t var matches = new Array(tokens.length)\n\n\t // Compile all the patterns before compilation.\n\t for (var i = 0; i < tokens.length; i++) {\n\t if (typeof tokens[i] === 'object') {\n\t matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n\t }\n\t }\n\n\t return function (obj, opts) {\n\t var path = ''\n\t var data = obj || {}\n\t var options = opts || {}\n\t var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n\t for (var i = 0; i < tokens.length; i++) {\n\t var token = tokens[i]\n\n\t if (typeof token === 'string') {\n\t path += token\n\n\t continue\n\t }\n\n\t var value = data[token.name]\n\t var segment\n\n\t if (value == null) {\n\t if (token.optional) {\n\t // Prepend partial segment prefixes.\n\t if (token.partial) {\n\t path += token.prefix\n\t }\n\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to be defined')\n\t }\n\t }\n\n\t if (isarray(value)) {\n\t if (!token.repeat) {\n\t throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n\t }\n\n\t if (value.length === 0) {\n\t if (token.optional) {\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n\t }\n\t }\n\n\t for (var j = 0; j < value.length; j++) {\n\t segment = encode(value[j])\n\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n\t }\n\n\t path += (j === 0 ? token.prefix : token.delimiter) + segment\n\t }\n\n\t continue\n\t }\n\n\t segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n\t }\n\n\t path += token.prefix + segment\n\t }\n\n\t return path\n\t }\n\t}", "function tokensToFunction (tokens) {\n\t // Compile all the tokens into regexps.\n\t var matches = new Array(tokens.length)\n\n\t // Compile all the patterns before compilation.\n\t for (var i = 0; i < tokens.length; i++) {\n\t if (typeof tokens[i] === 'object') {\n\t matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n\t }\n\t }\n\n\t return function (obj, opts) {\n\t var path = ''\n\t var data = obj || {}\n\t var options = opts || {}\n\t var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n\t for (var i = 0; i < tokens.length; i++) {\n\t var token = tokens[i]\n\n\t if (typeof token === 'string') {\n\t path += token\n\n\t continue\n\t }\n\n\t var value = data[token.name]\n\t var segment\n\n\t if (value == null) {\n\t if (token.optional) {\n\t // Prepend partial segment prefixes.\n\t if (token.partial) {\n\t path += token.prefix\n\t }\n\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to be defined')\n\t }\n\t }\n\n\t if (isarray(value)) {\n\t if (!token.repeat) {\n\t throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n\t }\n\n\t if (value.length === 0) {\n\t if (token.optional) {\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n\t }\n\t }\n\n\t for (var j = 0; j < value.length; j++) {\n\t segment = encode(value[j])\n\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n\t }\n\n\t path += (j === 0 ? token.prefix : token.delimiter) + segment\n\t }\n\n\t continue\n\t }\n\n\t segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n\t }\n\n\t path += token.prefix + segment\n\t }\n\n\t return path\n\t }\n\t}", "function tokensToFunction (tokens) {\n\t // Compile all the tokens into regexps.\n\t var matches = new Array(tokens.length)\n\n\t // Compile all the patterns before compilation.\n\t for (var i = 0; i < tokens.length; i++) {\n\t if (typeof tokens[i] === 'object') {\n\t matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n\t }\n\t }\n\n\t return function (obj, opts) {\n\t var path = ''\n\t var data = obj || {}\n\t var options = opts || {}\n\t var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n\t for (var i = 0; i < tokens.length; i++) {\n\t var token = tokens[i]\n\n\t if (typeof token === 'string') {\n\t path += token\n\n\t continue\n\t }\n\n\t var value = data[token.name]\n\t var segment\n\n\t if (value == null) {\n\t if (token.optional) {\n\t // Prepend partial segment prefixes.\n\t if (token.partial) {\n\t path += token.prefix\n\t }\n\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to be defined')\n\t }\n\t }\n\n\t if (isarray(value)) {\n\t if (!token.repeat) {\n\t throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n\t }\n\n\t if (value.length === 0) {\n\t if (token.optional) {\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n\t }\n\t }\n\n\t for (var j = 0; j < value.length; j++) {\n\t segment = encode(value[j])\n\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n\t }\n\n\t path += (j === 0 ? token.prefix : token.delimiter) + segment\n\t }\n\n\t continue\n\t }\n\n\t segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n\t }\n\n\t path += token.prefix + segment\n\t }\n\n\t return path\n\t }\n\t}", "function tokensToFunction (tokens) {\n\t // Compile all the tokens into regexps.\n\t var matches = new Array(tokens.length)\n\n\t // Compile all the patterns before compilation.\n\t for (var i = 0; i < tokens.length; i++) {\n\t if (typeof tokens[i] === 'object') {\n\t matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n\t }\n\t }\n\n\t return function (obj, opts) {\n\t var path = ''\n\t var data = obj || {}\n\t var options = opts || {}\n\t var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n\t for (var i = 0; i < tokens.length; i++) {\n\t var token = tokens[i]\n\n\t if (typeof token === 'string') {\n\t path += token\n\n\t continue\n\t }\n\n\t var value = data[token.name]\n\t var segment\n\n\t if (value == null) {\n\t if (token.optional) {\n\t // Prepend partial segment prefixes.\n\t if (token.partial) {\n\t path += token.prefix\n\t }\n\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to be defined')\n\t }\n\t }\n\n\t if (isarray(value)) {\n\t if (!token.repeat) {\n\t throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n\t }\n\n\t if (value.length === 0) {\n\t if (token.optional) {\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n\t }\n\t }\n\n\t for (var j = 0; j < value.length; j++) {\n\t segment = encode(value[j])\n\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n\t }\n\n\t path += (j === 0 ? token.prefix : token.delimiter) + segment\n\t }\n\n\t continue\n\t }\n\n\t segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n\t }\n\n\t path += token.prefix + segment\n\t }\n\n\t return path\n\t }\n\t}", "function tokensToFunction (tokens) {\n\t // Compile all the tokens into regexps.\n\t var matches = new Array(tokens.length)\n\n\t // Compile all the patterns before compilation.\n\t for (var i = 0; i < tokens.length; i++) {\n\t if (typeof tokens[i] === 'object') {\n\t matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n\t }\n\t }\n\n\t return function (obj, opts) {\n\t var path = ''\n\t var data = obj || {}\n\t var options = opts || {}\n\t var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n\t for (var i = 0; i < tokens.length; i++) {\n\t var token = tokens[i]\n\n\t if (typeof token === 'string') {\n\t path += token\n\n\t continue\n\t }\n\n\t var value = data[token.name]\n\t var segment\n\n\t if (value == null) {\n\t if (token.optional) {\n\t // Prepend partial segment prefixes.\n\t if (token.partial) {\n\t path += token.prefix\n\t }\n\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to be defined')\n\t }\n\t }\n\n\t if (isarray(value)) {\n\t if (!token.repeat) {\n\t throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n\t }\n\n\t if (value.length === 0) {\n\t if (token.optional) {\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n\t }\n\t }\n\n\t for (var j = 0; j < value.length; j++) {\n\t segment = encode(value[j])\n\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n\t }\n\n\t path += (j === 0 ? token.prefix : token.delimiter) + segment\n\t }\n\n\t continue\n\t }\n\n\t segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n\t }\n\n\t path += token.prefix + segment\n\t }\n\n\t return path\n\t }\n\t}", "function tokensToFunction (tokens) {\n\t // Compile all the tokens into regexps.\n\t var matches = new Array(tokens.length)\n\n\t // Compile all the patterns before compilation.\n\t for (var i = 0; i < tokens.length; i++) {\n\t if (typeof tokens[i] === 'object') {\n\t matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n\t }\n\t }\n\n\t return function (obj, opts) {\n\t var path = ''\n\t var data = obj || {}\n\t var options = opts || {}\n\t var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n\t for (var i = 0; i < tokens.length; i++) {\n\t var token = tokens[i]\n\n\t if (typeof token === 'string') {\n\t path += token\n\n\t continue\n\t }\n\n\t var value = data[token.name]\n\t var segment\n\n\t if (value == null) {\n\t if (token.optional) {\n\t // Prepend partial segment prefixes.\n\t if (token.partial) {\n\t path += token.prefix\n\t }\n\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to be defined')\n\t }\n\t }\n\n\t if (isarray(value)) {\n\t if (!token.repeat) {\n\t throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n\t }\n\n\t if (value.length === 0) {\n\t if (token.optional) {\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n\t }\n\t }\n\n\t for (var j = 0; j < value.length; j++) {\n\t segment = encode(value[j])\n\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n\t }\n\n\t path += (j === 0 ? token.prefix : token.delimiter) + segment\n\t }\n\n\t continue\n\t }\n\n\t segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n\t }\n\n\t path += token.prefix + segment\n\t }\n\n\t return path\n\t }\n\t}", "function tokensToFunction (tokens) {\n\t // Compile all the tokens into regexps.\n\t var matches = new Array(tokens.length)\n\n\t // Compile all the patterns before compilation.\n\t for (var i = 0; i < tokens.length; i++) {\n\t if (typeof tokens[i] === 'object') {\n\t matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n\t }\n\t }\n\n\t return function (obj, opts) {\n\t var path = ''\n\t var data = obj || {}\n\t var options = opts || {}\n\t var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n\t for (var i = 0; i < tokens.length; i++) {\n\t var token = tokens[i]\n\n\t if (typeof token === 'string') {\n\t path += token\n\n\t continue\n\t }\n\n\t var value = data[token.name]\n\t var segment\n\n\t if (value == null) {\n\t if (token.optional) {\n\t // Prepend partial segment prefixes.\n\t if (token.partial) {\n\t path += token.prefix\n\t }\n\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to be defined')\n\t }\n\t }\n\n\t if (isarray(value)) {\n\t if (!token.repeat) {\n\t throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n\t }\n\n\t if (value.length === 0) {\n\t if (token.optional) {\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n\t }\n\t }\n\n\t for (var j = 0; j < value.length; j++) {\n\t segment = encode(value[j])\n\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n\t }\n\n\t path += (j === 0 ? token.prefix : token.delimiter) + segment\n\t }\n\n\t continue\n\t }\n\n\t segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n\t }\n\n\t path += token.prefix + segment\n\t }\n\n\t return path\n\t }\n\t}", "function tokensToFunction (tokens) {\n\t // Compile all the tokens into regexps.\n\t var matches = new Array(tokens.length)\n\n\t // Compile all the patterns before compilation.\n\t for (var i = 0; i < tokens.length; i++) {\n\t if (typeof tokens[i] === 'object') {\n\t matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n\t }\n\t }\n\n\t return function (obj, opts) {\n\t var path = ''\n\t var data = obj || {}\n\t var options = opts || {}\n\t var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n\t for (var i = 0; i < tokens.length; i++) {\n\t var token = tokens[i]\n\n\t if (typeof token === 'string') {\n\t path += token\n\n\t continue\n\t }\n\n\t var value = data[token.name]\n\t var segment\n\n\t if (value == null) {\n\t if (token.optional) {\n\t // Prepend partial segment prefixes.\n\t if (token.partial) {\n\t path += token.prefix\n\t }\n\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to be defined')\n\t }\n\t }\n\n\t if (isarray(value)) {\n\t if (!token.repeat) {\n\t throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n\t }\n\n\t if (value.length === 0) {\n\t if (token.optional) {\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n\t }\n\t }\n\n\t for (var j = 0; j < value.length; j++) {\n\t segment = encode(value[j])\n\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n\t }\n\n\t path += (j === 0 ? token.prefix : token.delimiter) + segment\n\t }\n\n\t continue\n\t }\n\n\t segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n\t }\n\n\t path += token.prefix + segment\n\t }\n\n\t return path\n\t }\n\t}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}" ]
[ "0.5401093", "0.53510606", "0.53299874", "0.53299874", "0.53299874", "0.53299874", "0.5324845", "0.5320331", "0.5291464", "0.529108", "0.529108", "0.529108", "0.52876604", "0.5284644", "0.5282147", "0.5263787", "0.5254361", "0.5254361", "0.5254361", "0.52353954", "0.52353954", "0.52353954", "0.52353954", "0.52353954", "0.52353954", "0.52353954", "0.5229823", "0.5226775", "0.5226775", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5222934", "0.5219538", "0.52019864", "0.52019864", "0.5200286", "0.5200286", "0.5200286", "0.5200286", "0.5200286", "0.5200286", "0.5200286", "0.5200286", "0.51936746", "0.51936746", "0.51936746", "0.51936746", "0.51936746", "0.51936746", "0.51936746", "0.51936746", "0.51936746", "0.51936746", "0.51936746", "0.51936746", "0.51936746" ]
0.0
-1
Merge two option objects into a new one. Core utility used in both instantiation and inheritance.
function mergeOptions ( parent, child, vm ) { if (false) {} if (typeof child === 'function') { child = child.options; } normalizeProps(child, vm); normalizeInject(child, vm); normalizeDirectives(child); // Apply extends and mixins on the child options, // but only if it is a raw options object that isn't // the result of another mergeOptions call. // Only merged options has the _base property. if (!child._base) { if (child.extends) { parent = mergeOptions(parent, child.extends, vm); } if (child.mixins) { for (var i = 0, l = child.mixins.length; i < l; i++) { parent = mergeOptions(parent, child.mixins[i], vm); } } } var options = {}; var key; for (key in parent) { mergeField(key); } for (key in child) { if (!hasOwn(parent, key)) { mergeField(key); } } function mergeField (key) { var strat = strats[key] || defaultStrat; options[key] = strat(parent[key], child[key], vm, key); } return options }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mergeOptions(obj1,obj2){var obj3={};var attrname;for(attrname in obj1){obj3[attrname]=obj1[attrname];}for(attrname in obj2){obj3[attrname]=obj2[attrname];}return obj3;}", "function _mergeOptions(obj1,obj2) {\n\t var obj3 = {};\n\t for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; }\n\t for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; }\n\t return obj3;\n\t }", "mergeOptions (options, notMerge, lazyUpdate) {\n this.delegateMethod('setOption', options, notMerge, lazyUpdate)\n }", "function mergeOptions(a, b) {\n if (a == null) return b\n if (b == null) return a\n\n if (Array.isArray(a)) {\n return a.concat(b)\n }\n\n if (typeof a === 'object' && !(a instanceof RegExp)) {\n const res = {}\n mergedKeys(a, b).forEach(key => {\n res[key] = mergeOptions(a[key], b[key])\n })\n return res\n }\n\n return b\n}", "function _mergeOptions (obj1, obj2) {\n var obj3 = {};\n for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; }\n for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; }\n return obj3;\n }", "function mergeOptions() {\n var mergedOptions = {};\n var args = arguments;\n // Iterate over all specified options objects and add all properties to the new options object\n for (var i = 0; i < args[_LENGTH_]; i++) {\n var argument = args[i];\n for (var key in argument) {\n if (argument.hasOwnProperty(key)) {\n mergedOptions[key] = argument[key];\n }\n }\n }\n return mergedOptions;\n }", "function _mergeOptions(obj1,obj2) {\n var obj3 = {};\n for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; }\n for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; }\n return obj3;\n }", "function _mergeOptions(obj1,obj2) {\n var obj3 = {};\n for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; }\n for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; }\n return obj3;\n }", "function _mergeOptions(obj1,obj2) {\n var obj3 = {};\n for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; }\n for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; }\n return obj3;\n }", "function _mergeOptions(obj1,obj2) {\n var obj3 = {};\n for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; }\n for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; }\n return obj3;\n }", "function _mergeOptions(obj1,obj2) {\n var obj3 = {};\n for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; }\n for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; }\n return obj3;\n }", "function mergeOptions() {\n var mergedOptions = {};\n var args = arguments;\n // Iterate over all specified options objects and add all properties to the new options object\n for (var i = 0; i < args[_LENGTH_]; i++) {\n var argument = args[i];\n for (var key in argument) {\n if (argument.hasOwnProperty(key)) {\n mergedOptions[key] = argument[key];\n }\n }\n }\n return mergedOptions;\n }", "function _mergeOptions(obj1,obj2) {\n var obj3 = {};\n for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; }\n for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; }\n return obj3;\n }", "function _mergeOptions(obj1, obj2) {\n var obj3 = {};\n for (var attrname in obj1) {\n obj3[attrname] = obj1[attrname];\n }\n for (var attrname in obj2) {\n obj3[attrname] = obj2[attrname];\n }\n return obj3;\n }", "function merge_options(obj1,obj2){\n var obj3 = {};\n for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; }\n for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; }\n return obj3;\n }", "function merge_options(obj1,obj2){\n var obj3 = {};\n for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; }\n for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; }\n return obj3;\n}", "function merge_options(obj1,obj2){\n var obj3 = {};\n for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; }\n for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; }\n return obj3;\n}", "function merge_options(obj1,obj2){\n var obj3 = {};\n for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; }\n for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; }\n return obj3;\n}", "function mergeOptions (obj1, obj2) {\n var obj3 = {}\n for (var attrname in obj1) { obj3[attrname] = obj1[attrname] }\n for (var attrname2 in obj2) { obj3[attrname2] = obj2[attrname2] }\n return obj3\n}", "function mergeOptions(optionObjs){return util_1.mergeProps(optionObjs,complexOptions);}", "function mergeOptions(obj1, obj2) {\n let obj3 = {};\n for (let attr1 in obj1) { obj3[attr1] = obj1[attr1]; }\n for (let attr2 in obj2) { obj3[attr2] = obj2[attr2]; }\n return obj3;\n }", "function mergeOptions(obj1,obj2){\n var obj3 = {};\n for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; }\n for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; }\n return obj3;\n }", "function mergeOptions(obj1,obj2){\n var obj3 = {};\n for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; }\n for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; }\n return obj3;\n }", "function mergeOptions(optionObjs) {\n return mergeProps(optionObjs, complexOptions);\n } // TODO: move this stuff to a \"plugin\"-related file...", "function mergeOptions() {\n\t\tvar $s = [];\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\t$s.push(arguments[i].$);\n\t\t\t}\n\t\t}\n\n\t\t/* Correct the first element, as if it is null or undefined the merge will throw an exception */\n\t\tif (!$s[0]) {\n\t\t\t$s[0] = {};\n\t\t}\n\n\t\tvar result = merge.apply(this, arguments);\n\t\tresult.$ = merge.apply(this, $s);\n\t\treturn result;\n\t}", "function merge_options(obj1){\n for (var attrname in obj1) { defaults[attrname] = obj1[attrname]; }\n return defaults;\n}", "function mergeOption(oldOption, newOption) {\n newOption = newOption || {};\n each(newOption, function (newCptOpt, mainType) {\n if (newCptOpt == null) {\n return;\n }\n\n var oldCptOpt = oldOption[mainType];\n\n if (!ComponentModel.hasClass(mainType)) {\n oldOption[mainType] = merge(oldCptOpt, newCptOpt, true);\n } else {\n newCptOpt = modelUtil.normalizeToArray(newCptOpt);\n oldCptOpt = modelUtil.normalizeToArray(oldCptOpt);\n var mapResult = modelUtil.mappingToExists(oldCptOpt, newCptOpt);\n oldOption[mainType] = map(mapResult, function (item) {\n return item.option && item.exist ? merge(item.exist, item.option, true) : item.exist || item.option;\n });\n }\n });\n}", "function mergeOption(oldOption, newOption) {\n newOption = newOption || {};\n each(newOption, function (newCptOpt, mainType) {\n if (newCptOpt == null) {\n return;\n }\n\n var oldCptOpt = oldOption[mainType];\n\n if (!ComponentModel.hasClass(mainType)) {\n oldOption[mainType] = merge(oldCptOpt, newCptOpt, true);\n } else {\n newCptOpt = modelUtil.normalizeToArray(newCptOpt);\n oldCptOpt = modelUtil.normalizeToArray(oldCptOpt);\n var mapResult = modelUtil.mappingToExists(oldCptOpt, newCptOpt);\n oldOption[mainType] = map(mapResult, function (item) {\n return item.option && item.exist ? merge(item.exist, item.option, true) : item.exist || item.option;\n });\n }\n });\n}", "function mergeOption(oldOption, newOption) {\n newOption = newOption || {};\n each(newOption, function (newCptOpt, mainType) {\n if (newCptOpt == null) {\n return;\n }\n\n var oldCptOpt = oldOption[mainType];\n\n if (!ComponentModel.hasClass(mainType)) {\n oldOption[mainType] = merge(oldCptOpt, newCptOpt, true);\n } else {\n newCptOpt = modelUtil.normalizeToArray(newCptOpt);\n oldCptOpt = modelUtil.normalizeToArray(oldCptOpt);\n var mapResult = modelUtil.mappingToExists(oldCptOpt, newCptOpt);\n oldOption[mainType] = map(mapResult, function (item) {\n return item.option && item.exist ? merge(item.exist, item.option, true) : item.exist || item.option;\n });\n }\n });\n}", "function mergeOption(oldOption, newOption) {\n newOption = newOption || {};\n each(newOption, function (newCptOpt, mainType) {\n if (newCptOpt == null) {\n return;\n }\n\n var oldCptOpt = oldOption[mainType];\n\n if (!ComponentModel.hasClass(mainType)) {\n oldOption[mainType] = merge(oldCptOpt, newCptOpt, true);\n } else {\n newCptOpt = modelUtil.normalizeToArray(newCptOpt);\n oldCptOpt = modelUtil.normalizeToArray(oldCptOpt);\n var mapResult = modelUtil.mappingToExists(oldCptOpt, newCptOpt);\n oldOption[mainType] = map(mapResult, function (item) {\n return item.option && item.exist ? merge(item.exist, item.option, true) : item.exist || item.option;\n });\n }\n });\n}", "function mergeOption(oldOption, newOption) {\n newOption = newOption || {};\n each(newOption, function (newCptOpt, mainType) {\n if (newCptOpt == null) {\n return;\n }\n\n var oldCptOpt = oldOption[mainType];\n\n if (!ComponentModel.hasClass(mainType)) {\n oldOption[mainType] = merge(oldCptOpt, newCptOpt, true);\n } else {\n newCptOpt = modelUtil.normalizeToArray(newCptOpt);\n oldCptOpt = modelUtil.normalizeToArray(oldCptOpt);\n var mapResult = modelUtil.mappingToExists(oldCptOpt, newCptOpt);\n oldOption[mainType] = map(mapResult, function (item) {\n return item.option && item.exist ? merge(item.exist, item.option, true) : item.exist || item.option;\n });\n }\n });\n}", "function mergeOption(oldOption, newOption) {\n newOption = newOption || {};\n each(newOption, function (newCptOpt, mainType) {\n if (newCptOpt == null) {\n return;\n }\n\n var oldCptOpt = oldOption[mainType];\n\n if (!ComponentModel.hasClass(mainType)) {\n oldOption[mainType] = merge(oldCptOpt, newCptOpt, true);\n } else {\n newCptOpt = modelUtil.normalizeToArray(newCptOpt);\n oldCptOpt = modelUtil.normalizeToArray(oldCptOpt);\n var mapResult = modelUtil.mappingToExists(oldCptOpt, newCptOpt);\n oldOption[mainType] = map(mapResult, function (item) {\n return item.option && item.exist ? merge(item.exist, item.option, true) : item.exist || item.option;\n });\n }\n });\n}", "function mergeOption(oldOption, newOption) {\n newOption = newOption || {};\n each(newOption, function (newCptOpt, mainType) {\n if (newCptOpt == null) {\n return;\n }\n\n var oldCptOpt = oldOption[mainType];\n\n if (!ComponentModel.hasClass(mainType)) {\n oldOption[mainType] = merge(oldCptOpt, newCptOpt, true);\n } else {\n newCptOpt = modelUtil.normalizeToArray(newCptOpt);\n oldCptOpt = modelUtil.normalizeToArray(oldCptOpt);\n var mapResult = modelUtil.mappingToExists(oldCptOpt, newCptOpt);\n oldOption[mainType] = map(mapResult, function (item) {\n return item.option && item.exist ? merge(item.exist, item.option, true) : item.exist || item.option;\n });\n }\n });\n}", "function mergeOption(oldOption, newOption) {\n newOption = newOption || {};\n each(newOption, function (newCptOpt, mainType) {\n if (newCptOpt == null) {\n return;\n }\n\n var oldCptOpt = oldOption[mainType];\n\n if (!ComponentModel.hasClass(mainType)) {\n oldOption[mainType] = merge(oldCptOpt, newCptOpt, true);\n } else {\n newCptOpt = modelUtil.normalizeToArray(newCptOpt);\n oldCptOpt = modelUtil.normalizeToArray(oldCptOpt);\n var mapResult = modelUtil.mappingToExists(oldCptOpt, newCptOpt);\n oldOption[mainType] = map(mapResult, function (item) {\n return item.option && item.exist ? merge(item.exist, item.option, true) : item.exist || item.option;\n });\n }\n });\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;});}});}", "function mergeOption(oldOption, newOption) {\n\t newOption = newOption || {};\n\n\t each(newOption, function (newCptOpt, mainType) {\n\t if (newCptOpt == null) {\n\t return;\n\t }\n\n\t var oldCptOpt = oldOption[mainType];\n\n\t if (!ComponentModel.hasClass(mainType)) {\n\t oldOption[mainType] = merge(oldCptOpt, newCptOpt, true);\n\t } else {\n\t newCptOpt = modelUtil.normalizeToArray(newCptOpt);\n\t oldCptOpt = modelUtil.normalizeToArray(oldCptOpt);\n\n\t var mapResult = modelUtil.mappingToExists(oldCptOpt, newCptOpt);\n\n\t oldOption[mainType] = map(mapResult, function (item) {\n\t return item.option && item.exist ? merge(item.exist, item.option, true) : item.exist || item.option;\n\t });\n\t }\n\t });\n\t}", "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 mergeOption(oldOption, newOption) {\n newOption = newOption || {};\n\n each(newOption, function (newCptOpt, mainType) {\n if (newCptOpt == null) {\n return;\n }\n\n var oldCptOpt = oldOption[mainType];\n\n if (!ComponentModel.hasClass(mainType)) {\n oldOption[mainType] = merge(oldCptOpt, newCptOpt, true);\n }\n else {\n newCptOpt = modelUtil.normalizeToArray(newCptOpt);\n oldCptOpt = modelUtil.normalizeToArray(oldCptOpt);\n\n var mapResult = modelUtil.mappingToExists(oldCptOpt, newCptOpt);\n\n oldOption[mainType] = map(mapResult, function (item) {\n return (item.option && item.exist)\n ? merge(item.exist, item.option, true)\n : (item.exist || item.option);\n });\n }\n });\n }", "function mergeOption(oldOption, newOption) {\n newOption = newOption || {};\n\n each(newOption, function (newCptOpt, mainType) {\n if (newCptOpt == null) {\n return;\n }\n\n var oldCptOpt = oldOption[mainType];\n\n if (!ComponentModel.hasClass(mainType)) {\n oldOption[mainType] = merge(oldCptOpt, newCptOpt, true);\n }\n else {\n newCptOpt = modelUtil.normalizeToArray(newCptOpt);\n oldCptOpt = modelUtil.normalizeToArray(oldCptOpt);\n\n var mapResult = modelUtil.mappingToExists(oldCptOpt, newCptOpt);\n\n oldOption[mainType] = map(mapResult, function (item) {\n return (item.option && item.exist)\n ? merge(item.exist, item.option, true)\n : (item.exist || item.option);\n });\n }\n });\n }", "function mergeOption(oldOption, newOption) {\n newOption = newOption || {};\n\n each(newOption, function (newCptOpt, mainType) {\n if (newCptOpt == null) {\n return;\n }\n\n var oldCptOpt = oldOption[mainType];\n\n if (!ComponentModel.hasClass(mainType)) {\n oldOption[mainType] = merge(oldCptOpt, newCptOpt, true);\n } else {\n newCptOpt = modelUtil.normalizeToArray(newCptOpt);\n oldCptOpt = modelUtil.normalizeToArray(oldCptOpt);\n\n var mapResult = modelUtil.mappingToExists(oldCptOpt, newCptOpt);\n\n oldOption[mainType] = map(mapResult, function (item) {\n return item.option && item.exist ? merge(item.exist, item.option, true) : item.exist || item.option;\n });\n }\n });\n}", "function merge() {\n var i,\n args = arguments,\n len,\n ret = {},\n doCopy = function (copy, original) {\n var value, key;\n \n // An object is replacing a primitive\n if (typeof copy !== 'object') {\n copy = {};\n }\n \n for (key in original) {\n if (original.hasOwnProperty(key)) {\n value = original[key];\n \n // Copy the contents of objects, but not arrays or DOM nodes\n if (value && typeof value === 'object' && Object.prototype.toString.call(value) !== '[object Array]'\n && key !== 'renderTo' && typeof value.nodeType !== 'number') {\n copy[key] = doCopy(copy[key] || {}, value);\n \n // Primitives and arrays are copied over directly\n } else {\n copy[key] = original[key];\n }\n }\n }\n return copy;\n };\n \n // If first argument is true, copy into the existing object. Used in setOptions.\n if (args[0] === true) {\n ret = args[1];\n args = Array.prototype.slice.call(args, 2);\n }\n \n // For each argument, extend the return\n len = args.length;\n for (i = 0; i < len; i++) {\n ret = doCopy(ret, args[i]);\n }\n \n return ret;\n }", "function merge() {\n var i,\n args = arguments,\n len,\n ret = {},\n doCopy = function (copy, original) {\n var value, key;\n\n // An object is replacing a primitive\n if (typeof copy !== 'object') {\n copy = {};\n }\n\n for (key in original) {\n if (original.hasOwnProperty(key)) {\n value = original[key];\n\n // Copy the contents of objects, but not arrays or DOM nodes\n if (value && typeof value === 'object' && Object.prototype.toString.call(value) !== '[object Array]' &&\n key !== 'renderTo' && typeof value.nodeType !== 'number') {\n copy[key] = doCopy(copy[key] || {}, value);\n\n // Primitives and arrays are copied over directly\n } else {\n copy[key] = original[key];\n }\n }\n }\n return copy;\n };\n\n // If first argument is true, copy into the existing object. Used in setOptions.\n if (args[0] === true) {\n ret = args[1];\n args = Array.prototype.slice.call(args, 2);\n }\n\n // For each argument, extend the return\n len = args.length;\n for (i = 0; i < len; i++) {\n ret = doCopy(ret, args[i]);\n }\n\n return ret;\n }", "function merge() {\n var i,\n args = arguments,\n len,\n ret = {},\n doCopy = function (copy, original) {\n var value, key;\n\n // An object is replacing a primitive\n if (typeof copy !== 'object') {\n copy = {};\n }\n\n for (key in original) {\n if (original.hasOwnProperty(key)) {\n value = original[key];\n\n // Copy the contents of objects, but not arrays or DOM nodes\n if (value && typeof value === 'object' && Object.prototype.toString.call(value) !== '[object Array]' &&\n key !== 'renderTo' && typeof value.nodeType !== 'number') {\n copy[key] = doCopy(copy[key] || {}, value);\n\n // Primitives and arrays are copied over directly\n } else {\n copy[key] = original[key];\n }\n }\n }\n return copy;\n };\n\n // If first argument is true, copy into the existing object. Used in setOptions.\n if (args[0] === true) {\n ret = args[1];\n args = Array.prototype.slice.call(args, 2);\n }\n\n // For each argument, extend the return\n len = args.length;\n for (i = 0; i < len; i++) {\n ret = doCopy(ret, args[i]);\n }\n\n return ret;\n }", "function mergeOptions(target) {\n\n\tfunction mergeIntoTarget(name, value) {\n\t\tif ($.isPlainObject(value) && $.isPlainObject(target[name]) && !isForcedAtomicOption(name)) {\n\t\t\t// merge into a new object to avoid destruction\n\t\t\ttarget[name] = mergeOptions({}, target[name], value); // combine. `value` object takes precedence\n\t\t}\n\t\telse if (value !== undefined) { // only use values that are set and not undefined\n\t\t\ttarget[name] = value;\n\t\t}\n\t}\n\n\tfor (var i=1; i<arguments.length; i++) {\n\t\t$.each(arguments[i], mergeIntoTarget);\n\t}\n\n\treturn target;\n}", "function mergeOptions(target) {\n\n\tfunction mergeIntoTarget(name, value) {\n\t\tif ($.isPlainObject(value) && $.isPlainObject(target[name]) && !isForcedAtomicOption(name)) {\n\t\t\t// merge into a new object to avoid destruction\n\t\t\ttarget[name] = mergeOptions({}, target[name], value); // combine. `value` object takes precedence\n\t\t}\n\t\telse if (value !== undefined) { // only use values that are set and not undefined\n\t\t\ttarget[name] = value;\n\t\t}\n\t}\n\n\tfor (var i=1; i<arguments.length; i++) {\n\t\t$.each(arguments[i], mergeIntoTarget);\n\t}\n\n\treturn target;\n}", "function mergeOptions(target) {\n\n\tfunction mergeIntoTarget(name, value) {\n\t\tif ($.isPlainObject(value) && $.isPlainObject(target[name]) && !isForcedAtomicOption(name)) {\n\t\t\t// merge into a new object to avoid destruction\n\t\t\ttarget[name] = mergeOptions({}, target[name], value); // combine. `value` object takes precedence\n\t\t}\n\t\telse if (value !== undefined) { // only use values that are set and not undefined\n\t\t\ttarget[name] = value;\n\t\t}\n\t}\n\n\tfor (var i=1; i<arguments.length; i++) {\n\t\t$.each(arguments[i], mergeIntoTarget);\n\t}\n\n\treturn target;\n}", "function merge() {\n\t\tvar i,\n\t\t\targs = arguments,\n\t\t\tlen,\n\t\t\tret = {},\n\t\t\tdoCopy = function (copy, original) {\n\t\t\t\tvar value, key;\n\n\t\t\t\t// An object is replacing a primitive\n\t\t\t\tif (typeof copy !== 'object') {\n\t\t\t\t\tcopy = {};\n\t\t\t\t}\n\n\t\t\t\tfor (key in original) {\n\t\t\t\t\tif (original.hasOwnProperty(key)) {\n\t\t\t\t\t\tvalue = original[key];\n\n\t\t\t\t\t\t// Copy the contents of objects, but not arrays or DOM nodes\n\t\t\t\t\t\tif (value && typeof value === 'object' && Object.prototype.toString.call(value) !== '[object Array]' &&\n\t\t\t\t\t\t\t\tkey !== 'renderTo' && typeof value.nodeType !== 'number') {\n\t\t\t\t\t\t\tcopy[key] = doCopy(copy[key] || {}, value);\n\t\t\t\t\t\n\t\t\t\t\t\t// Primitives and arrays are copied over directly\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcopy[key] = original[key];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn copy;\n\t\t\t};\n\n\t\t// If first argument is true, copy into the existing object. Used in setOptions.\n\t\tif (args[0] === true) {\n\t\t\tret = args[1];\n\t\t\targs = Array.prototype.slice.call(args, 2);\n\t\t}\n\n\t\t// For each argument, extend the return\n\t\tlen = args.length;\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tret = doCopy(ret, args[i]);\n\t\t}\n\n\t\treturn ret;\n\t}", "function merge() {\n\tvar i,\n\t\targs = arguments,\n\t\tlen,\n\t\tret = {},\n\t\tdoCopy = function (copy, original) {\n\t\t\tvar value, key;\n\n\t\t\t// An object is replacing a primitive\n\t\t\tif (typeof copy !== 'object') {\n\t\t\t\tcopy = {};\n\t\t\t}\n\n\t\t\tfor (key in original) {\n\t\t\t\tif (original.hasOwnProperty(key)) {\n\t\t\t\t\tvalue = original[key];\n\n\t\t\t\t\t// Copy the contents of objects, but not arrays or DOM nodes\n\t\t\t\t\tif (value && typeof value === 'object' && Object.prototype.toString.call(value) !== '[object Array]' &&\n\t\t\t\t\t\t\tkey !== 'renderTo' && typeof value.nodeType !== 'number') {\n\t\t\t\t\t\tcopy[key] = doCopy(copy[key] || {}, value);\n\t\t\t\t\n\t\t\t\t\t// Primitives and arrays are copied over directly\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcopy[key] = original[key];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn copy;\n\t\t};\n\n\t// If first argument is true, copy into the existing object. Used in setOptions.\n\tif (args[0] === true) {\n\t\tret = args[1];\n\t\targs = Array.prototype.slice.call(args, 2);\n\t}\n\n\t// For each argument, extend the return\n\tlen = args.length;\n\tfor (i = 0; i < len; i++) {\n\t\tret = doCopy(ret, args[i]);\n\t}\n\n\treturn ret;\n}", "function merge() {\n\t\tvar i,\n\t\t\targs = arguments,\n\t\t\tlen,\n\t\t\tret = {},\n\t\t\tdoCopy = function (copy, original) {\n\t\t\t\tvar value, key;\n\n\t\t\t\t// An object is replacing a primitive\n\t\t\t\tif (typeof copy !== 'object') {\n\t\t\t\t\tcopy = {};\n\t\t\t\t}\n\n\t\t\t\tfor (key in original) {\n\t\t\t\t\tif (original.hasOwnProperty(key)) {\n\t\t\t\t\t\tvalue = original[key];\n\n\t\t\t\t\t\t// Copy the contents of objects, but not arrays or DOM nodes\n\t\t\t\t\t\tif (value && typeof value === 'object' && Object.prototype.toString.call(value) !== '[object Array]'\n\t\t\t\t\t\t\t\t&& key !== 'renderTo' && typeof value.nodeType !== 'number') {\n\t\t\t\t\t\t\tcopy[key] = doCopy(copy[key] || {}, value);\n\t\t\t\t\t\n\t\t\t\t\t\t// Primitives and arrays are copied over directly\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcopy[key] = original[key];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn copy;\n\t\t\t};\n\n\t\t// If first argument is true, copy into the existing object. Used in setOptions.\n\t\tif (args[0] === true) {\n\t\t\tret = args[1];\n\t\t\targs = Array.prototype.slice.call(args, 2);\n\t\t}\n\n\t\t// For each argument, extend the return\n\t\tlen = args.length;\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tret = doCopy(ret, args[i]);\n\t\t}\n\n\t\treturn ret;\n\t}", "function merge(new_options) {\n\tconst errors = schema.validate(new_options);\n\n\tif (errors.length) {\n\t\t// We'll just throw the first error,\n\t\t// and let the user correct his object property by property\n\t\t// until he gets it right.\n\t\tthrow errors[0];\n\t}\n\n\t_.merge(options, new_options);\n}", "function mergeOptions(optionObjs) {\n return object_1.mergeProps(optionObjs, complexOptions);\n }", "function mergeOptions(parent, child, vm) {\n if (\"development\" !== 'production') {\n checkComponents(child);\n }\n\n if (typeof child === 'function') {\n child = child.options;\n }\n\n normalizeProps(child, vm);\n normalizeInject(child, vm);\n normalizeDirectives(child);\n var extendsFrom = child.extends;\n if (extendsFrom) {\n parent = mergeOptions(parent, extendsFrom, vm);\n }\n if (child.mixins) {\n for (var i = 0, l = child.mixins.length; i < l; i++) {\n parent = mergeOptions(parent, child.mixins[i], vm);\n }\n }\n var options = {};\n var key;\n for (key in parent) {\n mergeField(key);\n }\n for (key in child) {\n if (!hasOwn(parent, key)) {\n mergeField(key);\n }\n }\n function mergeField(key) {\n var strat = strats[key] || defaultStrat;\n options[key] = strat(parent[key], child[key], vm, key);\n }\n return options;\n}", "function mergeOptions(parent, child, vm) {\n if (true) {\n checkComponents(child);\n }\n\n if (typeof child === 'function') {\n child = child.options;\n }\n\n normalizeProps(child);\n normalizeInject(child);\n normalizeDirectives(child);\n var extendsFrom = child.extends;\n if (extendsFrom) {\n parent = mergeOptions(parent, extendsFrom, vm);\n }\n if (child.mixins) {\n for (var i = 0, l = child.mixins.length; i < l; i++) {\n parent = mergeOptions(parent, child.mixins[i], vm);\n }\n }\n var options = {};\n var key;\n for (key in parent) {\n mergeField(key);\n }\n for (key in child) {\n if (!hasOwn(parent, key)) {\n mergeField(key);\n }\n }\n function mergeField(key) {\n var strat = strats[key] || defaultStrat;\n options[key] = strat(parent[key], child[key], vm, key);\n }\n return options;\n}", "function mergeOptions(parent, child, vm) {\n {\n checkComponents(child);\n }\n\n if (typeof child === 'function') {\n child = child.options;\n }\n\n normalizeProps(child, vm);\n normalizeInject(child, vm);\n normalizeDirectives(child);\n var extendsFrom = child.extends;\n if (extendsFrom) {\n parent = mergeOptions(parent, extendsFrom, vm);\n }\n if (child.mixins) {\n for (var i = 0, l = child.mixins.length; i < l; i++) {\n parent = mergeOptions(parent, child.mixins[i], vm);\n }\n }\n var options = {};\n var key;\n for (key in parent) {\n mergeField(key);\n }\n for (key in child) {\n if (!hasOwn(parent, key)) {\n mergeField(key);\n }\n }\n function mergeField(key) {\n var strat = strats[key] || defaultStrat;\n options[key] = strat(parent[key], child[key], vm, key);\n }\n return options;\n }", "function mergeOptions(parent, child, vm) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t checkComponents(child);\n\t }\n\t\n\t if (typeof child === 'function') {\n\t child = child.options;\n\t }\n\t\n\t normalizeProps(child);\n\t normalizeInject(child);\n\t normalizeDirectives(child);\n\t var extendsFrom = child.extends;\n\t if (extendsFrom) {\n\t parent = mergeOptions(parent, extendsFrom, vm);\n\t }\n\t if (child.mixins) {\n\t for (var i = 0, l = child.mixins.length; i < l; i++) {\n\t parent = mergeOptions(parent, child.mixins[i], vm);\n\t }\n\t }\n\t var options = {};\n\t var key;\n\t for (key in parent) {\n\t mergeField(key);\n\t }\n\t for (key in child) {\n\t if (!hasOwn(parent, key)) {\n\t mergeField(key);\n\t }\n\t }\n\t function mergeField(key) {\n\t var strat = strats[key] || defaultStrat;\n\t options[key] = strat(parent[key], child[key], vm, key);\n\t }\n\t return options;\n\t}", "function mergeOptions(parent, child, vm) {\n if (process.env.NODE_ENV !== 'production') {\n checkComponents(child);\n }\n\n if (typeof child === 'function') {\n child = child.options;\n }\n\n normalizeProps(child, vm);\n normalizeInject(child, vm);\n normalizeDirectives(child);\n var extendsFrom = child.extends;\n if (extendsFrom) {\n parent = mergeOptions(parent, extendsFrom, vm);\n }\n if (child.mixins) {\n for (var i = 0, l = child.mixins.length; i < l; i++) {\n parent = mergeOptions(parent, child.mixins[i], vm);\n }\n }\n var options = {};\n var key;\n for (key in parent) {\n mergeField(key);\n }\n for (key in child) {\n if (!hasOwn(parent, key)) {\n mergeField(key);\n }\n }\n function mergeField(key) {\n var strat = strats[key] || defaultStrat;\n options[key] = strat(parent[key], child[key], vm, key);\n }\n return options;\n}", "function mergeOptions(parent, child, vm) {\n if (process.env.NODE_ENV !== 'production') {\n checkComponents(child);\n }\n\n if (typeof child === 'function') {\n child = child.options;\n }\n\n normalizeProps(child, vm);\n normalizeInject(child, vm);\n normalizeDirectives(child);\n var extendsFrom = child.extends;\n if (extendsFrom) {\n parent = mergeOptions(parent, extendsFrom, vm);\n }\n if (child.mixins) {\n for (var i = 0, l = child.mixins.length; i < l; i++) {\n parent = mergeOptions(parent, child.mixins[i], vm);\n }\n }\n var options = {};\n var key;\n for (key in parent) {\n mergeField(key);\n }\n for (key in child) {\n if (!hasOwn(parent, key)) {\n mergeField(key);\n }\n }\n function mergeField(key) {\n var strat = strats[key] || defaultStrat;\n options[key] = strat(parent[key], child[key], vm, key);\n }\n return options;\n}", "function mergeOptions(parent, child, vm) {\n if (process.env.NODE_ENV !== 'production') {\n checkComponents(child);\n }\n\n if (typeof child === 'function') {\n child = child.options;\n }\n\n normalizeProps(child, vm);\n normalizeInject(child, vm);\n normalizeDirectives(child);\n var extendsFrom = child.extends;\n if (extendsFrom) {\n parent = mergeOptions(parent, extendsFrom, vm);\n }\n if (child.mixins) {\n for (var i = 0, l = child.mixins.length; i < l; i++) {\n parent = mergeOptions(parent, child.mixins[i], vm);\n }\n }\n var options = {};\n var key;\n for (key in parent) {\n mergeField(key);\n }\n for (key in child) {\n if (!hasOwn(parent, key)) {\n mergeField(key);\n }\n }\n function mergeField(key) {\n var strat = strats[key] || defaultStrat;\n options[key] = strat(parent[key], child[key], vm, key);\n }\n return options;\n}", "function mergeOptions(parent, child, vm) {\n if (process.env.NODE_ENV !== 'production') {\n checkComponents(child);\n }\n\n if (typeof child === 'function') {\n child = child.options;\n }\n\n normalizeProps(child, vm);\n normalizeInject(child, vm);\n normalizeDirectives(child);\n var extendsFrom = child.extends;\n if (extendsFrom) {\n parent = mergeOptions(parent, extendsFrom, vm);\n }\n if (child.mixins) {\n for (var i = 0, l = child.mixins.length; i < l; i++) {\n parent = mergeOptions(parent, child.mixins[i], vm);\n }\n }\n var options = {};\n var key;\n for (key in parent) {\n mergeField(key);\n }\n for (key in child) {\n if (!hasOwn(parent, key)) {\n mergeField(key);\n }\n }\n function mergeField(key) {\n var strat = strats[key] || defaultStrat;\n options[key] = strat(parent[key], child[key], vm, key);\n }\n return options;\n}", "function combineOpts() {\n var opts = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n opts[_i] = arguments[_i];\n }\n var validOpts = [];\n for (var i = 0, size = opts.length; i < size; i++) {\n if (opts[i] != null) {\n validOpts.push(opts[i]);\n }\n }\n if (validOpts.length < 2) {\n return validOpts[0];\n }\n else {\n validOpts.unshift({});\n return Object.assign.apply(null, validOpts);\n }\n }", "function mergeOptions(parent, child, vm) {\n if ('development' !== 'production') {\n checkComponents(child);\n }\n\n if (typeof child === 'function') {\n child = child.options;\n }\n\n normalizeProps(child, vm);\n normalizeInject(child, vm);\n normalizeDirectives(child);\n var extendsFrom = child.extends;\n if (extendsFrom) {\n parent = mergeOptions(parent, extendsFrom, vm);\n }\n if (child.mixins) {\n for (var i = 0, l = child.mixins.length; i < l; i++) {\n parent = mergeOptions(parent, child.mixins[i], vm);\n }\n }\n var options = {};\n var key;\n for (key in parent) {\n mergeField(key);\n }\n for (key in child) {\n if (!hasOwn(parent, key)) {\n mergeField(key);\n }\n }\n function mergeField(key) {\n var strat = strats[key] || defaultStrat;\n options[key] = strat(parent[key], child[key], vm, key);\n }\n return options;\n}", "function mergeOptions(parent, child, vm) {\n if (process.env.NODE_ENV !== 'production') {\n checkComponents(child);\n }\n\n if (typeof child === 'function') {\n child = child.options;\n }\n\n normalizeProps(child);\n normalizeInject(child);\n normalizeDirectives(child);\n var extendsFrom = child.extends;\n if (extendsFrom) {\n parent = mergeOptions(parent, extendsFrom, vm);\n }\n if (child.mixins) {\n for (var i = 0, l = child.mixins.length; i < l; i++) {\n parent = mergeOptions(parent, child.mixins[i], vm);\n }\n }\n var options = {};\n var key;\n for (key in parent) {\n mergeField(key);\n }\n for (key in child) {\n if (!hasOwn(parent, key)) {\n mergeField(key);\n }\n }\n function mergeField(key) {\n var strat = strats[key] || defaultStrat;\n options[key] = strat(parent[key], child[key], vm, key);\n }\n return options;\n}", "function mergeOptions(parent, child, vm) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t checkComponents(child);\n\t }\n\n\t if (typeof child === 'function') {\n\t child = child.options;\n\t }\n\n\t normalizeProps(child);\n\t normalizeInject(child);\n\t normalizeDirectives(child);\n\t var extendsFrom = child.extends;\n\t if (extendsFrom) {\n\t parent = mergeOptions(parent, extendsFrom, vm);\n\t }\n\t if (child.mixins) {\n\t for (var i = 0, l = child.mixins.length; i < l; i++) {\n\t parent = mergeOptions(parent, child.mixins[i], vm);\n\t }\n\t }\n\t var options = {};\n\t var key;\n\t for (key in parent) {\n\t mergeField(key);\n\t }\n\t for (key in child) {\n\t if (!hasOwn(parent, key)) {\n\t mergeField(key);\n\t }\n\t }\n\t function mergeField(key) {\n\t var strat = strats[key] || defaultStrat;\n\t options[key] = strat(parent[key], child[key], vm, key);\n\t }\n\t return options;\n\t}", "function mergeOptions(optionObjs) {\n return mergeProps(optionObjs, complexOptions);\n}", "function mergeOptions(parent,child,vm){if(true){checkComponents(child);}if(typeof child==='function'){child=child.options;}normalizeProps(child,vm);normalizeInject(child,vm);normalizeDirectives(child);var extendsFrom=child.extends;if(extendsFrom){parent=mergeOptions(parent,extendsFrom,vm);}if(child.mixins){for(var i=0,l=child.mixins.length;i<l;i++){parent=mergeOptions(parent,child.mixins[i],vm);}}var options={};var key;for(key in parent){mergeField(key);}for(key in child){if(!hasOwn(parent,key)){mergeField(key);}}function mergeField(key){var strat=strats[key]||defaultStrat;options[key]=strat(parent[key],child[key],vm,key);}return options;}", "function mergeOptions(parent,child,vm){if(true){checkComponents(child);}if(typeof child==='function'){child=child.options;}normalizeProps(child,vm);normalizeInject(child,vm);normalizeDirectives(child);var extendsFrom=child.extends;if(extendsFrom){parent=mergeOptions(parent,extendsFrom,vm);}if(child.mixins){for(var i=0,l=child.mixins.length;i<l;i++){parent=mergeOptions(parent,child.mixins[i],vm);}}var options={};var key;for(key in parent){mergeField(key);}for(key in child){if(!hasOwn(parent,key)){mergeField(key);}}function mergeField(key){var strat=strats[key]||defaultStrat;options[key]=strat(parent[key],child[key],vm,key);}return options;}", "function mergeOptions(parent, child, vm) {\n if (false) {}\n\n if (typeof child === 'function') {\n child = child.options;\n }\n\n normalizeProps(child, vm);\n normalizeInject(child, vm);\n normalizeDirectives(child); // Apply extends and mixins on the child options,\n // but only if it is a raw options object that isn't\n // the result of another mergeOptions call.\n // Only merged options has the _base property.\n\n if (!child._base) {\n if (child.extends) {\n parent = mergeOptions(parent, child.extends, vm);\n }\n\n if (child.mixins) {\n for (var i = 0, l = child.mixins.length; i < l; i++) {\n parent = mergeOptions(parent, child.mixins[i], vm);\n }\n }\n }\n\n var options = {};\n var key;\n\n for (key in parent) {\n mergeField(key);\n }\n\n for (key in child) {\n if (!hasOwn(parent, key)) {\n mergeField(key);\n }\n }\n\n function mergeField(key) {\n var strat = strats[key] || defaultStrat;\n options[key] = strat(parent[key], child[key], vm, key);\n }\n\n return options;\n}", "function mergeOptions(parent, child, vm) {\n if (false) {}\n\n if (typeof child === 'function') {\n child = child.options;\n }\n\n normalizeProps(child, vm);\n normalizeInject(child, vm);\n normalizeDirectives(child); // Apply extends and mixins on the child options,\n // but only if it is a raw options object that isn't\n // the result of another mergeOptions call.\n // Only merged options has the _base property.\n\n if (!child._base) {\n if (child.extends) {\n parent = mergeOptions(parent, child.extends, vm);\n }\n\n if (child.mixins) {\n for (var i = 0, l = child.mixins.length; i < l; i++) {\n parent = mergeOptions(parent, child.mixins[i], vm);\n }\n }\n }\n\n var options = {};\n var key;\n\n for (key in parent) {\n mergeField(key);\n }\n\n for (key in child) {\n if (!hasOwn(parent, key)) {\n mergeField(key);\n }\n }\n\n function mergeField(key) {\n var strat = strats[key] || defaultStrat;\n options[key] = strat(parent[key], child[key], vm, key);\n }\n\n return options;\n}", "function mergeOptions(optionObjs) {\n return util_1.mergeProps(optionObjs, complexOptions);\n}", "function mergeOptions(optionObjs) {\n return util_1.mergeProps(optionObjs, complexOptions);\n}", "function mergeOptions(optionObjs) {\n return util_1.mergeProps(optionObjs, complexOptions);\n}", "function mergeOptions(optionObjs) {\n return util_1.mergeProps(optionObjs, complexOptions);\n}", "function mergeOptions(defaultOptions, userOptions, object) {\n if(!userOptions)\n userOptions = {};\n \n for(option in defaultOptions) {\n if(userOptions[option] != undefined)\n object[option] = userOptions[option];\n else\n object[option] = defaultOptions[option];\n }\n}", "function mergeOptions (\n parent,\n child,\n vm\n) {\n if (false) {}\n\n if (typeof child === 'function') {\n child = child.options;\n }\n\n normalizeProps(child, vm);\n normalizeInject(child, vm);\n normalizeDirectives(child);\n var extendsFrom = child.extends;\n if (extendsFrom) {\n parent = mergeOptions(parent, extendsFrom, vm);\n }\n if (child.mixins) {\n for (var i = 0, l = child.mixins.length; i < l; i++) {\n parent = mergeOptions(parent, child.mixins[i], vm);\n }\n }\n var options = {};\n var key;\n for (key in parent) {\n mergeField(key);\n }\n for (key in child) {\n if (!hasOwn(parent, key)) {\n mergeField(key);\n }\n }\n function mergeField (key) {\n var strat = strats[key] || defaultStrat;\n options[key] = strat(parent[key], child[key], vm, key);\n }\n return options\n}", "function mergeOptions (\n parent,\n child,\n vm\n) {\n if (false) {}\n\n if (typeof child === 'function') {\n child = child.options;\n }\n\n normalizeProps(child, vm);\n normalizeInject(child, vm);\n normalizeDirectives(child);\n var extendsFrom = child.extends;\n if (extendsFrom) {\n parent = mergeOptions(parent, extendsFrom, vm);\n }\n if (child.mixins) {\n for (var i = 0, l = child.mixins.length; i < l; i++) {\n parent = mergeOptions(parent, child.mixins[i], vm);\n }\n }\n var options = {};\n var key;\n for (key in parent) {\n mergeField(key);\n }\n for (key in child) {\n if (!hasOwn(parent, key)) {\n mergeField(key);\n }\n }\n function mergeField (key) {\n var strat = strats[key] || defaultStrat;\n options[key] = strat(parent[key], child[key], vm, key);\n }\n return options\n}", "function mergeOptions(mergeTarget, options, option) {\n var globalOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n\n // Local helpers\n var isPresent = function isPresent(obj) {\n return obj !== null && obj !== undefined;\n };\n\n var isObject = function isObject(obj) {\n return obj !== null && _typeof_1(obj) === \"object\";\n }; // https://stackoverflow.com/a/34491287/1223531\n\n\n var isEmpty = function isEmpty(obj) {\n for (var x in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, x)) {\n return false;\n }\n }\n\n return true;\n }; // Guards\n\n\n if (!isObject(mergeTarget)) {\n throw new Error(\"Parameter mergeTarget must be an object\");\n }\n\n if (!isObject(options)) {\n throw new Error(\"Parameter options must be an object\");\n }\n\n if (!isPresent(option)) {\n throw new Error(\"Parameter option must have a value\");\n }\n\n if (!isObject(globalOptions)) {\n throw new Error(\"Parameter globalOptions must be an object\");\n } //\n // Actual merge routine, separated from main logic\n // Only a single level of options is merged. Deeper levels are ref'd. This may actually be an issue.\n //\n\n\n var doMerge = function doMerge(target, options, option) {\n if (!isObject(target[option])) {\n target[option] = {};\n }\n\n var src = options[option];\n var dst = target[option];\n\n for (var prop in src) {\n if (Object.prototype.hasOwnProperty.call(src, prop)) {\n dst[prop] = src[prop];\n }\n }\n }; // Local initialization\n\n\n var srcOption = options[option];\n var globalPassed = isObject(globalOptions) && !isEmpty(globalOptions);\n var globalOption = globalPassed ? globalOptions[option] : undefined;\n var globalEnabled = globalOption ? globalOption.enabled : undefined; /////////////////////////////////////////\n // Main routine\n /////////////////////////////////////////\n\n if (srcOption === undefined) {\n return; // Nothing to do\n }\n\n if (typeof srcOption === \"boolean\") {\n if (!isObject(mergeTarget[option])) {\n mergeTarget[option] = {};\n }\n\n mergeTarget[option].enabled = srcOption;\n return;\n }\n\n if (srcOption === null && !isObject(mergeTarget[option])) {\n // If possible, explicit copy from globals\n if (isPresent(globalOption)) {\n mergeTarget[option] = create$2(globalOption);\n } else {\n return; // Nothing to do\n }\n }\n\n if (!isObject(srcOption)) {\n return;\n } //\n // Ensure that 'enabled' is properly set. It is required internally\n // Note that the value from options will always overwrite the existing value\n //\n\n\n var enabled = true; // default value\n\n if (srcOption.enabled !== undefined) {\n enabled = srcOption.enabled;\n } else {\n // Take from globals, if present\n if (globalEnabled !== undefined) {\n enabled = globalOption.enabled;\n }\n }\n\n doMerge(mergeTarget, options, option);\n mergeTarget[option].enabled = enabled;\n}", "function mergeOptions(mergeTarget, options, option) {\n var globalOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n\n // Local helpers\n var isPresent = function isPresent(obj) {\n return obj !== null && obj !== undefined;\n };\n\n var isObject = function isObject(obj) {\n return obj !== null && _typeof_1(obj) === \"object\";\n }; // https://stackoverflow.com/a/34491287/1223531\n\n\n var isEmpty = function isEmpty(obj) {\n for (var x in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, x)) {\n return false;\n }\n }\n\n return true;\n }; // Guards\n\n\n if (!isObject(mergeTarget)) {\n throw new Error(\"Parameter mergeTarget must be an object\");\n }\n\n if (!isObject(options)) {\n throw new Error(\"Parameter options must be an object\");\n }\n\n if (!isPresent(option)) {\n throw new Error(\"Parameter option must have a value\");\n }\n\n if (!isObject(globalOptions)) {\n throw new Error(\"Parameter globalOptions must be an object\");\n } //\n // Actual merge routine, separated from main logic\n // Only a single level of options is merged. Deeper levels are ref'd. This may actually be an issue.\n //\n\n\n var doMerge = function doMerge(target, options, option) {\n if (!isObject(target[option])) {\n target[option] = {};\n }\n\n var src = options[option];\n var dst = target[option];\n\n for (var prop in src) {\n if (Object.prototype.hasOwnProperty.call(src, prop)) {\n dst[prop] = src[prop];\n }\n }\n }; // Local initialization\n\n\n var srcOption = options[option];\n var globalPassed = isObject(globalOptions) && !isEmpty(globalOptions);\n var globalOption = globalPassed ? globalOptions[option] : undefined;\n var globalEnabled = globalOption ? globalOption.enabled : undefined; /////////////////////////////////////////\n // Main routine\n /////////////////////////////////////////\n\n if (srcOption === undefined) {\n return; // Nothing to do\n }\n\n if (typeof srcOption === \"boolean\") {\n if (!isObject(mergeTarget[option])) {\n mergeTarget[option] = {};\n }\n\n mergeTarget[option].enabled = srcOption;\n return;\n }\n\n if (srcOption === null && !isObject(mergeTarget[option])) {\n // If possible, explicit copy from globals\n if (isPresent(globalOption)) {\n mergeTarget[option] = create$4(globalOption);\n } else {\n return; // Nothing to do\n }\n }\n\n if (!isObject(srcOption)) {\n return;\n } //\n // Ensure that 'enabled' is properly set. It is required internally\n // Note that the value from options will always overwrite the existing value\n //\n\n\n var enabled = true; // default value\n\n if (srcOption.enabled !== undefined) {\n enabled = srcOption.enabled;\n } else {\n // Take from globals, if present\n if (globalEnabled !== undefined) {\n enabled = globalOption.enabled;\n }\n }\n\n doMerge(mergeTarget, options, option);\n mergeTarget[option].enabled = enabled;\n}", "function mergeOptions(parent, child, vm) {\n if (true) {\n checkComponents(child);\n }\n\n if (typeof child === 'function') {\n child = child.options;\n }\n\n normalizeProps(child, vm);\n normalizeInject(child, vm);\n normalizeDirectives(child); // Apply extends and mixins on the child options,\n // but only if it is a raw options object that isn't\n // the result of another mergeOptions call.\n // Only merged options has the _base property.\n\n if (!child._base) {\n if (child[\"extends\"]) {\n parent = mergeOptions(parent, child[\"extends\"], vm);\n }\n\n if (child.mixins) {\n for (var i = 0, l = child.mixins.length; i < l; i++) {\n parent = mergeOptions(parent, child.mixins[i], vm);\n }\n }\n }\n\n var options = {};\n var key;\n\n for (key in parent) {\n mergeField(key);\n }\n\n for (key in child) {\n if (!hasOwn(parent, key)) {\n mergeField(key);\n }\n }\n\n function mergeField(key) {\n var strat = strats[key] || defaultStrat;\n options[key] = strat(parent[key], child[key], vm, key);\n }\n\n return options;\n}", "function mergeOptions(parent, child, vm) {\n {\n checkComponents(child);\n }\n if (typeof child === 'function') {\n child = child.options;\n }\n normalizeProps(child, vm);\n normalizeInject(child, vm);\n normalizeDirectives(child);\n // Apply extends and mixins on the child options,\n // but only if it is a raw options object that isn't\n // the result of another mergeOptions call.\n // Only merged options has the _base property.\n if (!child._base) {\n if (child.extends) {\n parent = mergeOptions(parent, child.extends, vm);\n }\n if (child.mixins) {\n for (var i = 0, l = child.mixins.length; i < l; i++) {\n parent = mergeOptions(parent, child.mixins[i], vm);\n }\n }\n }\n var options = {};\n var key;\n for (key in parent) {\n mergeField(key);\n }\n for (key in child) {\n if (!hasOwn(parent, key)) {\n mergeField(key);\n }\n }\n function mergeField(key) {\n var strat = strats[key] || defaultStrat;\n options[key] = strat(parent[key], child[key], vm, key);\n }\n return options;\n }", "function mergeOptions(parent, child, vm) {\n if (\"development\" !== 'production') {\n checkComponents(child);\n }\n\n if (typeof child === 'function') {\n child = child.options;\n }\n\n normalizeProps(child, vm);\n normalizeInject(child, vm);\n normalizeDirectives(child); // Apply extends and mixins on the child options,\n // but only if it is a raw options object that isn't\n // the result of another mergeOptions call.\n // Only merged options has the _base property.\n\n if (!child._base) {\n if (child.extends) {\n parent = mergeOptions(parent, child.extends, vm);\n }\n\n if (child.mixins) {\n for (var i = 0, l = child.mixins.length; i < l; i++) {\n parent = mergeOptions(parent, child.mixins[i], vm);\n }\n }\n }\n\n var options = {};\n var key;\n\n for (key in parent) {\n mergeField(key);\n }\n\n for (key in child) {\n if (!hasOwn(parent, key)) {\n mergeField(key);\n }\n }\n\n function mergeField(key) {\n var strat = strats[key] || defaultStrat;\n options[key] = strat(parent[key], child[key], vm, key);\n }\n\n return options;\n}", "function mergeOptions (\n parent,\n child,\n vm\n) {\n {\n checkComponents(child);\n }\n\n if (typeof child === 'function') {\n child = child.options;\n }\n\n normalizeProps(child, vm);\n normalizeInject(child, vm);\n normalizeDirectives(child);\n var extendsFrom = child.extends;\n if (extendsFrom) {\n parent = mergeOptions(parent, extendsFrom, vm);\n }\n if (child.mixins) {\n for (var i = 0, l = child.mixins.length; i < l; i++) {\n parent = mergeOptions(parent, child.mixins[i], vm);\n }\n }\n var options = {};\n var key;\n for (key in parent) {\n mergeField(key);\n }\n for (key in child) {\n if (!hasOwn(parent, key)) {\n mergeField(key);\n }\n }\n function mergeField (key) {\n var strat = strats[key] || defaultStrat;\n options[key] = strat(parent[key], child[key], vm, key);\n }\n return options\n}", "function mergeOptions (\n parent,\n child,\n vm\n) {\n {\n checkComponents(child);\n }\n\n if (typeof child === 'function') {\n child = child.options;\n }\n\n normalizeProps(child, vm);\n normalizeInject(child, vm);\n normalizeDirectives(child);\n var extendsFrom = child.extends;\n if (extendsFrom) {\n parent = mergeOptions(parent, extendsFrom, vm);\n }\n if (child.mixins) {\n for (var i = 0, l = child.mixins.length; i < l; i++) {\n parent = mergeOptions(parent, child.mixins[i], vm);\n }\n }\n var options = {};\n var key;\n for (key in parent) {\n mergeField(key);\n }\n for (key in child) {\n if (!hasOwn(parent, key)) {\n mergeField(key);\n }\n }\n function mergeField (key) {\n var strat = strats[key] || defaultStrat;\n options[key] = strat(parent[key], child[key], vm, key);\n }\n return options\n}", "function mergeOptions (\n parent,\n child,\n vm\n) {\n {\n checkComponents(child);\n }\n\n if (typeof child === 'function') {\n child = child.options;\n }\n\n normalizeProps(child, vm);\n normalizeInject(child, vm);\n normalizeDirectives(child);\n var extendsFrom = child.extends;\n if (extendsFrom) {\n parent = mergeOptions(parent, extendsFrom, vm);\n }\n if (child.mixins) {\n for (var i = 0, l = child.mixins.length; i < l; i++) {\n parent = mergeOptions(parent, child.mixins[i], vm);\n }\n }\n var options = {};\n var key;\n for (key in parent) {\n mergeField(key);\n }\n for (key in child) {\n if (!hasOwn(parent, key)) {\n mergeField(key);\n }\n }\n function mergeField (key) {\n var strat = strats[key] || defaultStrat;\n options[key] = strat(parent[key], child[key], vm, key);\n }\n return options\n}", "function mergeOptions (\n parent,\n child,\n vm\n) {\n {\n checkComponents(child);\n }\n\n if (typeof child === 'function') {\n child = child.options;\n }\n\n normalizeProps(child, vm);\n normalizeInject(child, vm);\n normalizeDirectives(child);\n var extendsFrom = child.extends;\n if (extendsFrom) {\n parent = mergeOptions(parent, extendsFrom, vm);\n }\n if (child.mixins) {\n for (var i = 0, l = child.mixins.length; i < l; i++) {\n parent = mergeOptions(parent, child.mixins[i], vm);\n }\n }\n var options = {};\n var key;\n for (key in parent) {\n mergeField(key);\n }\n for (key in child) {\n if (!hasOwn(parent, key)) {\n mergeField(key);\n }\n }\n function mergeField (key) {\n var strat = strats[key] || defaultStrat;\n options[key] = strat(parent[key], child[key], vm, key);\n }\n return options\n}", "function mergeOptions (\n parent,\n child,\n vm\n) {\n {\n checkComponents(child);\n }\n\n if (typeof child === 'function') {\n child = child.options;\n }\n\n normalizeProps(child, vm);\n normalizeInject(child, vm);\n normalizeDirectives(child);\n var extendsFrom = child.extends;\n if (extendsFrom) {\n parent = mergeOptions(parent, extendsFrom, vm);\n }\n if (child.mixins) {\n for (var i = 0, l = child.mixins.length; i < l; i++) {\n parent = mergeOptions(parent, child.mixins[i], vm);\n }\n }\n var options = {};\n var key;\n for (key in parent) {\n mergeField(key);\n }\n for (key in child) {\n if (!hasOwn(parent, key)) {\n mergeField(key);\n }\n }\n function mergeField (key) {\n var strat = strats[key] || defaultStrat;\n options[key] = strat(parent[key], child[key], vm, key);\n }\n return options\n}", "function mergeOptions (\n parent,\n child,\n vm\n) {\n {\n checkComponents(child);\n }\n\n if (typeof child === 'function') {\n child = child.options;\n }\n\n normalizeProps(child, vm);\n normalizeInject(child, vm);\n normalizeDirectives(child);\n var extendsFrom = child.extends;\n if (extendsFrom) {\n parent = mergeOptions(parent, extendsFrom, vm);\n }\n if (child.mixins) {\n for (var i = 0, l = child.mixins.length; i < l; i++) {\n parent = mergeOptions(parent, child.mixins[i], vm);\n }\n }\n var options = {};\n var key;\n for (key in parent) {\n mergeField(key);\n }\n for (key in child) {\n if (!hasOwn(parent, key)) {\n mergeField(key);\n }\n }\n function mergeField (key) {\n var strat = strats[key] || defaultStrat;\n options[key] = strat(parent[key], child[key], vm, key);\n }\n return options\n}", "function mergeOptions(optionObjs) {\n\treturn mergeProps(optionObjs, complexOptions);\n}", "function mergeOptions(optionObjs) {\n\treturn mergeProps(optionObjs, complexOptions);\n}", "function mergeOptions(optionObjs) {\n\treturn mergeProps(optionObjs, complexOptions);\n}", "function mergeOptions(optionObjs) {\n\treturn mergeProps(optionObjs, complexOptions);\n}", "function mergeOptions(optionObjs) {\n\treturn mergeProps(optionObjs, complexOptions);\n}", "function mergeOptions(optionObjs) {\n\treturn mergeProps(optionObjs, complexOptions);\n}", "function mergeOptions(optionObjs) {\n\treturn mergeProps(optionObjs, complexOptions);\n}", "function mergeOptions(optionObjs) {\n\treturn mergeProps(optionObjs, complexOptions);\n}", "function mergeOptions (\n parent,\n child,\n vm\n) {\n if (typeof child === 'function') {\n child = child.options;\n }\n\n normalizeProps(child);\n normalizeInject(child);\n normalizeDirectives(child);\n var extendsFrom = child.extends;\n if (extendsFrom) {\n parent = mergeOptions(parent, extendsFrom, vm);\n }\n if (child.mixins) {\n for (var i = 0, l = child.mixins.length; i < l; i++) {\n parent = mergeOptions(parent, child.mixins[i], vm);\n }\n }\n var options = {};\n var key;\n for (key in parent) {\n mergeField(key);\n }\n for (key in child) {\n if (!hasOwn(parent, key)) {\n mergeField(key);\n }\n }\n function mergeField (key) {\n var strat = strats[key] || defaultStrat;\n options[key] = strat(parent[key], child[key], vm, key);\n }\n return options\n}", "function mergeOptions(parent, child, vm) {\n {\n checkComponents(child);\n }\n\n if (typeof child === 'function') {\n child = child.options;\n }\n\n normalizeProps(child, vm);\n normalizeInject(child, vm);\n normalizeDirectives(child); // Apply extends and mixins on the child options,\n // but only if it is a raw options object that isn't\n // the result of another mergeOptions call.\n // Only merged options has the _base property.\n\n if (!child._base) {\n if (child[\"extends\"]) {\n parent = mergeOptions(parent, child[\"extends\"], vm);\n }\n\n if (child.mixins) {\n for (var i = 0, l = child.mixins.length; i < l; i++) {\n parent = mergeOptions(parent, child.mixins[i], vm);\n }\n }\n }\n\n var options = {};\n var key;\n\n for (key in parent) {\n mergeField(key);\n }\n\n for (key in child) {\n if (!hasOwn(parent, key)) {\n mergeField(key);\n }\n }\n\n function mergeField(key) {\n var strat = strats[key] || defaultStrat;\n options[key] = strat(parent[key], child[key], vm, key);\n }\n\n return options;\n }", "function mergeOptions (\n\t parent,\n\t child,\n\t vm\n\t) {\n\t if (false) {\n\t checkComponents(child);\n\t }\n\t\n\t if (typeof child === 'function') {\n\t child = child.options;\n\t }\n\t\n\t normalizeProps(child, vm);\n\t normalizeInject(child, vm);\n\t normalizeDirectives(child);\n\t var extendsFrom = child.extends;\n\t if (extendsFrom) {\n\t parent = mergeOptions(parent, extendsFrom, vm);\n\t }\n\t if (child.mixins) {\n\t for (var i = 0, l = child.mixins.length; i < l; i++) {\n\t parent = mergeOptions(parent, child.mixins[i], vm);\n\t }\n\t }\n\t var options = {};\n\t var key;\n\t for (key in parent) {\n\t mergeField(key);\n\t }\n\t for (key in child) {\n\t if (!hasOwn(parent, key)) {\n\t mergeField(key);\n\t }\n\t }\n\t function mergeField (key) {\n\t var strat = strats[key] || defaultStrat;\n\t options[key] = strat(parent[key], child[key], vm, key);\n\t }\n\t return options\n\t}", "function mergeOptions (\n parent,\n child,\n vm\n) {\n if (\"production\" !== 'production') {\n checkComponents(child);\n }\n\n if (typeof child === 'function') {\n child = child.options;\n }\n\n normalizeProps(child, vm);\n normalizeInject(child, vm);\n normalizeDirectives(child);\n var extendsFrom = child.extends;\n if (extendsFrom) {\n parent = mergeOptions(parent, extendsFrom, vm);\n }\n if (child.mixins) {\n for (var i = 0, l = child.mixins.length; i < l; i++) {\n parent = mergeOptions(parent, child.mixins[i], vm);\n }\n }\n var options = {};\n var key;\n for (key in parent) {\n mergeField(key);\n }\n for (key in child) {\n if (!hasOwn(parent, key)) {\n mergeField(key);\n }\n }\n function mergeField (key) {\n var strat = strats[key] || defaultStrat;\n options[key] = strat(parent[key], child[key], vm, key);\n }\n return options\n}", "function mergeOptions (\n parent,\n child,\n vm\n) {\n if (\"production\" !== 'production') {\n checkComponents(child);\n }\n\n if (typeof child === 'function') {\n child = child.options;\n }\n\n normalizeProps(child, vm);\n normalizeInject(child, vm);\n normalizeDirectives(child);\n var extendsFrom = child.extends;\n if (extendsFrom) {\n parent = mergeOptions(parent, extendsFrom, vm);\n }\n if (child.mixins) {\n for (var i = 0, l = child.mixins.length; i < l; i++) {\n parent = mergeOptions(parent, child.mixins[i], vm);\n }\n }\n var options = {};\n var key;\n for (key in parent) {\n mergeField(key);\n }\n for (key in child) {\n if (!hasOwn(parent, key)) {\n mergeField(key);\n }\n }\n function mergeField (key) {\n var strat = strats[key] || defaultStrat;\n options[key] = strat(parent[key], child[key], vm, key);\n }\n return options\n}", "function mergeOptions (\n parent,\n child,\n vm\n) {\n {\n checkComponents(child);\n }\n\n if (typeof child === 'function') {\n child = child.options;\n }\n\n normalizeProps(child);\n normalizeInject(child);\n normalizeDirectives(child);\n var extendsFrom = child.extends;\n if (extendsFrom) {\n parent = mergeOptions(parent, extendsFrom, vm);\n }\n if (child.mixins) {\n for (var i = 0, l = child.mixins.length; i < l; i++) {\n parent = mergeOptions(parent, child.mixins[i], vm);\n }\n }\n var options = {};\n var key;\n for (key in parent) {\n mergeField(key);\n }\n for (key in child) {\n if (!hasOwn(parent, key)) {\n mergeField(key);\n }\n }\n function mergeField (key) {\n var strat = strats[key] || defaultStrat;\n options[key] = strat(parent[key], child[key], vm, key);\n }\n return options\n}", "function mergeOptions (\n parent,\n child,\n vm\n) {\n {\n checkComponents(child);\n }\n\n if (typeof child === 'function') {\n child = child.options;\n }\n\n normalizeProps(child);\n normalizeInject(child);\n normalizeDirectives(child);\n var extendsFrom = child.extends;\n if (extendsFrom) {\n parent = mergeOptions(parent, extendsFrom, vm);\n }\n if (child.mixins) {\n for (var i = 0, l = child.mixins.length; i < l; i++) {\n parent = mergeOptions(parent, child.mixins[i], vm);\n }\n }\n var options = {};\n var key;\n for (key in parent) {\n mergeField(key);\n }\n for (key in child) {\n if (!hasOwn(parent, key)) {\n mergeField(key);\n }\n }\n function mergeField (key) {\n var strat = strats[key] || defaultStrat;\n options[key] = strat(parent[key], child[key], vm, key);\n }\n return options\n}" ]
[ "0.76743364", "0.7325371", "0.72791517", "0.7276775", "0.72505414", "0.722436", "0.72167486", "0.72167486", "0.72167486", "0.72167486", "0.72167486", "0.72121763", "0.7198333", "0.71668035", "0.71602327", "0.71375287", "0.71375287", "0.71375287", "0.71051395", "0.7093834", "0.7087909", "0.70863503", "0.70863503", "0.7077063", "0.707498", "0.70625335", "0.7024775", "0.7024775", "0.7024775", "0.7024775", "0.7024775", "0.7024775", "0.7024775", "0.7024775", "0.70239085", "0.7020459", "0.7015059", "0.6981284", "0.6981284", "0.6957821", "0.69127065", "0.6887659", "0.6882695", "0.6868007", "0.6868007", "0.6868007", "0.68051434", "0.6803741", "0.67890626", "0.67366064", "0.67333084", "0.6664876", "0.66595715", "0.6656951", "0.6656145", "0.6640761", "0.6640761", "0.6640761", "0.6640761", "0.6636424", "0.66358757", "0.66240865", "0.66066056", "0.6596796", "0.65949696", "0.65949696", "0.65889144", "0.65889144", "0.65854865", "0.65854865", "0.65854865", "0.65854865", "0.6582199", "0.6577956", "0.6577956", "0.65650284", "0.65650284", "0.6564158", "0.6563623", "0.65526813", "0.6549259", "0.6549259", "0.6549259", "0.6549259", "0.6549259", "0.6549259", "0.6546417", "0.6546417", "0.6546417", "0.6546417", "0.6546417", "0.6546417", "0.6546417", "0.6546417", "0.6541614", "0.65359664", "0.6532979", "0.6532955", "0.6532955", "0.653172", "0.653172" ]
0.0
-1
Resolve an asset. This function is used because child instances need access to assets defined in its ancestor chain.
function resolveAsset ( options, type, id, warnMissing ) { /* istanbul ignore if */ if (typeof id !== 'string') { return } var assets = options[type]; // check local registration variations first if (hasOwn(assets, id)) { return assets[id] } var camelizedId = camelize(id); if (hasOwn(assets, camelizedId)) { return assets[camelizedId] } var PascalCaseId = capitalize(camelizedId); if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] } // fallback to prototype chain var res = assets[id] || assets[camelizedId] || assets[PascalCaseId]; if (false) {} return res }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resolveAsset(options,type,id,warnMissing){/* istanbul ignore if */if(typeof id!=='string'){return;}var assets=options[type];// check local registration variations first\nif(hasOwn(assets,id)){return assets[id];}var camelizedId=camelize(id);if(hasOwn(assets,camelizedId)){return assets[camelizedId];}var PascalCaseId=capitalize(camelizedId);if(hasOwn(assets,PascalCaseId)){return assets[PascalCaseId];}// fallback to prototype chain\nvar res=assets[id]||assets[camelizedId]||assets[PascalCaseId];if(\"development\"!=='production'&&warnMissing&&!res){warn('Failed to resolve '+type.slice(0,-1)+': '+id,options);}return res;}", "function resolveAsset(options,type,id,warnMissing){/* istanbul ignore if */if(typeof id!=='string'){return;}var assets=options[type];// check local registration variations first\nif(hasOwn(assets,id)){return assets[id];}var camelizedId=camelize(id);if(hasOwn(assets,camelizedId)){return assets[camelizedId];}var PascalCaseId=capitalize(camelizedId);if(hasOwn(assets,PascalCaseId)){return assets[PascalCaseId];}// fallback to prototype chain\nvar res=assets[id]||assets[camelizedId]||assets[PascalCaseId];if(\"development\"!=='production'&&warnMissing&&!res){warn('Failed to resolve '+type.slice(0,-1)+': '+id,options);}return res;}", "function resolveAsset(options,type,id,warnMissing){/* istanbul ignore if */if(typeof id!=='string'){return;}var assets=options[type];// check local registration variations first\n\tif(hasOwn(assets,id)){return assets[id];}var camelizedId=camelize(id);if(hasOwn(assets,camelizedId)){return assets[camelizedId];}var PascalCaseId=capitalize(camelizedId);if(hasOwn(assets,PascalCaseId)){return assets[PascalCaseId];}// fallback to prototype chain\n\tvar res=assets[id]||assets[camelizedId]||assets[PascalCaseId];if(\"development\"!=='production'&&warnMissing&&!res){warn('Failed to resolve '+type.slice(0,-1)+': '+id,options);}return res;}", "function resolveAsset(options, type, id, warnMissing) {\n\t /* istanbul ignore if */\n\t if (typeof id !== 'string') {\n\t return;\n\t }\n\t var assets = options[type];\n\t // check local registration variations first\n\t if (hasOwn(assets, id)) {\n\t return assets[id];\n\t }\n\t var camelizedId = camelize(id);\n\t if (hasOwn(assets, camelizedId)) {\n\t return assets[camelizedId];\n\t }\n\t var PascalCaseId = capitalize(camelizedId);\n\t if (hasOwn(assets, PascalCaseId)) {\n\t return assets[PascalCaseId];\n\t }\n\t // fallback to prototype chain\n\t var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n\t if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n\t warn('Failed to resolve ' + type.slice(0, -1) + ': ' + id, options);\n\t }\n\t return res;\n\t}", "function resolveAsset(options, type, id, warnMissing) {\n\t /* istanbul ignore if */\n\t if (typeof id !== 'string') {\n\t return;\n\t }\n\t var assets = options[type];\n\t // check local registration variations first\n\t if (hasOwn(assets, id)) {\n\t return assets[id];\n\t }\n\t var camelizedId = camelize(id);\n\t if (hasOwn(assets, camelizedId)) {\n\t return assets[camelizedId];\n\t }\n\t var PascalCaseId = capitalize(camelizedId);\n\t if (hasOwn(assets, PascalCaseId)) {\n\t return assets[PascalCaseId];\n\t }\n\t // fallback to prototype chain\n\t var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n\t if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n\t warn('Failed to resolve ' + type.slice(0, -1) + ': ' + id, options);\n\t }\n\t return res;\n\t}", "function resolveAsset(options, type, id, warnMissing) {\n\t /* istanbul ignore if */\n\t if (typeof id !== 'string') {\n\t return;\n\t }\n\t var assets = options[type];\n\t // check local registration variations first\n\t if (hasOwn(assets, id)) {\n\t return assets[id];\n\t }\n\t var camelizedId = camelize(id);\n\t if (hasOwn(assets, camelizedId)) {\n\t return assets[camelizedId];\n\t }\n\t var PascalCaseId = capitalize(camelizedId);\n\t if (hasOwn(assets, PascalCaseId)) {\n\t return assets[PascalCaseId];\n\t }\n\t // fallback to prototype chain\n\t var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n\t if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n\t warn('Failed to resolve ' + type.slice(0, -1) + ': ' + id, options);\n\t }\n\t return res;\n\t}", "function resolveAsset(options, type, id, warnMissing) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return;\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) {\n return assets[id];\n }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) {\n return assets[camelizedId];\n }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) {\n return assets[PascalCaseId];\n }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n warn('Failed to resolve ' + type.slice(0, -1) + ': ' + id, options);\n }\n return res;\n}", "function resolveAsset(options, type, id, warnMissing) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return;\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) {\n return assets[id];\n }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) {\n return assets[camelizedId];\n }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) {\n return assets[PascalCaseId];\n }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n warn('Failed to resolve ' + type.slice(0, -1) + ': ' + id, options);\n }\n return res;\n}", "function resolveAsset(options, type, id, warnMissing) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return;\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) {\n return assets[id];\n }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) {\n return assets[camelizedId];\n }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) {\n return assets[PascalCaseId];\n }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n warn('Failed to resolve ' + type.slice(0, -1) + ': ' + id, options);\n }\n return res;\n}", "function resolveAsset(options, type, id, warnMissing) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return;\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) {\n return assets[id];\n }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) {\n return assets[camelizedId];\n }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) {\n return assets[PascalCaseId];\n }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n warn('Failed to resolve ' + type.slice(0, -1) + ': ' + id, options);\n }\n return res;\n}", "function resolveAsset(options, type, id, warnMissing) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return;\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) {\n return assets[id];\n }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) {\n return assets[camelizedId];\n }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) {\n return assets[PascalCaseId];\n }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n warn('Failed to resolve ' + type.slice(0, -1) + ': ' + id, options);\n }\n return res;\n}", "function resolveAsset(options, type, id, warnMissing) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return;\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) {\n return assets[id];\n }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) {\n return assets[camelizedId];\n }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) {\n return assets[PascalCaseId];\n }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (\"development\" !== 'production' && warnMissing && !res) {\n warn('Failed to resolve ' + type.slice(0, -1) + ': ' + id, options);\n }\n return res;\n }", "function resolveAsset(options, type, id, warnMissing) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return;\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) {\n return assets[id];\n }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) {\n return assets[camelizedId];\n }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) {\n return assets[PascalCaseId];\n }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (\"development\" !== 'production' && warnMissing && !res) {\n warn('Failed to resolve ' + type.slice(0, -1) + ': ' + id, options);\n }\n return res;\n}", "function resolveAsset(options, type, id, warnMissing) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return;\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) {\n return assets[id];\n }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) {\n return assets[camelizedId];\n }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) {\n return assets[PascalCaseId];\n }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (\"development\" !== 'production' && warnMissing && !res) {\n warn('Failed to resolve ' + type.slice(0, -1) + ': ' + id, options);\n }\n return res;\n}", "function resolveAsset(options, type, id, warnMissing) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return;\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) {\n return assets[id];\n }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) {\n return assets[camelizedId];\n }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) {\n return assets[PascalCaseId];\n }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if ('development' !== 'production' && warnMissing && !res) {\n warn('Failed to resolve ' + type.slice(0, -1) + ': ' + id, options);\n }\n return res;\n}", "function resolveAsset(options, type, id, warnMissing) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return;\n }\n\n var assets = options[type]; // check local registration variations first\n\n if (hasOwn(assets, id)) {\n return assets[id];\n }\n\n var camelizedId = camelize(id);\n\n if (hasOwn(assets, camelizedId)) {\n return assets[camelizedId];\n }\n\n var PascalCaseId = capitalize(camelizedId);\n\n if (hasOwn(assets, PascalCaseId)) {\n return assets[PascalCaseId];\n } // fallback to prototype chain\n\n\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n\n if (warnMissing && !res) {\n warn('Failed to resolve ' + type.slice(0, -1) + ': ' + id, options);\n }\n\n return res;\n }", "function resolveAsset(options, type, id, warnMissing) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return;\n }\n\n var assets = options[type]; // check local registration variations first\n\n if (hasOwn(assets, id)) {\n return assets[id];\n }\n\n var camelizedId = camelize(id);\n\n if (hasOwn(assets, camelizedId)) {\n return assets[camelizedId];\n }\n\n var PascalCaseId = capitalize(camelizedId);\n\n if (hasOwn(assets, PascalCaseId)) {\n return assets[PascalCaseId];\n } // fallback to prototype chain\n\n\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n\n if ( true && warnMissing && !res) {\n warn('Failed to resolve ' + type.slice(0, -1) + ': ' + id, options);\n }\n\n return res;\n}", "function resolveAsset(options, type, id, warnMissing) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return;\n }\n\n var assets = options[type]; // check local registration variations first\n\n if (hasOwn(assets, id)) {\n return assets[id];\n }\n\n var camelizedId = camelize(id);\n\n if (hasOwn(assets, camelizedId)) {\n return assets[camelizedId];\n }\n\n var PascalCaseId = capitalize(camelizedId);\n\n if (hasOwn(assets, PascalCaseId)) {\n return assets[PascalCaseId];\n } // fallback to prototype chain\n\n\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n\n if (\"development\" !== 'production' && warnMissing && !res) {\n warn('Failed to resolve ' + type.slice(0, -1) + ': ' + id, options);\n }\n\n return res;\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n\t options,\n\t type,\n\t id,\n\t warnMissing\n\t) {\n\t /* istanbul ignore if */\n\t if (typeof id !== 'string') {\n\t return\n\t }\n\t var assets = options[type];\n\t // check local registration variations first\n\t if (hasOwn(assets, id)) { return assets[id] }\n\t var camelizedId = camelize(id);\n\t if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n\t var PascalCaseId = capitalize(camelizedId);\n\t if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n\t // fallback to prototype chain\n\t var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n\t if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n\t warn(\n\t 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n\t options\n\t );\n\t }\n\t return res\n\t}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if ('production' !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (\"production\" !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (\"production\" !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n ) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (\"debug\" !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n }", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (\"development\" !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (\"development\" !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (\"development\" !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (\"development\" !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (\"development\" !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (\"development\" !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (\"development\" !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (\"development\" !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (\"development\" !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (\"development\" !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (\"development\" !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (\"development\" !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (\"development\" !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (\"development\" !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (\"development\" !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (\"development\" !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (\"development\" !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (\"development\" !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (\"development\" !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (\"development\" !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (\"development\" !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (\"development\" !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (\"development\" !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (\"development\" !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (\"development\" !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (\"development\" !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (\"development\" !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (\"development\" !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (\"development\" !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (\"development\" !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if ('development' !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if ( true && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if ( true && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if ( true && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if ( true && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if ( true && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if ( true && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if ( true && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if ( true && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if ( true && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if ( true && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if ( true && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if ( true && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if ( true && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if ( true && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if ( true && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if ( true && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if ( true && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if ( true && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if ( true && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if ( true && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if ( true && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if ( true && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if ( true && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if ( true && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if ( true && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if ( true && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if ( true && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}", "function resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if ( true && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}" ]
[ "0.62818235", "0.62818235", "0.62603885", "0.61542135", "0.61542135", "0.61542135", "0.6125455", "0.6125455", "0.6125455", "0.6125455", "0.6125455", "0.6111469", "0.60809875", "0.60809875", "0.6080285", "0.60571265", "0.6020012", "0.59978414", "0.5971991", "0.5971991", "0.5971991", "0.5971991", "0.5971991", "0.5971991", "0.5971991", "0.5971991", "0.5971991", "0.5971991", "0.5971991", "0.5971991", "0.5971991", "0.5971991", "0.5971991", "0.5971991", "0.5971991", "0.5971991", "0.5971991", "0.5964618", "0.59468687", "0.5943343", "0.5943343", "0.593744", "0.59317124", "0.59317124", "0.59317124", "0.59317124", "0.59317124", "0.59317124", "0.59317124", "0.59317124", "0.59317124", "0.59317124", "0.59317124", "0.59317124", "0.59317124", "0.59317124", "0.59317124", "0.59317124", "0.59317124", "0.59317124", "0.59317124", "0.59317124", "0.59317124", "0.59317124", "0.59317124", "0.59317124", "0.59317124", "0.59317124", "0.59317124", "0.59317124", "0.59317124", "0.59317124", "0.59301347", "0.5929462", "0.5929462", "0.5929462", "0.5929462", "0.5929462", "0.5929462", "0.5929462", "0.5929462", "0.5929462", "0.5929462", "0.5929462", "0.5929462", "0.5929462", "0.5929462", "0.5929462", "0.5929462", "0.5929462", "0.5929462", "0.5929462", "0.5929462", "0.5929462", "0.5929462", "0.5929462", "0.5929462", "0.5929462", "0.5929462", "0.5929462", "0.5929462" ]
0.0
-1
Get the default value of a prop.
function getPropDefaultValue (vm, prop, key) { // no default, return undefined if (!hasOwn(prop, 'default')) { return undefined } var def = prop.default; // warn against non-factory defaults for Object & Array if (false) {} // the raw prop value was also undefined from previous render, // return previous default value to avoid unnecessary watcher trigger if (vm && vm.$options.propsData && vm.$options.propsData[key] === undefined && vm._props[key] !== undefined ) { return vm._props[key] } // call factory function for non-Function types // a value is Function if its prototype is function even across different execution context return typeof def === 'function' && getType(prop.type) !== 'Function' ? def.call(vm) : def }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n }", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n }", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n }", "function getPropDefaultValue(vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, \"default\")) {\n return undefined;\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n \"Props with type Object/Array must use a factory function \" +\n \"to return the default value.\",\n vm,\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (\n vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key];\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === \"function\" && getType(prop.type) !== \"Function\"\n ? def.call(vm)\n : def;\n }", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if ( isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n }", "function getPropDefaultValue(vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined;\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (\"development\" !== 'production' && isObject(def)) {\n warn('Invalid default value for prop \"' + key + '\": ' + 'Props with type Object/Array must use a factory function ' + 'to return the default value.', vm);\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData && vm.$options.propsData[key] === undefined && vm._props[key] !== undefined) {\n return vm._props[key];\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function' ? def.call(vm) : def;\n }", "function getPropDefaultValue(vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined;\n }\n\n var def = prop[\"default\"]; // warn against non-factory defaults for Object & Array\n\n if (isObject(def)) {\n warn('Invalid default value for prop \"' + key + '\": ' + 'Props with type Object/Array must use a factory function ' + 'to return the default value.', vm);\n } // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n\n\n if (vm && vm.$options.propsData && vm.$options.propsData[key] === undefined && vm._props[key] !== undefined) {\n return vm._props[key];\n } // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n\n\n return typeof def === 'function' && getType(prop.type) !== 'Function' ? def.call(vm) : def;\n }", "function getPropDefaultValue(vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined;\n }\n\n var def = prop[\"default\"]; // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n\n if (vm && vm.$options.propsData && vm.$options.propsData[key] === undefined && vm._props[key] !== undefined) {\n return vm._props[key];\n } // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n\n\n return typeof def === 'function' && getType(prop.type) !== 'Function' ? def.call(vm) : def;\n}", "function getPropDefaultValue(vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined;\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if ( isObject(def)) {\n warn('Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.', vm);\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm\n && vm.$options.propsData\n && vm.$options.propsData[key] === undefined\n && vm._props[key] !== undefined) {\n return vm._props[key];\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def;\n }", "function getPropDefaultValue(vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined;\n }\n\n var def = prop.default; // warn against non-factory defaults for Object & Array\n\n if (false) {} // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n\n\n if (vm && vm.$options.propsData && vm.$options.propsData[key] === undefined && vm._props[key] !== undefined) {\n return vm._props[key];\n } // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n\n\n return typeof def === 'function' && getType(prop.type) !== 'Function' ? def.call(vm) : def;\n}", "function getPropDefaultValue(vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined;\n }\n\n var def = prop.default; // warn against non-factory defaults for Object & Array\n\n if (false) {} // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n\n\n if (vm && vm.$options.propsData && vm.$options.propsData[key] === undefined && vm._props[key] !== undefined) {\n return vm._props[key];\n } // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n\n\n return typeof def === 'function' && getType(prop.type) !== 'Function' ? def.call(vm) : def;\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (\"debug\" !== 'production' && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n }", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (\"production\" !== 'production' && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (\"production\" !== 'production' && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue(vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined;\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (\"development\" !== 'production' && isObject(def)) {\n warn('Invalid default value for prop \"' + key + '\": ' + 'Props with type Object/Array must use a factory function ' + 'to return the default value.', vm);\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData && vm.$options.propsData[key] === undefined && vm._props[key] !== undefined) {\n return vm._props[key];\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function' ? def.call(vm) : def;\n}", "function getPropDefaultValue(vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined;\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (\"development\" !== 'production' && isObject(def)) {\n warn('Invalid default value for prop \"' + key + '\": ' + 'Props with type Object/Array must use a factory function ' + 'to return the default value.', vm);\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData && vm.$options.propsData[key] === undefined && vm._props[key] !== undefined) {\n return vm._props[key];\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function' ? def.call(vm) : def;\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (\"development\" !== 'production' && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (\"development\" !== 'production' && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (\"development\" !== 'production' && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (\"development\" !== 'production' && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (\"development\" !== 'production' && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (\"development\" !== 'production' && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (\"development\" !== 'production' && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (\"development\" !== 'production' && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (\"development\" !== 'production' && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (\"development\" !== 'production' && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (\"development\" !== 'production' && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (\"development\" !== 'production' && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (\"development\" !== 'production' && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (\"development\" !== 'production' && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (\"development\" !== 'production' && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (\"development\" !== 'production' && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (\"development\" !== 'production' && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (\"development\" !== 'production' && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (\"development\" !== 'production' && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (\"development\" !== 'production' && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (\"development\" !== 'production' && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (\"development\" !== 'production' && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (\"development\" !== 'production' && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (\"development\" !== 'production' && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (\"development\" !== 'production' && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (\"development\" !== 'production' && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (\"development\" !== 'production' && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (\"development\" !== 'production' && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if ( true && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if ( true && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if ( true && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if ( true && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if ( true && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if ( true && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if ( true && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if ( true && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if ( true && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if ( true && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if ( true && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if ( true && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if ( true && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if ( true && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}", "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if ( true && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}" ]
[ "0.7784161", "0.7784161", "0.7784161", "0.77839553", "0.7770856", "0.7740233", "0.7732649", "0.7714429", "0.7713042", "0.7703943", "0.7703943", "0.7695614", "0.7695614", "0.7695614", "0.7695614", "0.7695614", "0.7695614", "0.7695614", "0.7695614", "0.7695614", "0.7695614", "0.7695614", "0.7695614", "0.7695614", "0.7695614", "0.7695614", "0.7695614", "0.7695614", "0.7695614", "0.7695614", "0.7695614", "0.7695614", "0.7695614", "0.7695614", "0.7695614", "0.7695614", "0.7695614", "0.7695614", "0.7695614", "0.7695614", "0.7695614", "0.7695614", "0.7695614", "0.7695614", "0.7695614", "0.7695614", "0.7695614", "0.7682984", "0.76563066", "0.76563066", "0.7654487", "0.7654487", "0.7652002", "0.7652002", "0.7652002", "0.7652002", "0.7652002", "0.7652002", "0.7652002", "0.7652002", "0.7652002", "0.7652002", "0.7652002", "0.7652002", "0.7652002", "0.7652002", "0.7652002", "0.7652002", "0.7652002", "0.7652002", "0.7652002", "0.7652002", "0.7652002", "0.7652002", "0.7652002", "0.7652002", "0.7652002", "0.7652002", "0.7652002", "0.7652002", "0.7651672", "0.7651672", "0.7651672", "0.7651672", "0.7651672", "0.7651672", "0.7651672", "0.7651672", "0.7651672", "0.7651672", "0.7651672", "0.7651672", "0.7651672", "0.7651672", "0.7651672" ]
0.77379143
11
Assert whether a prop is valid.
function assertProp ( prop, name, value, vm, absent ) { if (prop.required && absent) { warn( 'Missing required prop: "' + name + '"', vm ); return } if (value == null && !prop.required) { return } var type = prop.type; var valid = !type || type === true; var expectedTypes = []; if (type) { if (!Array.isArray(type)) { type = [type]; } for (var i = 0; i < type.length && !valid; i++) { var assertedType = assertType(value, type[i]); expectedTypes.push(assertedType.expectedType || ''); valid = assertedType.valid; } } if (!valid) { warn( getInvalidTypeMessage(name, value, expectedTypes), vm ); return } var validator = prop.validator; if (validator) { if (!validator(value)) { warn( 'Invalid prop: custom validator check failed for prop "' + name + '".', vm ); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function assertProp(prop,name,value,vm,absent){if(prop.required&&absent){warn('Missing required prop: \"'+name+'\"',vm);return;}if(value==null&&!prop.required){return;}var type=prop.type;var valid=!type||type===true;var expectedTypes=[];if(type){if(!Array.isArray(type)){type=[type];}for(var i=0;i<type.length&&!valid;i++){var assertedType=assertType(value,type[i]);expectedTypes.push(assertedType.expectedType||'');valid=assertedType.valid;}}if(!valid){warn('Invalid prop: type check failed for prop \"'+name+'\".'+' Expected '+expectedTypes.map(capitalize).join(', ')+', got '+Object.prototype.toString.call(value).slice(8,-1)+'.',vm);return;}var validator=prop.validator;if(validator){if(!validator(value)){warn('Invalid prop: custom validator check failed for prop \"'+name+'\".',vm);}}}", "function assertProp(prop,name,value,vm,absent){if(prop.required&&absent){warn('Missing required prop: \"'+name+'\"',vm);return;}if(value==null&&!prop.required){return;}var type=prop.type;var valid=!type||type===true;var expectedTypes=[];if(type){if(!Array.isArray(type)){type=[type];}for(var i=0;i<type.length&&!valid;i++){var assertedType=assertType(value,type[i]);expectedTypes.push(assertedType.expectedType||'');valid=assertedType.valid;}}if(!valid){warn(\"Invalid prop: type check failed for prop \\\"\"+name+\"\\\".\"+\" Expected \"+expectedTypes.map(capitalize).join(', ')+\", got \"+toRawType(value)+\".\",vm);return;}var validator=prop.validator;if(validator){if(!validator(value)){warn('Invalid prop: custom validator check failed for prop \"'+name+'\".',vm);}}}", "function assertProp(prop,name,value,vm,absent){if(prop.required&&absent){warn('Missing required prop: \"'+name+'\"',vm);return;}if(value==null&&!prop.required){return;}var type=prop.type;var valid=!type||type===true;var expectedTypes=[];if(type){if(!Array.isArray(type)){type=[type];}for(var i=0;i<type.length&&!valid;i++){var assertedType=assertType(value,type[i]);expectedTypes.push(assertedType.expectedType||'');valid=assertedType.valid;}}if(!valid){warn(\"Invalid prop: type check failed for prop \\\"\"+name+\"\\\".\"+\" Expected \"+expectedTypes.map(capitalize).join(', ')+\", got \"+toRawType(value)+\".\",vm);return;}var validator=prop.validator;if(validator){if(!validator(value)){warn('Invalid prop: custom validator check failed for prop \"'+name+'\".',vm);}}}", "function assertProp(prop, name, value, vm, absent) {\n\t\t if (prop.required && absent) {\n\t\t warn('Missing required prop: \"' + name + '\"', vm);\n\t\t return;\n\t\t }\n\t\t if (value == null && !prop.required) {\n\t\t return;\n\t\t }\n\t\t var type = prop.type;\n\t\t var valid = !type;\n\t\t var expectedTypes = [];\n\t\t if (type) {\n\t\t if (!Array.isArray(type)) {\n\t\t type = [type];\n\t\t }\n\t\t for (var i = 0; i < type.length && !valid; i++) {\n\t\t var assertedType = assertType(value, type[i]);\n\t\t expectedTypes.push(assertedType.expectedType);\n\t\t valid = assertedType.valid;\n\t\t }\n\t\t }\n\t\t if (!valid) {\n\t\t warn('Invalid prop: type check failed for prop \"' + name + '\".' + ' Expected ' + expectedTypes.map(capitalize).join(', ') + ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.', vm);\n\t\t return;\n\t\t }\n\t\t var validator = prop.validator;\n\t\t if (validator) {\n\t\t if (!validator(value)) {\n\t\t warn('Invalid prop: custom validator check failed for prop \"' + name + '\".', vm);\n\t\t }\n\t\t }\n\t\t}", "function assertProp(prop, name, value, vm, absent) {\n if (prop.required && absent) {\n warn('Missing required prop: \"' + name + '\"', vm);\n return;\n }\n if (value == null && !prop.required) {\n return;\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" + \" Expected \" + expectedTypes.map(capitalize).join(', ') + \", got \" + toRawType(value) + \".\", vm);\n return;\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn('Invalid prop: custom validator check failed for prop \"' + name + '\".', vm);\n }\n }\n }", "function assertProp(prop, name, value, vm, absent) {\n\t if (prop.required && absent) {\n\t warn('Missing required prop: \"' + name + '\"', vm);\n\t return;\n\t }\n\t if (value == null && !prop.required) {\n\t return;\n\t }\n\t var type = prop.type;\n\t var valid = !type || type === true;\n\t var expectedTypes = [];\n\t if (type) {\n\t if (!Array.isArray(type)) {\n\t type = [type];\n\t }\n\t for (var i = 0; i < type.length && !valid; i++) {\n\t var assertedType = assertType(value, type[i]);\n\t expectedTypes.push(assertedType.expectedType || '');\n\t valid = assertedType.valid;\n\t }\n\t }\n\t if (!valid) {\n\t warn('Invalid prop: type check failed for prop \"' + name + '\".' + ' Expected ' + expectedTypes.map(capitalize).join(', ') + ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.', vm);\n\t return;\n\t }\n\t var validator = prop.validator;\n\t if (validator) {\n\t if (!validator(value)) {\n\t warn('Invalid prop: custom validator check failed for prop \"' + name + '\".', vm);\n\t }\n\t }\n\t}", "function assertProp(prop, name, value, vm, absent) {\n\t if (prop.required && absent) {\n\t warn('Missing required prop: \"' + name + '\"', vm);\n\t return;\n\t }\n\t if (value == null && !prop.required) {\n\t return;\n\t }\n\t var type = prop.type;\n\t var valid = !type || type === true;\n\t var expectedTypes = [];\n\t if (type) {\n\t if (!Array.isArray(type)) {\n\t type = [type];\n\t }\n\t for (var i = 0; i < type.length && !valid; i++) {\n\t var assertedType = assertType(value, type[i]);\n\t expectedTypes.push(assertedType.expectedType || '');\n\t valid = assertedType.valid;\n\t }\n\t }\n\t if (!valid) {\n\t warn('Invalid prop: type check failed for prop \"' + name + '\".' + ' Expected ' + expectedTypes.map(capitalize).join(', ') + ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.', vm);\n\t return;\n\t }\n\t var validator = prop.validator;\n\t if (validator) {\n\t if (!validator(value)) {\n\t warn('Invalid prop: custom validator check failed for prop \"' + name + '\".', vm);\n\t }\n\t }\n\t}", "function assertProp(prop, name, value, vm, absent) {\n\t if (prop.required && absent) {\n\t warn('Missing required prop: \"' + name + '\"', vm);\n\t return;\n\t }\n\t if (value == null && !prop.required) {\n\t return;\n\t }\n\t var type = prop.type;\n\t var valid = !type || type === true;\n\t var expectedTypes = [];\n\t if (type) {\n\t if (!Array.isArray(type)) {\n\t type = [type];\n\t }\n\t for (var i = 0; i < type.length && !valid; i++) {\n\t var assertedType = assertType(value, type[i]);\n\t expectedTypes.push(assertedType.expectedType || '');\n\t valid = assertedType.valid;\n\t }\n\t }\n\t if (!valid) {\n\t warn('Invalid prop: type check failed for prop \"' + name + '\".' + ' Expected ' + expectedTypes.map(capitalize).join(', ') + ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.', vm);\n\t return;\n\t }\n\t var validator = prop.validator;\n\t if (validator) {\n\t if (!validator(value)) {\n\t warn('Invalid prop: custom validator check failed for prop \"' + name + '\".', vm);\n\t }\n\t }\n\t}", "function assertProp(prop, name, value, vm, absent) {\n if (prop.required && absent) {\n warn('Missing required prop: \"' + name + '\"', vm);\n return;\n }\n if (value == null && !prop.required) {\n return;\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn('Invalid prop: type check failed for prop \"' + name + '\".' + ' Expected ' + expectedTypes.map(capitalize).join(', ') + ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.', vm);\n return;\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn('Invalid prop: custom validator check failed for prop \"' + name + '\".', vm);\n }\n }\n}", "function assertProp(prop, name, value, vm, absent) {\n if (prop.required && absent) {\n warn('Missing required prop: \"' + name + '\"', vm);\n return;\n }\n if (value == null && !prop.required) {\n return;\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn('Invalid prop: type check failed for prop \"' + name + '\".' + ' Expected ' + expectedTypes.map(capitalize).join(', ') + ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.', vm);\n return;\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn('Invalid prop: custom validator check failed for prop \"' + name + '\".', vm);\n }\n }\n}", "function assertProp(prop, name, value, vm, absent) {\n if (prop.required && absent) {\n warn('Missing required prop: \"' + name + '\"', vm);\n return;\n }\n if (value == null && !prop.required) {\n return;\n }\n var type = prop.type;\n var valid = !type;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType);\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn('Invalid prop: type check failed for prop \"' + name + '\".' + ' Expected ' + expectedTypes.map(capitalize).join(', ') + ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.', vm);\n return;\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn('Invalid prop: custom validator check failed for prop \"' + name + '\".', vm);\n }\n }\n}", "function assertProp(prop, name, value, vm, absent) {\n if (prop.required && absent) {\n warn('Missing required prop: \"' + name + '\"', vm);\n return;\n }\n if (value == null && !prop.required) {\n return;\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" + \" Expected \" + expectedTypes.map(capitalize).join(', ') + \", got \" + toRawType(value) + \".\", vm);\n return;\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn('Invalid prop: custom validator check failed for prop \"' + name + '\".', vm);\n }\n }\n}", "function assertProp(prop, name, value, vm, absent) {\n if (prop.required && absent) {\n warn('Missing required prop: \"' + name + '\"', vm);\n return;\n }\n if (value == null && !prop.required) {\n return;\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" + \" Expected \" + expectedTypes.map(capitalize).join(', ') + \", got \" + toRawType(value) + \".\", vm);\n return;\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn('Invalid prop: custom validator check failed for prop \"' + name + '\".', vm);\n }\n }\n}", "function assertProp(prop, name, value, vm, absent) {\n if (prop.required && absent) {\n warn('Missing required prop: \"' + name + '\"', vm);\n return;\n }\n if (value == null && !prop.required) {\n return;\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" + \" Expected \" + expectedTypes.map(capitalize).join(', ') + \", got \" + toRawType(value) + \".\", vm);\n return;\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn('Invalid prop: custom validator check failed for prop \"' + name + '\".', vm);\n }\n }\n}", "function assertProp(prop, name, value, vm, absent) {\n if (prop.required && absent) {\n warn('Missing required prop: \"' + name + '\"', vm);\n return;\n }\n if (value == null && !prop.required) {\n return;\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" + \" Expected \" + expectedTypes.map(capitalize).join(', ') + \", got \" + toRawType(value) + \".\", vm);\n return;\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn('Invalid prop: custom validator check failed for prop \"' + name + '\".', vm);\n }\n }\n}", "function assertProp(prop, name, value, vm, absent) {\n if (prop.required && absent) {\n warn('Missing required prop: \"' + name + '\"', vm);\n return;\n }\n if (value == null && !prop.required) {\n return;\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" + \" Expected \" + expectedTypes.map(capitalize).join(', ') + \", got \" + toRawType(value) + \".\", vm);\n return;\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn('Invalid prop: custom validator check failed for prop \"' + name + '\".', vm);\n }\n }\n}", "function assertProp(prop, name, value, vm, absent) {\n if (prop.required && absent) {\n warn('Missing required prop: \"' + name + '\"', vm);\n return;\n }\n if (value == null && !prop.required) {\n return;\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" + \" Expected \" + expectedTypes.map(capitalize).join(', ') + \", got \" + toRawType(value) + \".\", vm);\n return;\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn('Invalid prop: custom validator check failed for prop \"' + name + '\".', vm);\n }\n }\n}", "function assertProp(prop, name, value, vm, absent) {\n if (prop.required && absent) {\n warn('Missing required prop: \"' + name + '\"', vm);\n return;\n }\n if (value == null && !prop.required) {\n return;\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(getInvalidTypeMessage(name, value, expectedTypes), vm);\n return;\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn('Invalid prop: custom validator check failed for prop \"' + name + '\".', vm);\n }\n }\n }", "function assertProp(prop, name, value, vm, absent) {\n if (prop.required && absent) {\n warn('Missing required prop: \"' + name + '\"', vm);\n return;\n }\n\n if (value == null && !prop.required) {\n return;\n }\n\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n\n if (!valid) {\n warn(getInvalidTypeMessage(name, value, expectedTypes), vm);\n return;\n }\n\n var validator = prop.validator;\n\n if (validator) {\n if (!validator(value)) {\n warn('Invalid prop: custom validator check failed for prop \"' + name + '\".', vm);\n }\n }\n }", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n 'Invalid prop: type check failed for prop \"' + name + '\".' +\n ' Expected ' + expectedTypes.map(capitalize).join(', ') +\n ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n 'Invalid prop: type check failed for prop \"' + name + '\".' +\n ' Expected ' + expectedTypes.map(capitalize).join(', ') +\n ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n 'Invalid prop: type check failed for prop \"' + name + '\".' +\n ' Expected ' + expectedTypes.map(capitalize).join(', ') +\n ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n 'Invalid prop: type check failed for prop \"' + name + '\".' +\n ' Expected ' + expectedTypes.map(capitalize).join(', ') +\n ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n 'Invalid prop: type check failed for prop \"' + name + '\".' +\n ' Expected ' + expectedTypes.map(capitalize).join(', ') +\n ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n 'Invalid prop: type check failed for prop \"' + name + '\".' +\n ' Expected ' + expectedTypes.map(capitalize).join(', ') +\n ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n 'Invalid prop: type check failed for prop \"' + name + '\".' +\n ' Expected ' + expectedTypes.map(capitalize).join(', ') +\n ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n 'Invalid prop: type check failed for prop \"' + name + '\".' +\n ' Expected ' + expectedTypes.map(capitalize).join(', ') +\n ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n 'Invalid prop: type check failed for prop \"' + name + '\".' +\n ' Expected ' + expectedTypes.map(capitalize).join(', ') +\n ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n 'Invalid prop: type check failed for prop \"' + name + '\".' +\n ' Expected ' + expectedTypes.map(capitalize).join(', ') +\n ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n 'Invalid prop: type check failed for prop \"' + name + '\".' +\n ' Expected ' + expectedTypes.map(capitalize).join(', ') +\n ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n 'Invalid prop: type check failed for prop \"' + name + '\".' +\n ' Expected ' + expectedTypes.map(capitalize).join(', ') +\n ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n 'Invalid prop: type check failed for prop \"' + name + '\".' +\n ' Expected ' + expectedTypes.map(capitalize).join(', ') +\n ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n 'Invalid prop: type check failed for prop \"' + name + '\".' +\n ' Expected ' + expectedTypes.map(capitalize).join(', ') +\n ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n 'Invalid prop: type check failed for prop \"' + name + '\".' +\n ' Expected ' + expectedTypes.map(capitalize).join(', ') +\n ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n 'Invalid prop: type check failed for prop \"' + name + '\".' +\n ' Expected ' + expectedTypes.map(capitalize).join(', ') +\n ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n 'Invalid prop: type check failed for prop \"' + name + '\".' +\n ' Expected ' + expectedTypes.map(capitalize).join(', ') +\n ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n 'Invalid prop: type check failed for prop \"' + name + '\".' +\n ' Expected ' + expectedTypes.map(capitalize).join(', ') +\n ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n 'Invalid prop: type check failed for prop \"' + name + '\".' +\n ' Expected ' + expectedTypes.map(capitalize).join(', ') +\n ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n 'Invalid prop: type check failed for prop \"' + name + '\".' +\n ' Expected ' + expectedTypes.map(capitalize).join(', ') +\n ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n 'Invalid prop: type check failed for prop \"' + name + '\".' +\n ' Expected ' + expectedTypes.map(capitalize).join(', ') +\n ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n 'Invalid prop: type check failed for prop \"' + name + '\".' +\n ' Expected ' + expectedTypes.map(capitalize).join(', ') +\n ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType);\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n 'Invalid prop: type check failed for prop \"' + name + '\".' +\n ' Expected ' + expectedTypes.map(capitalize).join(', ') +\n ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType);\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n 'Invalid prop: type check failed for prop \"' + name + '\".' +\n ' Expected ' + expectedTypes.map(capitalize).join(', ') +\n ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp (\n\t prop,\n\t name,\n\t value,\n\t vm,\n\t absent\n\t) {\n\t if (prop.required && absent) {\n\t warn(\n\t 'Missing required prop: \"' + name + '\"',\n\t vm\n\t );\n\t return\n\t }\n\t if (value == null && !prop.required) {\n\t return\n\t }\n\t var type = prop.type;\n\t var valid = !type || type === true;\n\t var expectedTypes = [];\n\t if (type) {\n\t if (!Array.isArray(type)) {\n\t type = [type];\n\t }\n\t for (var i = 0; i < type.length && !valid; i++) {\n\t var assertedType = assertType(value, type[i]);\n\t expectedTypes.push(assertedType.expectedType || '');\n\t valid = assertedType.valid;\n\t }\n\t }\n\t if (!valid) {\n\t warn(\n\t 'Invalid prop: type check failed for prop \"' + name + '\".' +\n\t ' Expected ' + expectedTypes.map(capitalize).join(', ') +\n\t ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\n\t vm\n\t );\n\t return\n\t }\n\t var validator = prop.validator;\n\t if (validator) {\n\t if (!validator(value)) {\n\t warn(\n\t 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n\t vm\n\t );\n\t }\n\t }\n\t}", "function assertProp (\n\t prop,\n\t name,\n\t value,\n\t vm,\n\t absent\n\t) {\n\t if (prop.required && absent) {\n\t warn(\n\t 'Missing required prop: \"' + name + '\"',\n\t vm\n\t );\n\t return\n\t }\n\t if (value == null && !prop.required) {\n\t return\n\t }\n\t var type = prop.type;\n\t var valid = !type || type === true;\n\t var expectedTypes = [];\n\t if (type) {\n\t if (!Array.isArray(type)) {\n\t type = [type];\n\t }\n\t for (var i = 0; i < type.length && !valid; i++) {\n\t var assertedType = assertType(value, type[i]);\n\t expectedTypes.push(assertedType.expectedType || '');\n\t valid = assertedType.valid;\n\t }\n\t }\n\t if (!valid) {\n\t warn(\n\t 'Invalid prop: type check failed for prop \"' + name + '\".' +\n\t ' Expected ' + expectedTypes.map(capitalize).join(', ') +\n\t ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\n\t vm\n\t );\n\t return\n\t }\n\t var validator = prop.validator;\n\t if (validator) {\n\t if (!validator(value)) {\n\t warn(\n\t 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n\t vm\n\t );\n\t }\n\t }\n\t}", "function assertProp (\n\t prop,\n\t name,\n\t value,\n\t vm,\n\t absent\n\t) {\n\t if (prop.required && absent) {\n\t warn(\n\t 'Missing required prop: \"' + name + '\"',\n\t vm\n\t );\n\t return\n\t }\n\t if (value == null && !prop.required) {\n\t return\n\t }\n\t var type = prop.type;\n\t var valid = !type || type === true;\n\t var expectedTypes = [];\n\t if (type) {\n\t if (!Array.isArray(type)) {\n\t type = [type];\n\t }\n\t for (var i = 0; i < type.length && !valid; i++) {\n\t var assertedType = assertType(value, type[i]);\n\t expectedTypes.push(assertedType.expectedType || '');\n\t valid = assertedType.valid;\n\t }\n\t }\n\t if (!valid) {\n\t warn(\n\t 'Invalid prop: type check failed for prop \"' + name + '\".' +\n\t ' Expected ' + expectedTypes.map(capitalize).join(', ') +\n\t ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\n\t vm\n\t );\n\t return\n\t }\n\t var validator = prop.validator;\n\t if (validator) {\n\t if (!validator(value)) {\n\t warn(\n\t 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n\t vm\n\t );\n\t }\n\t }\n\t}", "function assertProp (\n\t prop,\n\t name,\n\t value,\n\t vm,\n\t absent\n\t) {\n\t if (prop.required && absent) {\n\t warn(\n\t 'Missing required prop: \"' + name + '\"',\n\t vm\n\t );\n\t return\n\t }\n\t if (value == null && !prop.required) {\n\t return\n\t }\n\t var type = prop.type;\n\t var valid = !type || type === true;\n\t var expectedTypes = [];\n\t if (type) {\n\t if (!Array.isArray(type)) {\n\t type = [type];\n\t }\n\t for (var i = 0; i < type.length && !valid; i++) {\n\t var assertedType = assertType(value, type[i]);\n\t expectedTypes.push(assertedType.expectedType || '');\n\t valid = assertedType.valid;\n\t }\n\t }\n\t if (!valid) {\n\t warn(\n\t 'Invalid prop: type check failed for prop \"' + name + '\".' +\n\t ' Expected ' + expectedTypes.map(capitalize).join(', ') +\n\t ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\n\t vm\n\t );\n\t return\n\t }\n\t var validator = prop.validator;\n\t if (validator) {\n\t if (!validator(value)) {\n\t warn(\n\t 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n\t vm\n\t );\n\t }\n\t }\n\t}", "function assertProp (\n\t prop,\n\t name,\n\t value,\n\t vm,\n\t absent\n\t) {\n\t if (prop.required && absent) {\n\t warn(\n\t 'Missing required prop: \"' + name + '\"',\n\t vm\n\t );\n\t return\n\t }\n\t if (value == null && !prop.required) {\n\t return\n\t }\n\t var type = prop.type;\n\t var valid = !type || type === true;\n\t var expectedTypes = [];\n\t if (type) {\n\t if (!Array.isArray(type)) {\n\t type = [type];\n\t }\n\t for (var i = 0; i < type.length && !valid; i++) {\n\t var assertedType = assertType(value, type[i]);\n\t expectedTypes.push(assertedType.expectedType || '');\n\t valid = assertedType.valid;\n\t }\n\t }\n\t if (!valid) {\n\t warn(\n\t 'Invalid prop: type check failed for prop \"' + name + '\".' +\n\t ' Expected ' + expectedTypes.map(capitalize).join(', ') +\n\t ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\n\t vm\n\t );\n\t return\n\t }\n\t var validator = prop.validator;\n\t if (validator) {\n\t if (!validator(value)) {\n\t warn(\n\t 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n\t vm\n\t );\n\t }\n\t }\n\t}", "function assertProp (\r\n prop,\r\n name,\r\n value,\r\n vm,\r\n absent\r\n) {\r\n if (prop.required && absent) {\r\n warn(\r\n 'Missing required prop: \"' + name + '\"',\r\n vm\r\n );\r\n return\r\n }\r\n if (value == null && !prop.required) {\r\n return\r\n }\r\n var type = prop.type;\r\n var valid = !type || type === true;\r\n var expectedTypes = [];\r\n if (type) {\r\n if (!Array.isArray(type)) {\r\n type = [type];\r\n }\r\n for (var i = 0; i < type.length && !valid; i++) {\r\n var assertedType = assertType(value, type[i]);\r\n expectedTypes.push(assertedType.expectedType || '');\r\n valid = assertedType.valid;\r\n }\r\n }\r\n if (!valid) {\r\n warn(\r\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\r\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\r\n \", got \" + (toRawType(value)) + \".\",\r\n vm\r\n );\r\n return\r\n }\r\n var validator = prop.validator;\r\n if (validator) {\r\n if (!validator(value)) {\r\n warn(\r\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\r\n vm\r\n );\r\n }\r\n }\r\n}", "function assertProp (\n\t prop,\n\t name,\n\t value,\n\t vm,\n\t absent\n\t) {\n\t if (prop.required && absent) {\n\t warn(\n\t 'Missing required prop: \"' + name + '\"',\n\t vm\n\t );\n\t return\n\t }\n\t if (value == null && !prop.required) {\n\t return\n\t }\n\t var type = prop.type;\n\t var valid = !type || type === true;\n\t var expectedTypes = [];\n\t if (type) {\n\t if (!Array.isArray(type)) {\n\t type = [type];\n\t }\n\t for (var i = 0; i < type.length && !valid; i++) {\n\t var assertedType = assertType(value, type[i]);\n\t expectedTypes.push(assertedType.expectedType);\n\t valid = assertedType.valid;\n\t }\n\t }\n\t if (!valid) {\n\t warn(\n\t 'Invalid prop: type check failed for prop \"' + name + '\".' +\n\t ' Expected ' + expectedTypes.map(capitalize).join(', ') +\n\t ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\n\t vm\n\t );\n\t return\n\t }\n\t var validator = prop.validator;\n\t if (validator) {\n\t if (!validator(value)) {\n\t warn(\n\t 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n\t vm\n\t );\n\t }\n\t }\n\t}", "function assertProp (\n\t prop,\n\t name,\n\t value,\n\t vm,\n\t absent\n\t) {\n\t if (prop.required && absent) {\n\t warn(\n\t 'Missing required prop: \"' + name + '\"',\n\t vm\n\t );\n\t return\n\t }\n\t if (value == null && !prop.required) {\n\t return\n\t }\n\t var type = prop.type;\n\t var valid = !type || type === true;\n\t var expectedTypes = [];\n\t if (type) {\n\t if (!Array.isArray(type)) {\n\t type = [type];\n\t }\n\t for (var i = 0; i < type.length && !valid; i++) {\n\t var assertedType = assertType(value, type[i]);\n\t expectedTypes.push(assertedType.expectedType);\n\t valid = assertedType.valid;\n\t }\n\t }\n\t if (!valid) {\n\t warn(\n\t 'Invalid prop: type check failed for prop \"' + name + '\".' +\n\t ' Expected ' + expectedTypes.map(capitalize).join(', ') +\n\t ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\n\t vm\n\t );\n\t return\n\t }\n\t var validator = prop.validator;\n\t if (validator) {\n\t if (!validator(value)) {\n\t warn(\n\t 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n\t vm\n\t );\n\t }\n\t }\n\t}", "function assertProp (\n\t prop,\n\t name,\n\t value,\n\t vm,\n\t absent\n\t) {\n\t if (prop.required && absent) {\n\t warn(\n\t 'Missing required prop: \"' + name + '\"',\n\t vm\n\t )\n\t return\n\t }\n\t if (value == null && !prop.required) {\n\t return\n\t }\n\t var type = prop.type\n\t var valid = !type || type === true\n\t var expectedTypes = []\n\t if (type) {\n\t if (!Array.isArray(type)) {\n\t type = [type]\n\t }\n\t for (var i = 0; i < type.length && !valid; i++) {\n\t var assertedType = assertType(value, type[i])\n\t expectedTypes.push(assertedType.expectedType)\n\t valid = assertedType.valid\n\t }\n\t }\n\t if (!valid) {\n\t warn(\n\t 'Invalid prop: type check failed for prop \"' + name + '\".' +\n\t ' Expected ' + expectedTypes.map(capitalize).join(', ') +\n\t ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\n\t vm\n\t )\n\t return\n\t }\n\t var validator = prop.validator\n\t if (validator) {\n\t if (!validator(value)) {\n\t warn(\n\t 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n\t vm\n\t )\n\t }\n\t }\n\t}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n ) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n \n if (!valid) {\n warn(\n getInvalidTypeMessage(name, value, expectedTypes),\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n }", "function assertProp(prop, name, value, vm, absent) {\n if (prop.required && absent) {\n warn('Missing required prop: \"' + name + '\"', vm);\n return;\n }\n\n if (value == null && !prop.required) {\n return;\n }\n\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n\n if (!valid) {\n warn(getInvalidTypeMessage(name, value, expectedTypes), vm);\n return;\n }\n\n var validator = prop.validator;\n\n if (validator) {\n if (!validator(value)) {\n warn('Invalid prop: custom validator check failed for prop \"' + name + '\".', vm);\n }\n }\n}", "function assertProp(prop, name, value, vm, absent) {\n if (prop.required && absent) {\n warn('Missing required prop: \"' + name + '\"', vm);\n return;\n }\n\n if (value == null && !prop.required) {\n return;\n }\n\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n\n if (!valid) {\n warn(getInvalidTypeMessage(name, value, expectedTypes), vm);\n return;\n }\n\n var validator = prop.validator;\n\n if (validator) {\n if (!validator(value)) {\n warn('Invalid prop: custom validator check failed for prop \"' + name + '\".', vm);\n }\n }\n}", "function assertProp(prop, name, value, vm, absent) {\n if (prop.required && absent) {\n warn('Missing required prop: \"' + name + '\"', vm);\n return;\n }\n\n if (value == null && !prop.required) {\n return;\n }\n\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n\n if (!valid) {\n warn(getInvalidTypeMessage(name, value, expectedTypes), vm);\n return;\n }\n\n var validator = prop.validator;\n\n if (validator) {\n if (!validator(value)) {\n warn('Invalid prop: custom validator check failed for prop \"' + name + '\".', vm);\n }\n }\n}", "function assertProp(prop, name, value, vm, absent) {\n if (prop.required && absent) {\n warn('Missing required prop: \"' + name + '\"', vm);\n return;\n }\n\n if (value == null && !prop.required) {\n return;\n }\n\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n\n if (!valid) {\n warn(getInvalidTypeMessage(name, value, expectedTypes), vm);\n return;\n }\n\n var validator = prop.validator;\n\n if (validator) {\n if (!validator(value)) {\n warn('Invalid prop: custom validator check failed for prop \"' + name + '\".', vm);\n }\n }\n}", "function assertProp (\n\t prop,\n\t name,\n\t value,\n\t vm,\n\t absent\n\t) {\n\t if (prop.required && absent) {\n\t warn(\n\t 'Missing required prop: \"' + name + '\"',\n\t vm\n\t );\n\t return\n\t }\n\t if (value == null && !prop.required) {\n\t return\n\t }\n\t var type = prop.type;\n\t var valid = !type || type === true;\n\t var expectedTypes = [];\n\t if (type) {\n\t if (!Array.isArray(type)) {\n\t type = [type];\n\t }\n\t for (var i = 0; i < type.length && !valid; i++) {\n\t var assertedType = assertType(value, type[i]);\n\t expectedTypes.push(assertedType.expectedType || '');\n\t valid = assertedType.valid;\n\t }\n\t }\n\t if (!valid) {\n\t warn(\n\t \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n\t \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n\t \", got \" + (toRawType(value)) + \".\",\n\t vm\n\t );\n\t return\n\t }\n\t var validator = prop.validator;\n\t if (validator) {\n\t if (!validator(value)) {\n\t warn(\n\t 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n\t vm\n\t );\n\t }\n\t }\n\t}", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n `Invalid prop: type check failed for prop \"${name}\".` +\n ` Expected ${expectedTypes.map(capitalize).join(', ')}` +\n `, got ${toRawType(value)}.`,\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}", "function assertProp(\n prop,\n name,\n value,\n vm,\n absent\n ) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n }", "function assertProp (\n prop,\n name,\n value,\n vm,\n absent\n ) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n\n if (!valid) {\n warn(\n getInvalidTypeMessage(name, value, expectedTypes),\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n }" ]
[ "0.7921342", "0.78770363", "0.78770363", "0.7842237", "0.779355", "0.7789149", "0.7789149", "0.7789149", "0.77335036", "0.77335036", "0.77275956", "0.76917607", "0.76917607", "0.76917607", "0.76917607", "0.76917607", "0.76917607", "0.7668891", "0.7639332", "0.76153845", "0.76153845", "0.76153845", "0.76153845", "0.76153845", "0.76153845", "0.76153845", "0.76153845", "0.76153845", "0.76153845", "0.76153845", "0.76153845", "0.76153845", "0.76153845", "0.76153845", "0.76153845", "0.76153845", "0.76153845", "0.76153845", "0.76153845", "0.76153845", "0.76153845", "0.7612181", "0.7612181", "0.75914806", "0.75914806", "0.75914806", "0.75914806", "0.75914806", "0.75914806", "0.75914806", "0.75914806", "0.75914806", "0.75914806", "0.75914806", "0.75914806", "0.75914806", "0.75914806", "0.75914806", "0.75914806", "0.75914806", "0.75914806", "0.75914806", "0.75914806", "0.75914806", "0.75914806", "0.75914806", "0.75914806", "0.75914806", "0.75914806", "0.75914806", "0.75914806", "0.75914806", "0.75914806", "0.75914806", "0.75914806", "0.75914806", "0.75914806", "0.75914806", "0.75914806", "0.75914806", "0.75914806", "0.75914806", "0.75914806", "0.7565549", "0.7565549", "0.7565549", "0.7565549", "0.7565549", "0.7560321", "0.75547844", "0.75547844", "0.75483125", "0.75467336", "0.7545764", "0.7545764", "0.7545764", "0.7545764", "0.75443596", "0.7538068", "0.7525092", "0.7509325" ]
0.0
-1
Use function string name to check builtin types, because a simple equality check will fail when running across different vms / iframes.
function getType (fn) { var match = fn && fn.toString().match(/^\s*function (\w+)/); return match ? match[1] : '' }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 is_func(func) { return Object.prototype.toString.call(func) == \"[object Function]\"; }", "function func(value) {\r\n return typeof value === RAW_FUNCTION;\r\n }", "function typeEq(name) {\n return function(x) {\n return type (x) === name;\n };\n }", "function isBuiltin(wat, className) {\n return objectToString.call(wat) === `[object ${className}]`;\n}", "function builtinprototypesarenotinstances() {\n try {\n Boolean.prototype.valueOf(); return false;\n } catch(e) {}\n try {\n Number.prototype.valueOf(); return false;\n } catch(e) {}\n try {\n String.prototype.toString(); return false;\n } catch(e) {}\n try {\n RegExp.prototype.source; return false;\n } catch(e) {}\n try {\n Date.prototype.valueOf(); return false;\n } catch(e) {}\n return true;\n}", "function r(e){return\"string\"==typeof e}", "function r(e){return\"string\"==typeof e}", "function isBuiltin(wat, className) {\n return objectToString.call(wat) === `[object ${className}]`;\n }", "function a(t){return typeof Function!==\"undefined\"&&t instanceof Function||Object.prototype.toString.call(t)===\"[object Function]\"}", "function is_func(func) {\n return Object.prototype.toString.call(func) == \"[object Function]\";\n }", "function i(t,e){var n=typeof t[e];return\"function\"==n||!!(\"object\"==n&&t[e])||\"unknown\"==n}", "function t(a){return typeof Function!=\"undefined\"&&a instanceof Function||Object.prototype.toString.call(a)===\"[object Function]\"}", "function isBuiltin(wat, className) {\n\t return objectToString$2.call(wat) === `[object ${className}]`;\n\t}", "function checkFunctions(func1, func2) {\n if (func1.toString() !== func2.toString()) return false;\n return true;\n}", "function isFunction(input){return\"undefined\"!=typeof Function&&input instanceof Function||\"[object Function]\"===Object.prototype.toString.call(input)}", "function r(t){return typeof Function!=\"undefined\"&&t instanceof Function||Object.prototype.toString.call(t)===\"[object Function]\"}", "function i(t){var e=typeof t;return null==t||\"object\"!=e&&\"function\"!=e}", "function equalsFuncOrOperator(instance_var, compare_name) {\n var PRIMITIVES = [\"int\", \"short\", \"long\", \"char\", \"byte\", \"boolean\", \"float\", \"double\", \"void\"]; /*Compare with ==*/\n if( PRIMITIVES.includes(getType(instance_var)) )\n return \" == \" + compare_name;\n return \".equals(\" + compare_name + \")\";\n}", "function e(t){return\"undefined\"!=typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "function e(t){return\"undefined\"!=typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "function function_exists(function_name)\n{\n if (typeof function_name == 'string')\n return (typeof window[function_name] == 'function');\n return (function_name instanceof Function);\n}", "function camIsString(something)\n{\n\treturn typeof(something) === \"string\";\n}", "function validateNamedType(functionName,type,optionName,argument){validateType(functionName,type,optionName+\" option\",argument);}", "function t(e){return\"undefined\"!=typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!=typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!=typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!=typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function isString( arg ) { return typeof arg === \"string\"; }", "function n(e){return typeof Function!==\"undefined\"&&e instanceof Function||Object.prototype.toString.call(e)===\"[object Function]\"}", "function is(a,b){ return (typeof a == b) ? true : false; }", "function string$1(value) {\r\n return typeof value === 'string';\r\n }", "function t(e) {\n return \"undefined\" !== typeof Function && e instanceof Function || \"[object Function]\" === Object.prototype.toString.call(e)\n }", "function e(t){return\"undefined\"!==typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "function e(t){return\"undefined\"!==typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "function e(t){return\"undefined\"!==typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "function e(t){return\"undefined\"!==typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "function e(t){return\"undefined\"!==typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "function e(t){return\"undefined\"!==typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "function e(t){return\"undefined\"!==typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "function e(t){return\"undefined\"!==typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "function e(t){return\"undefined\"!==typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "function e(t){return\"undefined\"!==typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "function e(t){return\"undefined\"!==typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "function e(t){return\"undefined\"!==typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "function e(t){return\"undefined\"!==typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "function e(t){return\"undefined\"!==typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "function e(t){return\"undefined\"!==typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "function e(t){return\"undefined\"!==typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "function e(t){return\"undefined\"!==typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "function e(t){return\"undefined\"!==typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "function a(e){return typeof Function!==\"undefined\"&&e instanceof Function||Object.prototype.toString.call(e)===\"[object Function]\"}", "function a(e){return typeof Function!==\"undefined\"&&e instanceof Function||Object.prototype.toString.call(e)===\"[object Function]\"}", "function sc_typeof( x ) {\n return typeof x;\n}", "function a(e){return\"function\"===typeof e}", "function a(e){return\"function\"===typeof e}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}" ]
[ "0.70350987", "0.63953584", "0.6314871", "0.6307279", "0.6161832", "0.6148997", "0.61396724", "0.61396724", "0.6138711", "0.61248386", "0.60916066", "0.60802835", "0.60668826", "0.60643834", "0.60479796", "0.6047623", "0.5982038", "0.5961509", "0.5950394", "0.59033835", "0.59033835", "0.59017086", "0.5893099", "0.58836514", "0.5856259", "0.5856259", "0.5856259", "0.5856259", "0.5855002", "0.5854358", "0.5852101", "0.58476174", "0.58430994", "0.584065", "0.584065", "0.584065", "0.584065", "0.584065", "0.584065", "0.584065", "0.584065", "0.584065", "0.584065", "0.584065", "0.584065", "0.584065", "0.584065", "0.584065", "0.584065", "0.584065", "0.584065", "0.5840203", "0.5840203", "0.5832772", "0.5798921", "0.5798921", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191", "0.5798191" ]
0.0
-1
Recursively traverse an object to evoke all converted getters, so that every nested property inside the object is collected as a "deep" dependency.
function traverse (val) { _traverse(val, seenObjects); seenObjects.clear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function traverse(obj) {\n _lodash2.default.each(obj, function (val, indexOrProp) {\n // Move deeper into the object\n var next = obj[indexOrProp];\n\n // If we can go no further, then quit\n if (MongoObject.isBasicObject(next)) {\n traverse(next);\n } else if (Array.isArray(next)) {\n obj[indexOrProp] = _lodash2.default.without(next, REMOVED_MARKER);\n traverse(obj[indexOrProp]);\n }\n });\n }", "function iterateOverObjectRecursively(obj, cb, _originalObj, _path) {\n\t_originalObj = _originalObj || obj || {};\n\t_path = _path || [];\n\n\t// http://facebook.github.io/immutable-js/docs/#/Map/isMap\n\tlet isMap = Immutable.Map.isMap(obj);\n\n\tlet iteratingFunc = isMap ? Immutable.Map.prototype.mapKeys.bind(obj) : Array.prototype.forEach.bind(Object.keys(obj));\n\titeratingFunc((key) => {\n\t\tlet value = isMap ? obj.get(key) : obj[key];\n\t\tlet currentPath = _path.concat(key);\n\n\t\tcb(currentPath, value);\n\n\t\tif(typeof value === 'object' && value !== _originalObj) {\n\t\t\titerateOverObjectRecursively(value, cb, _originalObj, currentPath);\n\t\t}\n\t});\n}", "traverseDown (callback, object, property, parent) {\n\t\t\tif (Array.isArray(object)) {\n\t\t\t\tobject.forEach((item, i) => _.traverse(callback, item, i, object));\n\t\t\t}\n\t\t\telse if (Mavo.isPlainObject(object)) {\n\t\t\t\tfor (var prop in object) {\n\t\t\t\t\t_.traverse(callback, object[prop], prop, object);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function traverse(object, visitor) {\n var key, child;\n\n if (visitor.call(null, object) === false) {\n return;\n }\n for (key in object) {\n if (object.hasOwnProperty(key)) {\n child = object[key];\n if (typeof child === 'object' && child !== null) {\n traverse(child, visitor);\n }\n }\n }\n}", "function applyObjectDecorators(path, state) {\n var hasMethodDecorators = path.node.properties.some(function (node) {\n return (node.decorators || []).length > 0;\n });\n if (!hasMethodDecorators) return;\n return applyTargetDecorators(path, state, path.node.properties);\n }", "function applyObjectDecorators(path, state) {\n if (!hasMethodDecorators(path.node.properties)) return;\n\n return applyTargetDecorators(path, state, path.node.properties);\n}", "function iterateOverChildren(obj)\n\t\t{\n\t\t\tfor(var key in obj)\n\t\t\t{\n\t\t\t\tvar value = obj[key];\n\n\t\t\t\tif(value instanceof Object)\n\t\t\t\t{\n\t\t\t\t\titerateOverChildren(value);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttranslationList.push({\n\t\t\t\t\t\tobject: obj,\n\t\t\t\t\t\tproperty: key\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function traverse(object, visitor, master) {\r\n var key, child, parent, path;\r\n\r\n parent = (typeof master === 'undefined') ? [] : master;\r\n\r\n if (visitor.call(null, object, parent) === false) {\r\n return;\r\n }\r\n for (key in object) {\r\n if (object.hasOwnProperty(key)) {\r\n child = object[key];\r\n path = [ object ];\r\n path.push(parent);\r\n if (typeof child === 'object' && child !== null) {\r\n traverse(child, visitor, path);\r\n }\r\n }\r\n }\r\n }", "function unwrapFieldNames(obj, path, fields) {\n if (!obj.properties) {\n return;\n }\n for (const p in obj.properties) {\n const child = obj.properties[p];\n if (child.properties) {\n path.push(p);\n unwrapFieldNames(child, path, fields);\n path.pop();\n } else {\n let parentName = '';\n for (const i in path) {\n parentName += path[i];\n parentName += '.';\n }\n // Need to clone the path array here:\n fields.push({\n 'name': parentName + p,\n 'path': path.slice(0),\n 'leafName': p\n });\n if (child.fields) {\n for (const mfield in child.fields) {\n fields.push({\n 'name': parentName + p + '.' + mfield,\n 'path': path.slice(0),\n 'leafName': p\n });\n\n }\n }\n }\n }\n }", "function flatten_recursive(obj)\n{\n\tif (typeof obj === 'function')\n\t\treturn undefined;\n\n\tif (typeof obj !== 'object')\n\t\treturn obj;\n\t\n\tif (Array.isArray(obj))\n\t\treturn obj.map(flatten_recursive);\n\t\n\tlet result = Object.create(null);\n\n\tfor(var key in obj)\n\t\tresult[key] = flatten_recursive(obj[key]);\n\n\treturn result;\n}", "function applyObjectDecorators(path, state) {\n\t var hasMethodDecorators = path.node.properties.some(function (node) {\n\t return (node.decorators || []).length > 0;\n\t });\n\n\t if (!hasMethodDecorators) return;\n\n\t return applyTargetDecorators(path, state, path.node.properties);\n\t }", "function applyObjectDecorators(path, state) {\n\t var hasMethodDecorators = path.node.properties.some(function (node) {\n\t return (node.decorators || []).length > 0;\n\t });\n\n\t if (!hasMethodDecorators) return;\n\n\t return applyTargetDecorators(path, state, path.node.properties);\n\t }", "function walk(obj, callback, path) {\n\n\tpath = path ? path+\".\" : \"\";\n\n\tObject.keys(obj).forEach(function(key) {\n\t\tvar value = obj[key];\n\t\tvar newPath = path+key;\n\t\tif(value instanceof Object) {\n\t\t\twalk(value, callback, newPath);\n\t\t}\n\t\telse {\n\t\t\tcallback(value, newPath);\n\t\t}\n\t});\n}", "function flattenProp( props, obj, key, prefix ) {\n\n var val, type, flattenedProp;\n val = obj[ key ];\n type = LAY.$type( val );\n if ( type === \"array\" && key !== \"input\" ) {\n for ( var i = 0, len = val.length; i < len; i++ ) {\n flattenedProp = prefix + ( i + 1 );\n flattenProp( props, val, i, flattenedProp );\n }\n obj[ key ] = undefined;\n\n } else if ( type === \"object\" ) {\n\n for ( var subKey in val ) {\n\n flattenedProp = prefix + LAY.$capitalize( subKey );\n flattenProp( props, val, subKey, flattenedProp );\n\n obj[ key ] = undefined;\n }\n\n } else {\n\n if ( LAY.$checkIsValidUtils.checkIsPropAttrExpandable( prefix ) ) {\n checkAndThrowErrorAttrAsTake( prefix, val );\n }\n\n props[ prefix ] = val;\n\n }\n }", "function _processKeys(obj, processer, depth) {\n if (depth === 0 || !Util.isObject(obj)) {\n return obj;\n }\n\n let result = {};\n let keys = Object.keys(obj);\n\n for (let i = 0; i < keys.length; i++) {\n result[processer(keys[i])] = _processKeys(obj[keys[i]], processer, depth - 1);\n }\n\n return result;\n}", "function deepMap(obj) {\n return _.deepMapValues(obj, function (value, path) {\n return value;\n });\n}", "function mergeAndedSelectorsNested(obj) {\n for (var prop in obj) {\n if (Array.isArray(obj)) {\n for (var i in obj) {\n if (obj[i]['$and']) {\n obj[i] = mergeAndedSelectors(obj[i]['$and']);\n }\n }\n }\n var value = obj[prop];\n if (typeof value === 'object') {\n mergeAndedSelectorsNested(value); // <- recursive call\n }\n }\n return obj;\n}", "function traverse(object, handler) {\n // set default handler to an identity function\n handler = handler || _.identity;\n\n if (_.isObject(object) || _.isArray(object)) {\n _.each(object, function(value, key, list) {\n list[key] = traverseRecursive(value, key, list, handler);\n });\n return object;\n } else {\n // jsonOb is a number or string\n return handler(object);\n }\n }", "function traverse(object, ancestors, visitor) {\n var key, child, tempList;\n\n visitor.call(null, object);\n for (key in object) {\n if (object.hasOwnProperty(key)) {\n child = object[key];\n if (typeof child === 'object' && child !== null) {\n tempList = ancestors.concat(object.type);\n traverse(child, tempList, visitor);\n // call checkStructure at every leaf\n } else {\n checkStructure(ancestors);\n }\n }\n }\n }", "get (obj, key) {\n let value = obj[key]\n\n // functions should be bound to parent\n if (typeof value === 'function') {\n return value.bind(wrapped)\n }\n\n // don't recurse if not object\n if (!isObject(value)) {\n return value\n }\n\n // convert array bases to actual array\n if ('__MERK_ARRAY__' in value) {\n let base = value\n value = new Array(value.length)\n Object.assign(value, base)\n delete value.__MERK_ARRAY__\n }\n\n // if value is object, recursively wrap\n let childPath = path.concat(key)\n return wrap(value, onMutate, childPath)\n }", "function iterate(obj) {\n // watch for objects we've already iterated so we won't end in endless cycle\n // for cases like var foo = {}; foo.bar = foo; iterate(foo);\n var walked = [];\n var stack = [{obj: obj, stack: ''}];\n while (stack.length > 0) {\n var item = stack.pop();\n var obj = item.obj;\n for (var property in obj) {\n if (obj.hasOwnProperty(property)) {\n if (typeof obj[property] == \"object\") {\n // check if we haven't iterated through the reference yet\n var alreadyFound = false;\n for (var i = 0; i < walked.length; i++) {\n if (walked[i] === obj[property]) {\n alreadyFound = true;\n break;\n }\n }\n // new object reference\n if (!alreadyFound) {\n walked.push(obj[property]);\n stack.push({obj: obj[property], stack: item.stack + '.' + property});\n }\n }\n else {\n console.log(item.stack + '.' + property + \"=\" + obj[property]);\n }\n }\n }\n }\n }", "function stripProps(obj) {\n for (var prop in obj) {\n if (obj.hasOwnProperty(prop)) {\n if (\n // Strip leading $ marks, from angular\n prop.indexOf('$')===0 ||\n // Strip leading underscores, for convenience attributes\n prop.indexOf('_')===0 ||\n // Strip trailing underscores, for instance-prototype binding\n prop.indexOf('_')===prop.length-1) {\n delete(obj[prop]);\n }\n // Recursion: All the items in an array\n else if (Array.isArray(obj[prop])) {\n for (var i in obj[prop]) {\n stripProps(obj[prop][i]);\n }\n }\n // Recursion: All the properties of an object\n else if (typeof(obj[prop])==='object') {\n stripProps(obj[prop]);\n }\n }\n }\n }", "function recursiveGetProperty(obj, lookup, callback)\n\t\t\t\t{\n\t\t\t\t\tfor (property in obj)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (property == lookup) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcallback(obj[property]);\n\t\t\t\t\t\t} else if (obj[property] instanceof Object) {\n\t\t\t\t\t\t\trecursiveGetProperty(obj[property], lookup, callback);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "function recursiveGetProperty(obj, lookup, callback)\n\t\t\t\t{\n\t\t\t\t\tfor (property in obj)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (property == lookup) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcallback(obj[property]);\n\t\t\t\t\t\t} else if (obj[property] instanceof Object) {\n\t\t\t\t\t\t\trecursiveGetProperty(obj[property], lookup, callback);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "function walk(obj) {\n const keys = Object.keys(obj)\n for (let i = 0; i < keys.length; i++) {\n defineReactive(obj, keys[i], obj[keys[i]])\n }\n}", "function dotTraverseObject(object, path)\n{\n var chunks = path.split(/\\./);\n var cur = object;\n for (var i = 0; chunks.length > i; i++)\n {\n if (cur == null) throw new Error(\"Complete object path does not exist\");\n cur = cur[chunks[i]];\n }\n return cur;\n}", "function traverse (obj, callback, trail) {\n trail = trail || [];\n\n Object.keys(obj).forEach(function (key) {\n let value = obj[key]\n , undef = typeof value === \"undefined\" || value === null\n ;\n\n if (!undef && Object.getPrototypeOf(value) === Object.prototype)\n traverse(value, callback, trail.concat(key));\n else\n callback.call(obj, key, value, trail);\n });\n}", "function collectOwnMethods(object) {\n var methods = [];\n\n walk(object, collectMethod.bind(null, methods, object));\n\n return methods;\n }", "traverse(obj, path) {\n if (path == null) return undefined;\n let pelems = path.split('.');\n let res = obj;\n pelems.forEach(function (item) {\n res = item === 'this' ? obj : res[item];\n });\n return res;\n }", "function flattenTo(obj, result, prefix, level) {\n\t forOwn(obj, function (value, key) {\n\t var nestedPrefix = prefix ? prefix + '.' + key : key;\n\n\t if (level !== 0 && isPlainObject(value)) {\n\t flattenTo(value, result, nestedPrefix, level - 1);\n\t } else {\n\t result[nestedPrefix] = value;\n\t }\n\t });\n\n\t return result;\n\t }", "function _getter(obj, path) {\n var keys = path.split('.');\n var length = keys.length;\n var target = obj;\n\n for (var i = 0; i < length - 1; i++) {\n target[keys[i]] = _isObject(target[keys[i]]) ? target[keys[i]] : {};\n target = target[keys[i]];\n }\n\n return {\n target: target,\n lastKey: keys[length - 1]\n };\n }", "static flatten(obj, path, flattened) {\n if (!flattened) flattened = [];\n if (!path) path = \"\";\n\n // convert to a dotted path\n let keys = Object.keys(obj);\n let is_array = Array.isArray(obj);\n for (let i = 0; i < keys.length; i++) {\n let value = obj[keys[i]];\n let new_path;\n\n if (is_array) {\n new_path = path + (path ? \"[\" + keys[i] + \"]\" : \"\");\n } else {\n new_path = path + (path ? \".\" : \"\") + keys[i];\n }\n\n if (value && (typeof value === 'object')) {\n this.flatten(value, new_path, flattened);\n continue;\n }\n\n value = JSON.stringify(value);\n if (!value) value = JSON.stringify(null);\n flattened.push({ key: new_path, value: value });\n }\n\n return flattened;\n }", "static _coalesceConvert_doRecurse (obj, fn) {\n\t\tif (typeof obj !== \"object\") throw new TypeError(`Non-object ${obj} passed to object handler!`);\n\n\t\tif (obj instanceof Array) {\n\t\t\tfn(obj);\n\n\t\t\tobj.forEach(it => {\n\t\t\t\tif (typeof it !== \"object\") return;\n\t\t\t\tthis._coalesceConvert_doRecurse(it, fn)\n\t\t\t});\n\t\t} else {\n\t\t\tif (obj.type) {\n\t\t\t\tconst childMeta = Renderer.ENTRIES_WITH_CHILDREN.find(it => it.type === obj.type && obj[it.key]);\n\t\t\t\tif (childMeta) {\n\t\t\t\t\tthis._coalesceConvert_doRecurse(obj[childMeta.key], fn);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function walkObject()\n\t\t{\n\t\t\tfunction process(value, index, depth)\n\t\t\t{\n\t\t\t\ttrace(indent(depth) + '[' +index+ '] ' + value);\n\t\t\t}\n\n\t\t\tUtils.walk(arr, process);\n\t\t\tUtils.walk(obj, process);\n\t\t}", "function collectOwnMethods(object) {\n var methods = [];\n\n walk(object, collectMethod.bind(null, methods, object));\n\n return methods;\n}", "function collectOwnMethods(object) {\n var methods = [];\n\n walk(object, collectMethod.bind(null, methods, object));\n\n return methods;\n}", "function collectOwnMethods(object) {\n var methods = [];\n\n walk(object, collectMethod.bind(null, methods, object));\n\n return methods;\n}", "function collectOwnMethods(object) {\n var methods = [];\n\n walk(object, collectMethod.bind(null, methods, object));\n\n return methods;\n}", "function collectOwnMethods(object) {\n var methods = [];\n\n walk(object, collectMethod.bind(null, methods, object));\n\n return methods;\n}", "function collectOwnMethods(object) {\n var methods = [];\n\n walk(object, collectMethod.bind(null, methods, object));\n\n return methods;\n}", "function collectOwnMethods(object) {\n var methods = [];\n\n walk(object, collectMethod.bind(null, methods, object));\n\n return methods;\n}", "function getOwnPropertyDescriptors(object) {\n var result = {};\n\n Object.getOwnPropertyNames(object).forEach(function(key) {\n result[key] = Object.getOwnPropertyDescriptor(object, key);\n // Assume these are schema paths, ignore them re: #5470\n if (result[key].get) {\n delete result[key];\n return;\n }\n result[key].enumerable = ['isNew', '$__', 'errors', '_doc'].indexOf(key) === -1;\n });\n\n return result;\n}", "function walk(key, value, depth, memo) {\r\n if (depth === void 0) {\r\n depth = +Infinity;\r\n }\r\n if (memo === void 0) {\r\n memo = new _memo__WEBPACK_IMPORTED_MODULE_1__[\"Memo\"]();\r\n }\r\n // If we reach the maximum depth, serialize whatever has left\r\n if (depth === 0) {\r\n return serializeValue(value);\r\n }\r\n // If value implements `toJSON` method, call it and return early\r\n // tslint:disable:no-unsafe-any\r\n if (value !== null && value !== undefined && typeof value.toJSON === 'function') {\r\n return value.toJSON();\r\n }\r\n // tslint:enable:no-unsafe-any\r\n // If normalized value is a primitive, there are no branches left to walk, so we can just bail out, as theres no point in going down that branch any further\r\n var normalized = normalizeValue(value, key);\r\n if (Object(_is__WEBPACK_IMPORTED_MODULE_0__[\"isPrimitive\"])(normalized)) {\r\n return normalized;\r\n }\r\n // Create source that we will use for next itterations, either objectified error object (Error type with extracted keys:value pairs) or the input itself\r\n var source = Object(_is__WEBPACK_IMPORTED_MODULE_0__[\"isError\"])(value) ? objectifyError(value) : value;\r\n // Create an accumulator that will act as a parent for all future itterations of that branch\r\n var acc = Array.isArray(value) ? [] : {};\r\n // If we already walked that branch, bail out, as it's circular reference\r\n if (memo.memoize(value)) {\r\n return '[Circular ~]';\r\n }\r\n // Walk all keys of the source\r\n for (var innerKey in source) {\r\n // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.\r\n if (!Object.prototype.hasOwnProperty.call(source, innerKey)) {\r\n continue;\r\n }\r\n // Recursively walk through all the child nodes\r\n acc[innerKey] = walk(innerKey, source[innerKey], depth - 1, memo);\r\n }\r\n // Once walked through all the branches, remove the parent from memo storage\r\n memo.unmemoize(value);\r\n // Return accumulated values\r\n return acc;\r\n}", "function objectToFields(obj) {\n return Object.keys(obj).map((key) => {\n const value = obj[key];\n if (value !== null && typeof value === 'object' && !value.$reql_type$) {\n return objectToFields(value).map((subkeys) => [key].concat(subkeys));\n } else {\n return [key];\n }\n });\n}", "function deep_property(keys){\n return chained(_.map(keys, property));\n }", "function _flatten(iter, path) {\n var properties = iter.properties;\n if (properties) {\n var keys = Object.keys(properties);\n var propPath = path;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var property = properties[key];\n var newProperty = {\n value: property.value,\n cid: property.cid || cid\n };\n if (property.deleted !== undefined) {\n newProperty.deleted = property.deleted;\n }\n if (property.type !== undefined) {\n newProperty.type = property.type;\n }\n flatData[propPath + key] = newProperty;\n }\n }\n var children = iter.children;\n if (children) {\n var keys = Object.keys(children);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var child = children[key];\n if (child) {\n _flatten(child, path + key + '/');\n }\n }\n }\n }", "function getOwnPropertyDescriptors(object) {\n const result = {};\n\n Object.getOwnPropertyNames(object).forEach(function(key) {\n result[key] = Object.getOwnPropertyDescriptor(object, key);\n // Assume these are schema paths, ignore them re: #5470\n if (result[key].get) {\n delete result[key];\n return;\n }\n result[key].enumerable = ['isNew', '$__', 'errors', '_doc', '$locals'].indexOf(key) === -1;\n });\n\n return result;\n}", "function getOwnPropertyDescriptors(object) {\n const result = {};\n\n Object.getOwnPropertyNames(object).forEach(function(key) {\n result[key] = Object.getOwnPropertyDescriptor(object, key);\n // Assume these are schema paths, ignore them re: #5470\n if (result[key].get) {\n delete result[key];\n return;\n }\n result[key].enumerable = ['isNew', '$__', 'errors', '_doc', '$locals'].indexOf(key) === -1;\n });\n\n return result;\n}", "function getOwnPropertyDescriptors(object) {\n const result = {};\n\n Object.getOwnPropertyNames(object).forEach(function(key) {\n result[key] = Object.getOwnPropertyDescriptor(object, key);\n // Assume these are schema paths, ignore them re: #5470\n if (result[key].get) {\n delete result[key];\n return;\n }\n result[key].enumerable = ['isNew', '$__', 'errors', '_doc'].indexOf(key) === -1;\n });\n\n return result;\n}", "function collectProperties (schemaObj, props) {\n if (schemaObj.properties) {\n for (var property in schemaObj.properties) {\n if (schemaObj.properties.hasOwnProperty(property)) {\n props[property] = schemaObj.properties[property];\n }\n }\n }\n if (schemaObj.allOf) {\n schemaObj.allOf.forEach(function (parent) {\n collectProperties(parent, props);\n });\n }\n }", "function walk(key, value, depth, memo) {\n if (depth === void 0) { depth = +Infinity; }\n if (memo === void 0) { memo = new _memo__WEBPACK_IMPORTED_MODULE_3__[/* Memo */ \"a\"](); }\n // If we reach the maximum depth, serialize whatever has left\n if (depth === 0) {\n return serializeValue(value);\n }\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n // If value implements `toJSON` method, call it and return early\n if (value !== null && value !== undefined && typeof value.toJSON === 'function') {\n return value.toJSON();\n }\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n // If normalized value is a primitive, there are no branches left to walk, so we can just bail out, as theres no point in going down that branch any further\n var normalized = normalizeValue(value, key);\n if (Object(_is__WEBPACK_IMPORTED_MODULE_2__[/* isPrimitive */ \"i\"])(normalized)) {\n return normalized;\n }\n // Create source that we will use for next itterations, either objectified error object (Error type with extracted keys:value pairs) or the input itself\n var source = getWalkSource(value);\n // Create an accumulator that will act as a parent for all future itterations of that branch\n var acc = Array.isArray(value) ? [] : {};\n // If we already walked that branch, bail out, as it's circular reference\n if (memo.memoize(value)) {\n return '[Circular ~]';\n }\n // Walk all keys of the source\n for (var innerKey in source) {\n // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.\n if (!Object.prototype.hasOwnProperty.call(source, innerKey)) {\n continue;\n }\n // Recursively walk through all the child nodes\n acc[innerKey] = walk(innerKey, source[innerKey], depth - 1, memo);\n }\n // Once walked through all the branches, remove the parent from memo storage\n memo.unmemoize(value);\n // Return accumulated values\n return acc;\n}", "function deepMap(obj) {\n console.log(obj, Object.keys(obj.properties));\n return Object.keys(obj.properties)\n .map(prop => {\n if (obj.properties[prop].type === 'object') {\n const newV = {};\n newV[prop] = deepMap(obj.properties[prop]);\n return newV;\n } else {\n const v = {};\n v[prop] = obj.properties[prop].default;\n return v;\n }\n })\n .reduce((acc, v) => {\n return Object.assign(acc, v);\n }, {});\n }", "function walk(key, value, depth, memo) {\n if (depth === void 0) { depth = +Infinity; }\n if (memo === void 0) { memo = new _memo__WEBPACK_IMPORTED_MODULE_2__[\"Memo\"](); }\n // If we reach the maximum depth, serialize whatever has left\n if (depth === 0) {\n return serializeValue(value);\n }\n // If value implements `toJSON` method, call it and return early\n // tslint:disable:no-unsafe-any\n if (value !== null && value !== undefined && typeof value.toJSON === 'function') {\n return value.toJSON();\n }\n // tslint:enable:no-unsafe-any\n // If normalized value is a primitive, there are no branches left to walk, so we can just bail out, as theres no point in going down that branch any further\n var normalized = normalizeValue(value, key);\n if (Object(_is__WEBPACK_IMPORTED_MODULE_1__[\"isPrimitive\"])(normalized)) {\n return normalized;\n }\n // Create source that we will use for next itterations, either objectified error object (Error type with extracted keys:value pairs) or the input itself\n var source = getWalkSource(value);\n // Create an accumulator that will act as a parent for all future itterations of that branch\n var acc = Array.isArray(value) ? [] : {};\n // If we already walked that branch, bail out, as it's circular reference\n if (memo.memoize(value)) {\n return '[Circular ~]';\n }\n // Walk all keys of the source\n for (var innerKey in source) {\n // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.\n if (!Object.prototype.hasOwnProperty.call(source, innerKey)) {\n continue;\n }\n // Recursively walk through all the child nodes\n acc[innerKey] = walk(innerKey, source[innerKey], depth - 1, memo);\n }\n // Once walked through all the branches, remove the parent from memo storage\n memo.unmemoize(value);\n // Return accumulated values\n return acc;\n}", "function _flattenObject(obj) {\n for (var key in obj) {\n if (obj.hasOwnProperty(key) && typeof obj[key] == 'object') {\n var subObj = obj[key];\n _flattenObject(subObj);\n for (var k in subObj) {\n if (subObj.hasOwnProperty(k)) {\n obj[key + '_' + k] = subObj[k];\n }\n }\n delete obj[key];\n }\n }\n }", "function getDepsRecursive(field, visited = []) {\n\tif (visited.indexOf(field) !== -1) return\n\n\tvisited.push(field)\n\tfor (let dep of field.directDependencies) getDepsRecursive(dep, visited)\n\n\treturn visited\n}", "function filterSchemaProps(obj, level) {\n level++;\n if (Array.isArray(obj)) {\n return obj.map(function(each) { return filterSchemaProps(each, level); });\n }\n else if (obj == null || typeof obj != 'object') {\n return obj;\n }\n else {\n Object.keys(obj).forEach(function(key) {\n obj[key] = (level == 1 || key != \"$schema\") ?\n filterSchemaProps(obj[key], level) : undefined;\n });\n return obj;\n }\n}", "function multiple (fn) {\n return function (obj, path, val, options) {\n normalize = options && isFunction(options.normalizer) ? options.normalizer : defaultNormalize;\n path = normalize(path);\n\n var key;\n var finished = false;\n\n while (!finished) loop();\n\n function loop() {\n for (key in obj) {\n var normalizedKey = normalize(key);\n if (0 === path.indexOf(normalizedKey)) {\n var temp = path.substr(normalizedKey.length);\n if (temp.charAt(0) === '.' || temp.length === 0) {\n path = temp.substr(1);\n var child = obj[key];\n\n // we're at the end and there is nothing.\n if (null == child) {\n finished = true;\n return;\n }\n\n // we're at the end and there is something.\n if (!path.length) {\n finished = true;\n return;\n }\n\n // step into child\n obj = child;\n\n // but we're done here\n return;\n }\n }\n }\n\n key = undefined;\n // if we found no matching properties\n // on the current object, there's no match.\n finished = true;\n }\n\n if (!key) return;\n if (null == obj) return obj;\n\n // the `obj` and `key` is one above the leaf object and key, so\n // start object: { a: { 'b.c': 10 } }\n // end object: { 'b.c': 10 }\n // end key: 'b.c'\n // this way, you can do `obj[key]` and get `10`.\n return fn(obj, key, val);\n };\n}", "function multiple (fn) {\n return function (obj, path, val, options) {\n normalize = options && isFunction(options.normalizer) ? options.normalizer : defaultNormalize;\n path = normalize(path);\n\n var key;\n var finished = false;\n\n while (!finished) loop();\n\n function loop() {\n for (key in obj) {\n var normalizedKey = normalize(key);\n if (0 === path.indexOf(normalizedKey)) {\n var temp = path.substr(normalizedKey.length);\n if (temp.charAt(0) === '.' || temp.length === 0) {\n path = temp.substr(1);\n var child = obj[key];\n\n // we're at the end and there is nothing.\n if (null == child) {\n finished = true;\n return;\n }\n\n // we're at the end and there is something.\n if (!path.length) {\n finished = true;\n return;\n }\n\n // step into child\n obj = child;\n\n // but we're done here\n return;\n }\n }\n }\n\n key = undefined;\n // if we found no matching properties\n // on the current object, there's no match.\n finished = true;\n }\n\n if (!key) return;\n if (null == obj) return obj;\n\n // the `obj` and `key` is one above the leaf object and key, so\n // start object: { a: { 'b.c': 10 } }\n // end object: { 'b.c': 10 }\n // end key: 'b.c'\n // this way, you can do `obj[key]` and get `10`.\n return fn(obj, key, val);\n };\n}", "function breadcrumb_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }", "function recursiveConvert(object,trace) {\n trace = trace ? (trace + '.') : '';\n Object.keys(object).map(i => {\n var thisTrace = trace + i\n if('label' in object[i]) {\n object[i] = new Quantifiable(object[i])\n flatKeys.push(thisTrace)\n return true\n }\n\n if(typeof object[i] == 'object') return recursiveConvert(object[i],thisTrace)\n })\n}", "function object_traverse(callback, obj) {\n\n\t// If the callback returns false, return.\n\tvar cret = callback(obj);\n\tif (cret !== undefined) {\n\t\treturn cret;\n\t}\n\n\t// Traverse properties\n\t// TODO: Handle non-enumerable properties, etc\n\tvar p;\n\tfor (p in obj) {\n\t\tif (typeof obj[p] === 'object') {\n\t\t\tvar ret = object_traverse(callback, obj[p]);\n\t\t\tif (ret !== undefined) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Explicitly return nothing\n\treturn undefined;\n}", "function nestedPath(props, accessorProp) {\n return function (object) {\n var e_3, _a;\n\n var result = object;\n\n try {\n for (var props_2 = __values(props), props_2_1 = props_2.next(); !props_2_1.done; props_2_1 = props_2.next()) {\n var prop = props_2_1.value;\n result = result[accessorProp][prop];\n }\n } catch (e_3_1) {\n e_3 = {\n error: e_3_1\n };\n } finally {\n try {\n if (props_2_1 && !props_2_1.done && (_a = props_2.return)) _a.call(props_2);\n } finally {\n if (e_3) throw e_3.error;\n }\n }\n\n return result;\n };\n }", "function lookdeep(obj) {\n var A = [], tem;\n for (var p in obj) {\n if (obj.hasOwnProperty(p)) {\n tem = obj[p];\n if (tem && typeof tem == 'object') {\n var value = arguments.callee(tem);\n A[A.length] = p + ':{ ' + value.join(', ') + '}';\n }\n else {\n // Execute function constant\n A[A.length] = [p + ':' + tem().toString()];\n }\n }\n }\n return A;\n}", "function recursiveFn(source, target, key) {\n if (isArray(source) || isObject$1(source)) {\n target = isPrimitive(target) ? isObject$1(source) ? {} : [] : target;\n for (var _key in source) {\n // $FlowFixMe: support computed key here\n setter(target, _key, recursiveFn(source[_key], target[_key], _key));\n // target[key] = recursiveFn(source[key], target[key], key);\n }\n return target;\n }\n return fn(source, target, key);\n }", "function Enumerate(obj) {\n var e = [];\n if (Object(obj) !== obj) return e;\n var visited = new Set;\n while (obj !== null) {\n Object.getOwnPropertyNames(obj).forEach(function(name) {\n if (!visited.has(name)) {\n var desc = Object.getOwnPropertyDescriptor(obj, name);\n if (desc) {\n visited.add(name);\n if (desc.enumerable) e.push(name);\n }\n }\n });\n obj = Object.getPrototypeOf(obj);\n }\n return e[$$iterator]();\n }", "function walk(key, value, depth, memo) {\n if (depth === void 0) { depth = +Infinity; }\n if (memo === void 0) { memo = new memo_1.Memo(); }\n // If we reach the maximum depth, serialize whatever has left\n if (depth === 0) {\n return serializeValue(value);\n }\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n // If value implements `toJSON` method, call it and return early\n if (value !== null && value !== undefined && typeof value.toJSON === 'function') {\n return value.toJSON();\n }\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n // If normalized value is a primitive, there are no branches left to walk, so we can just bail out, as theres no point in going down that branch any further\n var normalized = normalizeValue(value, key);\n if (is_1.isPrimitive(normalized)) {\n return normalized;\n }\n // Create source that we will use for next itterations, either objectified error object (Error type with extracted keys:value pairs) or the input itself\n var source = getWalkSource(value);\n // Create an accumulator that will act as a parent for all future itterations of that branch\n var acc = Array.isArray(value) ? [] : {};\n // If we already walked that branch, bail out, as it's circular reference\n if (memo.memoize(value)) {\n return '[Circular ~]';\n }\n // Walk all keys of the source\n for (var innerKey in source) {\n // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.\n if (!Object.prototype.hasOwnProperty.call(source, innerKey)) {\n continue;\n }\n // Recursively walk through all the child nodes\n acc[innerKey] = walk(innerKey, source[innerKey], depth - 1, memo);\n }\n // Once walked through all the branches, remove the parent from memo storage\n memo.unmemoize(value);\n // Return accumulated values\n return acc;\n}", "function nestedPath(props, accessorProp) {\n return function (object) {\n var e_3, _a;\n\n var result = object;\n\n try {\n for (var props_2 = __values$1(props), props_2_1 = props_2.next(); !props_2_1.done; props_2_1 = props_2.next()) {\n var prop = props_2_1.value;\n result = result[accessorProp][prop];\n }\n } catch (e_3_1) {\n e_3 = {\n error: e_3_1\n };\n } finally {\n try {\n if (props_2_1 && !props_2_1.done && (_a = props_2.return)) _a.call(props_2);\n } finally {\n if (e_3) throw e_3.error;\n }\n }\n\n return result;\n };\n}", "function deepUnfilterMethodArguments$$1(baseObject, members) {\n let value;\n for (const property in members) {\n value = members[property];\n if (isArray(value)) {\n value = deepUnfilterMethodArguments$$1([], value);\n } else if (isPlainObject(value)) {\n value = deepUnfilterMethodArguments$$1({}, value);\n } else if (typeof value !== 'function') {\n if (value) {\n const key = getKey(value);\n if (key) {\n value = getRef(value, key) || value;\n }\n }\n // If value is a plain object, we need to deep unfilter\n if (isPlainObject(value)) {\n value = deepUnfilterMethodArguments$$1({}, value);\n }\n } else {\n value = filter(key, value, { defaultKey: key });\n }\n baseObject[property] = value;\n }\n return baseObject;\n }", "function deepUnfilterMethodArguments$$1(baseObject, members) {\n let value;\n for (const property in members) {\n value = members[property];\n if (isArray(value)) {\n value = deepUnfilterMethodArguments$$1([], value);\n } else if (isPlainObject(value)) {\n value = deepUnfilterMethodArguments$$1({}, value);\n } else if (typeof value !== 'function') {\n if (value) {\n const key = getKey(value);\n if (key) {\n value = getRef(value, key) || value;\n }\n }\n // If value is a plain object, we need to deep unfilter\n if (isPlainObject(value)) {\n value = deepUnfilterMethodArguments$$1({}, value);\n }\n } else {\n value = filter(key, value, { defaultKey: key });\n }\n baseObject[property] = value;\n }\n return baseObject;\n }", "function recursiveFn(source, target, key) {\n if (isArray(source) || isObject$1(source)) {\n target = isPrimitive(target) ? isObject$1(source) ? {} : [] : target;\n for (var _key in source) {\n // $FlowFixMe: support computed key here\n setter(target, _key, recursiveFn(source[_key], target[_key], _key));\n // target[key] = recursiveFn(source[key], target[key], key);\n }\n return target;\n }\n return fn(source, target, key);\n }", "walk(obj: Object) {\n // 使对象上的每一个属性变成响应式的\n const keys = Object.keys(obj)\n for (let i = 0; i < keys.length; i++) {\n defineReactive(obj, keys[i])\n }\n }", "function traverseRecursive(value, key, list, handler) {\n if (_.isObject(value) || _.isArray(value)) {\n _.each(value, function(v, k, l) {\n l[k] = traverseRecursive(v, k, l, handler);\n });\n return list[key];\n } else {\n // jsonOb is a number or string\n return handler(value, key, list);\n }\n }", "function unwrapFunctions(obj){\n\t\tvar res = {};\n\t\tfor(var p in obj){\n\t\t\tvar tp = typeof(obj[p]); \n\t\t\tif(tp == 'function'){\n\t\t\t\tres[p] = obj[p]();\n\t\t\t}else if(tp == 'object'){\n\t\t\t\tvar un = obj[p]; \n\t\t\t\tif(obj[p] && obj[p]['toJSON']){\n\t\t\t\t\tun = obj[p]['toJSON']();\n\t\t\t\t}\n\t\t\t\tres[p] = unwrapFunctions(un);\n\t\t\t}else{\n\t\t\t\tres[p] = obj[p];\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}", "function allProps(object) {\n return ownProps(object).concat(ownProps(proto(object)));\n}", "function forward(obj, target, onlyAccessors) {\n onlyAccessors = onlyAccessors || false;\n for (var k in target) {\n (function(k) {\n if (typeof(target[k]) == 'function') {\n if (!onlyAccessors) {\n obj[k] = target[k].bind(target);\n }\n } else {\n Object.defineProperty(obj, k, {\n get: function() { return target[k]; },\n set: function(x) { target[k] = x; }\n });\n }\n })(k);\n }\n}", "function deepFreezeAndThrowOnMutation(object) {\n // Some objects in IE11 don't have a hasOwnProperty method so don't even bother trying to freeze them\n if (typeof object !== 'object' || object === null || Object.isFrozen(object) || Object.isSealed(object)) {\n return object;\n }\n for (var key in object) {\n if (object.hasOwnProperty(key)) {\n object.__defineGetter__(key, identity.bind(null, object[key])); // eslint-disable-line no-underscore-dangle\n object.__defineSetter__(key, throwOnImmutableMutation.bind(null, key)); // eslint-disable-line no-underscore-dangle\n }\n }\n Object.freeze(object);\n Object.seal(object);\n for (var key in object) {\n if (object.hasOwnProperty(key)) {\n deepFreezeAndThrowOnMutation(object[key]);\n }\n }\n return object;\n}", "walk (obj) {\n var keys = Object.keys(obj);\n for (var i = 0; i < keys.length; i++) {\n defineReactive$$1(obj, keys[i], obj[keys[i]]);\n }\n }", "function assignProxies (obj, cbs, shouldComponentUpdate, parent) {\n for (let k in obj) {\n if (obj[k] instanceof Array || obj[k] instanceof Object) {\n let curPosition = (parent === null ? '' : parent)\n let key = getCorrectPathOfObject(obj, k)\n obj[k] = assignProxies(obj[k], cbs, shouldComponentUpdate, curPosition + key)\n }\n }\n if (obj instanceof Array || obj instanceof Object) {\n Object.defineProperty(obj, '_parent', {\n enumerable: false,\n writable: true\n })\n obj._parent = parent\n }\n if (obj instanceof Array) {\n return makeArrayProxy(obj, cbs, shouldComponentUpdate)\n } else if (obj instanceof Object) {\n return makeObjectProxy(obj, cbs, shouldComponentUpdate)\n } else {\n return obj\n }\n}", "function deepFreeze(object) {\n const propNames = Object.getOwnPropertyNames(object);\n\n for (const name of propNames) {\n const value = object[name];\n\n if (value && typeof value === \"object\") {\n deepFreeze(value);\n }\n }\n\n return Object.freeze(object);\n}", "walk (obj) {\n for (let [key, val] of Object.entries(obj)) {\n defineReactive(obj, key);\n }\n }", "function setNestedObjectValues(object, value, visited, response) {\n if (visited === void 0) {\n visited = new WeakMap();\n }\n\n if (response === void 0) {\n response = {};\n }\n\n for (var _i = 0, _Object$keys = Object.keys(object); _i < _Object$keys.length; _i++) {\n var k = _Object$keys[_i];\n var val = object[k];\n\n if (formik_esm_isObject(val)) {\n if (!visited.get(val)) {\n visited.set(val, true); // In order to keep array values consistent for both dot path and\n // bracket syntax, we need to check if this is an array so that\n // this will output { friends: [true] } and not { friends: { \"0\": true } }\n\n response[k] = Array.isArray(val) ? [] : {};\n setNestedObjectValues(val, value, visited, response[k]);\n }\n } else {\n response[k] = value;\n }\n }\n\n return response;\n}", "function deepUnfilterArgs(baseObject, members) {\n let value;\n for (const property in members) {\n value = members[property];\n if (value !== undefined && value !== null) {\n if (isArray(value) || isPlainObject(value)) {\n const branchValue = baseObject[property];\n baseObject[property] = deepUnfilterArgs(branchValue, value);\n continue;\n }\n }\n if (isProxy(value)) {\n value = getRef(value, key);\n }\n baseObject[property] = value;\n }\n return baseObject;\n }", "function deepMapValuesOrDirectCall(obj, f) {\n if (_.isArray(obj)) {\n for (var i = 0; i < obj.length; i++) {\n obj[i] = deepMapValuesOrDirectCall(obj[i], f);\n }\n return obj;\n } else if (_.isObject(obj)) {\n return _.deepMapValues(obj, f);\n } else {\n return f(obj);\n }\n}", "function flatObjectKeys(keys, object, digNestedObjects = true) {\n return Object.keys(object).reduce((list, key) => {\n const value = object[key];\n if (!keys.includes(key) && typeof value === 'object' && digNestedObjects) {\n // only \"dig\" one level deep\n return [...list, ...flatObjectKeys(keys, value, false)];\n }\n\n return [...list, key];\n }, []);\n}", "function getFieldsHierarchy(obj) {\n var res = [];\n var nodes = [];\n var keyFieldFound = false;\n var fields = obj[\"Fields\"];\n if (isDefined(fields) && fields.length > 0) {\n res = fields;\n keyFieldFound = true;\n }\n\n if (keyFieldFound == true) {\n $.each(obj, function (key, value) {\n if (value instanceof Object) {\n nodes.push(value);\n }\n });\n }\n else {\n $.each(obj, function (key, value) {\n if (value instanceof Object) {\n var f = getFieldsHierarchy(value);\n if (isDefined(f) && f.length > 0) {\n res = res.concat(f);\n }\n }\n });\n }\n\n var nodeFields = [];\n $.each(nodes, function (i, node) {\n var nodeRes = getFieldsHierarchy(node);\n if (nodeRes.length > 0)\n nodeFields = nodeFields.concat(nodeRes);\n });\n if (nodeFields.length > 0)\n res.push(nodeFields);\n return res;\n}", "function setNestedObjectValues(object,value,visited,response){if(visited===void 0){visited=new WeakMap();}if(response===void 0){response={};}for(var _i=0,_Object$keys=Object.keys(object);_i<_Object$keys.length;_i++){var k=_Object$keys[_i];var val=object[k];if(isObject$2(val)){if(!visited.get(val)){visited.set(val,true);// In order to keep array values consistent for both dot path and\n// bracket syntax, we need to check if this is an array so that\n// this will output { friends: [true] } and not { friends: { \"0\": true } }\nresponse[k]=Array.isArray(val)?[]:{};setNestedObjectValues(val,value,visited,response[k]);}}else {response[k]=value;}}return response;}", "cleanFields(obj) {\n\n if (!(this.judgeNotNull(obj) && this.isObj(obj))) {\n return obj\n }\n for (let key in obj) {\n if (this.getType(obj[key]) === 'object') {\n this.cleanFields(obj[key])\n }\n if (!this.judgeNotNull(obj[key])) {\n delete obj[key]\n }\n }\n return obj\n }", "function flatten(obj, depth) {\n var result = [],typ = (typeof obj)[0],prop;\n if (depth && typ == 'o') {\n for (prop in obj) {\n try {result.push(flatten(obj[prop], depth - 1));} catch (e) {}\n }\n }\n return result.length ? result : typ == 's' ? obj : obj + '\\0';\n}", "function deepField(data,propertyPath,propertySearch,propertySearchDepth){var ret=null,i=void 0,copyPropertyPath=void 0,itemValue=void 0,parameter=void 0,newPropertySearchDepth=-1;// Check if the max-search depth got reached when propertySearch is activated\nif(propertySearch){if(propertySearchDepth===0){// Max depth reached\nreturn null;}else if(propertySearchDepth!==-1){newPropertySearchDepth=propertySearchDepth-1;}}if(data===null||data===undefined||propertyPath===null||propertyPath===undefined||!Array.isArray(propertyPath)||propertyPath.length<1){ret=null;}else if(Array.isArray(data)){// If it is an Array we have to check all the items for the value\n// Go through each of the items and return all the values that have it\nret=[];for(i=0;i<data.length;i++){// We copy the value because it is just a reference the first round would delete it and the second one would\n// not know anymore what to look for\ncopyPropertyPath=propertyPath.slice(0);// First try to find the value\nitemValue=deepField(data[i],copyPropertyPath,propertySearch,newPropertySearchDepth-1);// We return all the values that match\nif(itemValue){ret.push(itemValue);}}if(ret.length===0){ret=null;}}else if((typeof data==='undefined'?'undefined':_typeof(data))==='object'){// It is an object so we can proceed normally\n// Get the parameter\nparameter=propertyPath[0];// If propertySearch is activated we go on to look on lower levels\nif(!data.hasOwnProperty(parameter)&&propertySearch){var propertyNames=Object.keys(data);ret=[];for(i=0;i<propertyNames.length;i++){var propertyData=data[propertyNames[i]];if(propertyData===null||propertyData===undefined){continue;}// If the property contains an array or an object we have to dig deeper\nif(Array.isArray(propertyData)){// Is an array so we have to check every item\npropertyData.forEach(function(propertyDataItem){var foundValue=deepField(propertyDataItem,propertyPath,propertySearch,newPropertySearchDepth);if(foundValue!==null){ret.push(foundValue);}});}else if(propertyData.constructor.name==='Object'){// Is a single object so we can check it directly\nvar foundValue=deepField(propertyData,propertyPath,propertySearch,newPropertySearchDepth);if(foundValue!==null){ret.push(foundValue);}}}if(ret.length===0){ret=null;}else if(ret.length===1){ret=ret[0];}}else if(propertyPath.length<2){// If the current one was the last parameter part left we can directly return\nret=data[parameter];}else{// If there are more parts left we go on with the search\n// We get rid of the first parameter\nret=deepField(data[parameter],propertyPath.slice(1),propertySearch,newPropertySearchDepth);}}return ret;}", "function recurse(initial, update) {\n for (var prop in initial) {\n if ({}.hasOwnProperty.call(initial, prop) &&\n (update !== null && {}.hasOwnProperty.call(update, prop))\n ) {\n if (typeof initial[prop] === 'object' &&\n (\n initial[prop] !== null &&\n initial[prop].constructor !== Array\n ) &&\n (\n typeof update[prop] === 'object' &&\n update[prop] !== null\n )\n ) {\n recurse(initial[prop], update[prop])\n } else if (update[prop] === null) {\n initial[prop] = self.baseModel[prop]\n } else {\n initial[prop] = update[prop]\n }\n }\n }\n\n return initial\n }", "function walk(obj) {\n Object.getOwnPropertyNames(obj).forEach(function (name) {\n if (!whitelisted[name]) {\n if (!clobber(obj, name)) {\n // FIXME: this is lame\n failed.push('could not clobber \"' + name + '\": ' + e.message);\n }\n }\n });\n\n for (var name in blacklisted) {\n if (obj.hasOwnProperty(name) && !clobber(obj, name)) {\n // FIXME: this is lame\n failed.push('could not clobber \"' + name + '\": ' + e.message);\n }\n }\n\n var prototype = obj.constructor.prototype;\n if (prototype && prototype !== obj) {\n walk(prototype);\n }\n\n var proto = Object.getPrototypeOf(obj);\n if (proto && proto !== obj) {\n walk(proto);\n }\n }", "function getDeepProperty(obj, keys) {\n var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n _ref$throwError = _ref.throwError,\n throwError = _ref$throwError === undefined ? false : _ref$throwError,\n backup = _ref.backup;\n\n if (isString(keys)) {\n keys = keys.split('.');\n }\n if (!isArray(keys)) {\n throw new TypeError('keys of getDeepProperty must be string or Array<string>');\n }\n var read = [];\n var target = obj;\n for (var i = 0, len = keys.length; i < len; i++) {\n var key = keys[i];\n if (isVoid(target)) {\n if (throwError) {\n throw new Error('obj' + (read.length > 0 ? '.' + read.join('.') : ' itself') + ' is ' + target);\n } else {\n return backup;\n }\n }\n target = target[key];\n read.push(key);\n }\n return target;\n}", "function getDeepProperty(obj, keys) {\n var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n _ref$throwError = _ref.throwError,\n throwError = _ref$throwError === undefined ? false : _ref$throwError,\n backup = _ref.backup;\n if (isString(keys)) {\n keys = keys.split('.');\n }\n if (!isArray(keys)) {\n throw new TypeError('keys of getDeepProperty must be string or Array<string>');\n }\n var read = [];\n var target = obj;\n for (var i = 0, len = keys.length; i < len; i++) {\n var key = keys[i];\n if (isVoid(target)) {\n if (throwError) {\n throw new Error('obj' + (read.length > 0 ? '.' + read.join('.') : ' itself') + ' is ' + target);\n } else {\n return backup;\n }\n }\n target = target[key];\n read.push(key);\n }\n return target;\n }", "function getDeepProperty(obj, keys) {\n var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n _ref$throwError = _ref.throwError,\n throwError = _ref$throwError === undefined ? false : _ref$throwError,\n backup = _ref.backup;\n\n if (isString(keys)) {\n keys = keys.split('.');\n }\n if (!isArray$1(keys)) {\n throw new TypeError('keys of getDeepProperty must be string or Array<string>');\n }\n var read = [];\n var target = obj;\n for (var i = 0, len = keys.length; i < len; i++) {\n var key = keys[i];\n if (isVoid(target)) {\n if (throwError) {\n throw new Error('obj' + (read.length > 0 ? '.' + read.join('.') : ' itself') + ' is ' + target);\n } else {\n return backup;\n }\n }\n target = target[key];\n read.push(key);\n }\n return target;\n}", "function flat(obj) {\n let ans = {};\n function flatten(obj,parent) {\n for (let key in obj) {\n if (typeof obj[key] === \"object\" && obj[key] !== null && Array.isArray(obj[key]) === false) {\n if(parent==\"\"){\n flatten(obj[key], key);\n }\n else{\n flatten(obj[key], parent + \".\" + key);\n }\n } else {\n ans[parent + \".\" + key] = obj[key];\n }\n }\n }\n flatten(obj,\"\");\n return ans;\n }", "function nestedGet(object, path) {\n if (Immutable.isImmutable(object)) {\n return Immutable.getIn(object, path);\n }\n let index = 0;\n const length = path.length;\n let o = object;\n\n while (o != null && index < length) {\n // eslint-disable-next-line no-plusplus\n o = o[path[index++]];\n }\n return (index && index === length) ? o : undefined;\n}", "function flatten(obj, depth) {\n var result = [], typ = typeof obj, prop;\n if (depth && typ == 'object') {\n for(prop in obj)try {\n result.push(flatten(obj[prop], depth - 1));\n } catch (e) {\n }\n }\n return result.length ? result : typ == 'string' ? obj : obj + '\\0';\n }", "static cloneDeep(obj) {\r\n // list of fields we will skip during cloneDeep (nested objects, other internal)\r\n const skipFields = ['_isNested', 'el', 'grid', 'subGrid', 'engine'];\r\n // return JSON.parse(JSON.stringify(obj)); // doesn't work with date format ?\r\n const ret = Utils.clone(obj);\r\n for (const key in ret) {\r\n // NOTE: we don't support function/circular dependencies so skip those properties for now...\r\n if (ret.hasOwnProperty(key) && typeof (ret[key]) === 'object' && key.substring(0, 2) !== '__' && !skipFields.find(k => k === key)) {\r\n ret[key] = Utils.cloneDeep(obj[key]);\r\n }\r\n }\r\n return ret;\r\n }", "function flatten(obj, depth) {\n var result = [],\n typ = (typeof obj),\n prop;\n if (depth && typ == 'object') {\n for (prop in obj) {\n try {\n result.push(flatten(obj[prop], depth - 1));\n } catch (e) {}\n }\n }\n return (result.length ? result : typ == 'string' ? obj : obj + '\\0');\n }", "function visit(\n key,\n value,\n depth = +Infinity,\n maxProperties = +Infinity,\n memo$1 = memo.memoBuilder(),\n) {\n const [memoize, unmemoize] = memo$1;\n\n // Get the simple cases out of the way first\n if (value === null || (['number', 'boolean', 'string'].includes(typeof value) && !is.isNaN(value))) {\n return value ;\n }\n\n const stringified = stringifyValue(key, value);\n\n // Anything we could potentially dig into more (objects or arrays) will have come back as `\"[object XXXX]\"`.\n // Everything else will have already been serialized, so if we don't see that pattern, we're done.\n if (!stringified.startsWith('[object ')) {\n return stringified;\n }\n\n // From here on, we can assert that `value` is either an object or an array.\n\n // Do not normalize objects that we know have already been normalized. As a general rule, the\n // \"__sentry_skip_normalization__\" property should only be used sparingly and only should only be set on objects that\n // have already been normalized.\n if ((value )['__sentry_skip_normalization__']) {\n return value ;\n }\n\n // We're also done if we've reached the max depth\n if (depth === 0) {\n // At this point we know `serialized` is a string of the form `\"[object XXXX]\"`. Clean it up so it's just `\"[XXXX]\"`.\n return stringified.replace('object ', '');\n }\n\n // If we've already visited this branch, bail out, as it's circular reference. If not, note that we're seeing it now.\n if (memoize(value)) {\n return '[Circular ~]';\n }\n\n // If the value has a `toJSON` method, we call it to extract more information\n const valueWithToJSON = value ;\n if (valueWithToJSON && typeof valueWithToJSON.toJSON === 'function') {\n try {\n const jsonValue = valueWithToJSON.toJSON();\n // We need to normalize the return value of `.toJSON()` in case it has circular references\n return visit('', jsonValue, depth - 1, maxProperties, memo$1);\n } catch (err) {\n // pass (The built-in `toJSON` failed, but we can still try to do it ourselves)\n }\n }\n\n // At this point we know we either have an object or an array, we haven't seen it before, and we're going to recurse\n // because we haven't yet reached the max depth. Create an accumulator to hold the results of visiting each\n // property/entry, and keep track of the number of items we add to it.\n const normalized = (Array.isArray(value) ? [] : {}) ;\n let numAdded = 0;\n\n // Before we begin, convert`Error` and`Event` instances into plain objects, since some of each of their relevant\n // properties are non-enumerable and otherwise would get missed.\n const visitable = object.convertToPlainObject(value );\n\n for (const visitKey in visitable) {\n // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.\n if (!Object.prototype.hasOwnProperty.call(visitable, visitKey)) {\n continue;\n }\n\n if (numAdded >= maxProperties) {\n normalized[visitKey] = '[MaxProperties ~]';\n break;\n }\n\n // Recursively visit all the child nodes\n const visitValue = visitable[visitKey];\n normalized[visitKey] = visit(visitKey, visitValue, depth - 1, maxProperties, memo$1);\n\n numAdded += 1;\n }\n\n // Once we've visited all the branches, remove the parent from memo storage\n unmemoize(value);\n\n // Return accumulated values\n return normalized;\n}", "function doDirtyCheckingSafety(object) {\n var dict = {};\n for (var i in object) {\n if (i.indexOf('__dirtyCheckingVars_') > -1) {\n //we don't have closure, if we don't have getter\n if (!object[i]){\n delete object[i];\n } else if (object[i].indexOf('getter') === -1) {\n delete object[i];\n } else if (dict.hasOwnProperty(object[i])) {\n delete object[i];\n } else {\n dict[object[i]] = true;\n var getterPart = object[i].split('.apply'),\n compr = '', one;\n if (getterPart.length > 1) {\n for (var k = 0; k < getterPart.length; k++) {\n one = extractGetterFromString(getterPart[k]);\n if (one) {\n compr = one + \" && \" + compr;\n }\n }\n }\n if (compr) {\n object[i] = object[i].replace('¥', '¥' + compr);\n }\n }\n }\n }\n }" ]
[ "0.62905097", "0.6121575", "0.5950286", "0.5849156", "0.57901883", "0.57893395", "0.57820684", "0.577268", "0.5767362", "0.57612413", "0.57531846", "0.57531846", "0.57363987", "0.5696382", "0.565734", "0.56491715", "0.5594592", "0.5580324", "0.5577302", "0.5566833", "0.5560367", "0.55408555", "0.5519679", "0.5519679", "0.5512902", "0.548187", "0.5481783", "0.546543", "0.54299104", "0.5415886", "0.5407276", "0.54020643", "0.54017687", "0.540023", "0.53891194", "0.53891194", "0.53891194", "0.53891194", "0.53891194", "0.53891194", "0.53891194", "0.5379602", "0.53699553", "0.5364871", "0.536184", "0.53599083", "0.5353793", "0.5353793", "0.53435576", "0.5335367", "0.532915", "0.53265005", "0.5320453", "0.531419", "0.5301628", "0.52743596", "0.5272214", "0.5272214", "0.5269552", "0.52583694", "0.5254526", "0.5245775", "0.5241132", "0.52238315", "0.52224386", "0.5220869", "0.52006763", "0.51958793", "0.51958793", "0.51939994", "0.51762027", "0.51672184", "0.51637846", "0.51608723", "0.5154383", "0.5145896", "0.51442474", "0.5142212", "0.5140731", "0.5136865", "0.5130378", "0.51212627", "0.51180136", "0.5116708", "0.5116686", "0.5106237", "0.5105485", "0.5105319", "0.5104372", "0.51000744", "0.50984186", "0.5094683", "0.50841117", "0.5079059", "0.5076578", "0.50721264", "0.506677", "0.50645435", "0.5060219", "0.5052227", "0.50517505" ]
0.0
-1
The template compiler attempts to minimize the need for normalization by statically analyzing the template at compile time. For plain HTML markup, normalization can be completely skipped because the generated render function is guaranteed to return Array. There are two cases where extra normalization is needed: 1. When the children contains components because a functional component may return an Array instead of a single root. In this case, just a simple normalization is needed if any child is an Array, we flatten the whole thing with Array.prototype.concat. It is guaranteed to be only 1level deep because functional components already normalize their own children.
function simpleNormalizeChildren (children) { for (var i = 0; i < children.length; i++) { if (Array.isArray(children[i])) { return Array.prototype.concat.apply([], children) } } return children }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function simpleNormalizeChildren(children){for(var i=0;i<children.length;i++){if(Array.isArray(children[i])){return Array.prototype.concat.apply([],children);}}return children;}// 2. When the children contains constructs that always generated nested Arrays,", "function simpleNormalizeChildren(children){for(var i=0;i<children.length;i++){if(Array.isArray(children[i])){return Array.prototype.concat.apply([],children);}}return children;}// 2. When the children contains constructs that always generated nested Arrays,", "function simpleNormalizeChildren(children){for(var i=0;i<children.length;i++){if(Array.isArray(children[i])){return Array.prototype.concat.apply([],children);}}return children;}// 2. When the children contains constrcuts that always generated nested Arrays,", "function simpleNormalizeChildren(children) {\n for (var i = 0; i < children.length; i++) {\n if (Array.isArray(children[i])) {\n return Array.prototype.concat.apply([], children);\n }\n }\n\n return children;\n} // 2. When the children contains constructs that always generated nested Arrays,", "function simpleNormalizeChildren(children) {\n for (var i = 0; i < children.length; i++) {\n if (Array.isArray(children[i])) {\n return Array.prototype.concat.apply([], children);\n }\n }\n\n return children;\n} // 2. When the children contains constructs that always generated nested Arrays,", "function simpleNormalizeChildren(children) {\n for (var i = 0; i < children.length; i++) {\n if (Array.isArray(children[i])) {\n return Array.prototype.concat.apply([], children);\n }\n }\n\n return children;\n} // 2. When the children contains constructs that always generated nested Arrays,", "function simpleNormalizeChildren(children) {\n for (var i = 0; i < children.length; i++) {\n if (Array.isArray(children[i])) {\n return Array.prototype.concat.apply([], children);\n }\n }\n\n return children;\n} // 2. When the children contains constructs that always generated nested Arrays,", "function simpleNormalizeChildren(children) {\n for (var i = 0; i < children.length; i++) {\n if (Array.isArray(children[i])) {\n return Array.prototype.concat.apply([], children);\n }\n }\n\n return children;\n} // 2. When the children contains constructs that always generated nested Arrays,", "function simpleNormalizeChildren(children) {\n for (var i = 0; i < children.length; i++) {\n if (Array.isArray(children[i])) {\n return Array.prototype.concat.apply([], children);\n }\n }\n\n return children;\n } // 2. When the children contains constructs that always generated nested Arrays,", "renderChildrenOnly() {\n this.children.forEach(child => child.render(this.$element));\n }", "function normalizeChildren(children){return isPrimitive(children)?[createTextVNode(children)]:Array.isArray(children)?normalizeArrayChildren(children):undefined;}", "function normalizeChildren(children){return isPrimitive(children)?[createTextVNode(children)]:Array.isArray(children)?normalizeArrayChildren(children):undefined;}", "function normalizeChildren(children){return isPrimitive(children)?[createTextVNode(children)]:Array.isArray(children)?normalizeArrayChildren(children):undefined;}", "function simpleNormalizeChildren (children) {\n for (var i = 0; i < children.length; i++) {\n if (Array.isArray(children[i])) {\n return Array.prototype.concat.apply([], children)\n }\n }\n return children\n }", "function simpleNormalizeChildren (children) {\n for (var i = 0; i < children.length; i++) {\n if (Array.isArray(children[i])) {\n return Array.prototype.concat.apply([], children)\n }\n }\n return children\n }", "function simpleNormalizeChildren (children) {\n for (var i = 0; i < children.length; i++) {\n if (Array.isArray(children[i])) {\n return Array.prototype.concat.apply([], children)\n }\n }\n return children\n }", "function simpleNormalizeChildren (children) {\n for (var i = 0; i < children.length; i++) {\n if (Array.isArray(children[i])) {\n return Array.prototype.concat.apply([], children)\n }\n }\n return children\n }", "function simpleNormalizeChildren (children) {\n for (var i = 0; i < children.length; i++) {\n if (Array.isArray(children[i])) {\n return Array.prototype.concat.apply([], children)\n }\n }\n return children\n }", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n }", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n }", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n }", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n }", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n }", "function normalizeChildren (children) {\n\t return isPrimitive(children)\n\t ? [createTextVNode(children)]\n\t : Array.isArray(children)\n\t ? normalizeArrayChildren(children)\n\t : undefined\n\t}", "function normalizeChildren (children) {\n\t return isPrimitive(children)\n\t ? [createTextVNode(children)]\n\t : Array.isArray(children)\n\t ? normalizeArrayChildren(children)\n\t : undefined\n\t}", "function normalizeChildren (children) {\n\t return isPrimitive(children)\n\t ? [createTextVNode(children)]\n\t : Array.isArray(children)\n\t ? normalizeArrayChildren(children)\n\t : undefined\n\t}", "function normalizeChildren (children) {\n\t return isPrimitive(children)\n\t ? [createTextVNode(children)]\n\t : Array.isArray(children)\n\t ? normalizeArrayChildren(children)\n\t : undefined\n\t}", "function normalizeChildren (children) {\n\t return isPrimitive(children)\n\t ? [createTextVNode(children)]\n\t : Array.isArray(children)\n\t ? normalizeArrayChildren(children)\n\t : undefined\n\t}", "function normalizeChildren (children) {\n\t return isPrimitive(children)\n\t ? [createTextVNode(children)]\n\t : Array.isArray(children)\n\t ? normalizeArrayChildren(children)\n\t : undefined\n\t}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}" ]
[ "0.69195116", "0.69195116", "0.67767596", "0.6734535", "0.6734535", "0.6734535", "0.6734535", "0.6734535", "0.66989434", "0.64314777", "0.6424479", "0.6424479", "0.6424479", "0.63202715", "0.630732", "0.630732", "0.630732", "0.630732", "0.630627", "0.6302493", "0.6302493", "0.6302493", "0.6302493", "0.6298973", "0.6298973", "0.6298973", "0.6298973", "0.6298973", "0.6298973", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153", "0.6289153" ]
0.0
-1
2. When the children contains constructs that always generated nested Arrays, e.g. , , vfor, or when the children is provided by user with handwritten render functions / JSX. In such cases a full normalization is needed to cater to all possible types of children values.
function normalizeChildren (children) { return isPrimitive(children) ? [createTextVNode(children)] : Array.isArray(children) ? normalizeArrayChildren(children) : undefined }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function simpleNormalizeChildren(children){for(var i=0;i<children.length;i++){if(Array.isArray(children[i])){return Array.prototype.concat.apply([],children);}}return children;}// 2. When the children contains constructs that always generated nested Arrays,", "function simpleNormalizeChildren(children){for(var i=0;i<children.length;i++){if(Array.isArray(children[i])){return Array.prototype.concat.apply([],children);}}return children;}// 2. When the children contains constructs that always generated nested Arrays,", "function simpleNormalizeChildren(children){for(var i=0;i<children.length;i++){if(Array.isArray(children[i])){return Array.prototype.concat.apply([],children);}}return children;}// 2. When the children contains constrcuts that always generated nested Arrays,", "function normalizeChildren(children){return isPrimitive(children)?[createTextVNode(children)]:Array.isArray(children)?normalizeArrayChildren(children):undefined;}", "function normalizeChildren(children){return isPrimitive(children)?[createTextVNode(children)]:Array.isArray(children)?normalizeArrayChildren(children):undefined;}", "function normalizeChildren(children){return isPrimitive(children)?[createTextVNode(children)]:Array.isArray(children)?normalizeArrayChildren(children):undefined;}", "function simpleNormalizeChildren(children) {\n for (var i = 0; i < children.length; i++) {\n if (Array.isArray(children[i])) {\n return Array.prototype.concat.apply([], children);\n }\n }\n\n return children;\n} // 2. When the children contains constructs that always generated nested Arrays,", "function simpleNormalizeChildren(children) {\n for (var i = 0; i < children.length; i++) {\n if (Array.isArray(children[i])) {\n return Array.prototype.concat.apply([], children);\n }\n }\n\n return children;\n} // 2. When the children contains constructs that always generated nested Arrays,", "function simpleNormalizeChildren(children) {\n for (var i = 0; i < children.length; i++) {\n if (Array.isArray(children[i])) {\n return Array.prototype.concat.apply([], children);\n }\n }\n\n return children;\n} // 2. When the children contains constructs that always generated nested Arrays,", "function simpleNormalizeChildren(children) {\n for (var i = 0; i < children.length; i++) {\n if (Array.isArray(children[i])) {\n return Array.prototype.concat.apply([], children);\n }\n }\n\n return children;\n} // 2. When the children contains constructs that always generated nested Arrays,", "function simpleNormalizeChildren(children) {\n for (var i = 0; i < children.length; i++) {\n if (Array.isArray(children[i])) {\n return Array.prototype.concat.apply([], children);\n }\n }\n\n return children;\n} // 2. When the children contains constructs that always generated nested Arrays,", "function simpleNormalizeChildren(children) {\n for (var i = 0; i < children.length; i++) {\n if (Array.isArray(children[i])) {\n return Array.prototype.concat.apply([], children);\n }\n }\n\n return children;\n } // 2. When the children contains constructs that always generated nested Arrays,", "function normalizeChildren (children) {\n\t return isPrimitive(children)\n\t ? [createTextVNode(children)]\n\t : Array.isArray(children)\n\t ? normalizeArrayChildren(children)\n\t : undefined\n\t}", "function normalizeChildren (children) {\n\t return isPrimitive(children)\n\t ? [createTextVNode(children)]\n\t : Array.isArray(children)\n\t ? normalizeArrayChildren(children)\n\t : undefined\n\t}", "function normalizeChildren (children) {\n\t return isPrimitive(children)\n\t ? [createTextVNode(children)]\n\t : Array.isArray(children)\n\t ? normalizeArrayChildren(children)\n\t : undefined\n\t}", "function normalizeChildren (children) {\n\t return isPrimitive(children)\n\t ? [createTextVNode(children)]\n\t : Array.isArray(children)\n\t ? normalizeArrayChildren(children)\n\t : undefined\n\t}", "function normalizeChildren (children) {\n\t return isPrimitive(children)\n\t ? [createTextVNode(children)]\n\t : Array.isArray(children)\n\t ? normalizeArrayChildren(children)\n\t : undefined\n\t}", "function normalizeChildren (children) {\n\t return isPrimitive(children)\n\t ? [createTextVNode(children)]\n\t : Array.isArray(children)\n\t ? normalizeArrayChildren(children)\n\t : undefined\n\t}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n }", "function normalizeChildren (children) {\r\n return isPrimitive(children)\r\n ? [createTextVNode(children)]\r\n : Array.isArray(children)\r\n ? normalizeArrayChildren(children)\r\n : undefined\r\n}" ]
[ "0.81383675", "0.81383675", "0.8134532", "0.7862443", "0.7862443", "0.7862443", "0.7846073", "0.7846073", "0.7846073", "0.7846073", "0.7846073", "0.7834197", "0.78136206", "0.78136206", "0.78136206", "0.78136206", "0.78136206", "0.78136206", "0.77821416", "0.7776711" ]
0.0
-1
Runtime helper for resolving raw children VNodes into a slot object.
function resolveSlots ( children, context ) { if (!children || !children.length) { return {} } var slots = {}; for (var i = 0, l = children.length; i < l; i++) { var child = children[i]; var data = child.data; // remove slot attribute if the node is resolved as a Vue slot node if (data && data.attrs && data.attrs.slot) { delete data.attrs.slot; } // named slots should only be respected if the vnode was rendered in the // same context. if ((child.context === context || child.fnContext === context) && data && data.slot != null ) { var name = data.slot; var slot = (slots[name] || (slots[name] = [])); if (child.tag === 'template') { slot.push.apply(slot, child.children || []); } else { slot.push(child); } } else { (slots.default || (slots.default = [])).push(child); } } // ignore slots that contains only whitespace for (var name$1 in slots) { if (slots[name$1].every(isWhitespace)) { delete slots[name$1]; } } return slots }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resolveSlots(children,context){var slots={};if(!children){return slots;}for(var i=0,l=children.length;i<l;i++){var child=children[i];var data=child.data;// remove slot attribute if the node is resolved as a Vue slot node\nif(data&&data.attrs&&data.attrs.slot){delete data.attrs.slot;}// named slots should only be respected if the vnode was rendered in the\n// same context.\nif((child.context===context||child.fnContext===context)&&data&&data.slot!=null){var name=child.data.slot;var slot=slots[name]||(slots[name]=[]);if(child.tag==='template'){slot.push.apply(slot,child.children);}else{slot.push(child);}}else{(slots.default||(slots.default=[])).push(child);}}// ignore slots that contains only whitespace\nfor(var name$1 in slots){if(slots[name$1].every(isWhitespace)){delete slots[name$1];}}return slots;}", "function resolveSlots(children,context){var slots={};if(!children){return slots;}for(var i=0,l=children.length;i<l;i++){var child=children[i];var data=child.data;// remove slot attribute if the node is resolved as a Vue slot node\nif(data&&data.attrs&&data.attrs.slot){delete data.attrs.slot;}// named slots should only be respected if the vnode was rendered in the\n// same context.\nif((child.context===context||child.functionalContext===context)&&data&&data.slot!=null){var name=child.data.slot;var slot=slots[name]||(slots[name]=[]);if(child.tag==='template'){slot.push.apply(slot,child.children);}else{slot.push(child);}}else{(slots.default||(slots.default=[])).push(child);}}// ignore slots that contains only whitespace\nfor(var name$1 in slots){if(slots[name$1].every(isWhitespace)){delete slots[name$1];}}return slots;}", "function resolveSlots (\n children,\n context\n ) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n }", "function resolveSlots (\n children,\n context\n ) {\n if (!children || !children.length) {\n return {}\n }\n var slots = {};\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n }", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = child.data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = child.data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = child.data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.functionalContext === context) &&\n data && data.slot != null\n ) {\n var name = child.data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n var defaultSlot = [];\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.functionalContext === context) &&\n data && data.slot != null\n ) {\n var name = child.data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children);\n } else {\n slot.push(child);\n }\n } else {\n defaultSlot.push(child);\n }\n }\n // ignore whitespace\n if (!defaultSlot.every(isWhitespace)) {\n slots.default = defaultSlot;\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n var defaultSlot = [];\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.functionalContext === context) &&\n data && data.slot != null\n ) {\n var name = child.data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children);\n } else {\n slot.push(child);\n }\n } else {\n defaultSlot.push(child);\n }\n }\n // ignore whitespace\n if (!defaultSlot.every(isWhitespace)) {\n slots.default = defaultSlot;\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n var defaultSlot = [];\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.functionalContext === context) &&\n data && data.slot != null\n ) {\n var name = child.data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children);\n } else {\n slot.push(child);\n }\n } else {\n defaultSlot.push(child);\n }\n }\n // ignore whitespace\n if (!defaultSlot.every(isWhitespace)) {\n slots.default = defaultSlot;\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n var defaultSlot = [];\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.functionalContext === context) &&\n data && data.slot != null\n ) {\n var name = child.data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children);\n } else {\n slot.push(child);\n }\n } else {\n defaultSlot.push(child);\n }\n }\n // ignore whitespace\n if (!defaultSlot.every(isWhitespace)) {\n slots.default = defaultSlot;\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n var defaultSlot = [];\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.functionalContext === context) &&\n data && data.slot != null\n ) {\n var name = child.data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children);\n } else {\n slot.push(child);\n }\n } else {\n defaultSlot.push(child);\n }\n }\n // ignore whitespace\n if (!defaultSlot.every(isWhitespace)) {\n slots.default = defaultSlot;\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n var defaultSlot = [];\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.functionalContext === context) &&\n data && data.slot != null\n ) {\n var name = child.data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children);\n } else {\n slot.push(child);\n }\n } else {\n defaultSlot.push(child);\n }\n }\n // ignore whitespace\n if (!defaultSlot.every(isWhitespace)) {\n slots.default = defaultSlot;\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n var defaultSlot = [];\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.functionalContext === context) &&\n data && data.slot != null\n ) {\n var name = child.data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children);\n } else {\n slot.push(child);\n }\n } else {\n defaultSlot.push(child);\n }\n }\n // ignore whitespace\n if (!defaultSlot.every(isWhitespace)) {\n slots.default = defaultSlot;\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n var defaultSlot = [];\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.functionalContext === context) &&\n data && data.slot != null\n ) {\n var name = child.data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children);\n } else {\n slot.push(child);\n }\n } else {\n defaultSlot.push(child);\n }\n }\n // ignore whitespace\n if (!defaultSlot.every(isWhitespace)) {\n slots.default = defaultSlot;\n }\n return slots\n}", "function resolveSlots(children, context) {\n var slots = {};\n if (!children) {\n return slots;\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) && data && data.slot != null) {\n var name = data.slot;\n var slot = slots[name] || (slots[name] = []);\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots;\n}", "function resolveSlots(children, context) {\n var slots = {};\n if (!children) {\n return slots;\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) && data && data.slot != null) {\n var name = data.slot;\n var slot = slots[name] || (slots[name] = []);\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots;\n}", "function resolveSlots(children, context) {\n var slots = {};\n if (!children) {\n return slots;\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) && data && data.slot != null) {\n var name = data.slot;\n var slot = slots[name] || (slots[name] = []);\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots;\n}", "function resolveSlots(children, context) {\n var slots = {};\n if (!children) {\n return slots;\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) && data && data.slot != null) {\n var name = data.slot;\n var slot = slots[name] || (slots[name] = []);\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots;\n}", "function resolveSlots(children, context) {\n var slots = {};\n if (!children) {\n return slots;\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) && data && data.slot != null) {\n var name = data.slot;\n var slot = slots[name] || (slots[name] = []);\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots;\n}", "function resolveSlots (\n children,\n context\n) {\n if (!children || !children.length) {\n return {}\n }\n var slots = {};\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page\n if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){\n (slots['page'] || (slots['page'] = [])).push(child);\n }else{\n (slots.default || (slots.default = [])).push(child);\n }\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n if (!children || !children.length) {\n return {}\n }\n var slots = {};\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page\n if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){\n (slots['page'] || (slots['page'] = [])).push(child);\n }else{\n (slots.default || (slots.default = [])).push(child);\n }\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n if (!children || !children.length) {\n return {}\n }\n var slots = {};\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page\n if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){\n (slots['page'] || (slots['page'] = [])).push(child);\n }else{\n (slots.default || (slots.default = [])).push(child);\n }\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n if (!children || !children.length) {\n return {}\n }\n var slots = {};\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page\n if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){\n (slots['page'] || (slots['page'] = [])).push(child);\n }else{\n (slots.default || (slots.default = [])).push(child);\n }\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots (\n children,\n context\n) {\n if (!children || !children.length) {\n return {}\n }\n var slots = {};\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page\n if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){\n (slots['page'] || (slots['page'] = [])).push(child);\n }else{\n (slots.default || (slots.default = [])).push(child);\n }\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}", "function resolveSlots(children, context) {\n var slots = {};\n if (!children) {\n return slots;\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) && data && data.slot != null) {\n var name = child.data.slot;\n var slot = slots[name] || (slots[name] = []);\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots;\n }", "function resolveSlots (\n\t children,\n\t context\n\t) {\n\t var slots = {};\n\t if (!children) {\n\t return slots\n\t }\n\t for (var i = 0, l = children.length; i < l; i++) {\n\t var child = children[i];\n\t var data = child.data;\n\t // remove slot attribute if the node is resolved as a Vue slot node\n\t if (data && data.attrs && data.attrs.slot) {\n\t delete data.attrs.slot;\n\t }\n\t // named slots should only be respected if the vnode was rendered in the\n\t // same context.\n\t if ((child.context === context || child.fnContext === context) &&\n\t data && data.slot != null\n\t ) {\n\t var name = data.slot;\n\t var slot = (slots[name] || (slots[name] = []));\n\t if (child.tag === 'template') {\n\t slot.push.apply(slot, child.children || []);\n\t } else {\n\t slot.push(child);\n\t }\n\t } else {\n\t (slots.default || (slots.default = [])).push(child);\n\t }\n\t }\n\t // ignore slots that contains only whitespace\n\t for (var name$1 in slots) {\n\t if (slots[name$1].every(isWhitespace)) {\n\t delete slots[name$1];\n\t }\n\t }\n\t return slots\n\t}", "function resolveSlots(\n children,\n context,\n ) {\n if (!children || !children.length) {\n return {};\n }\n var slots = {};\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if (\n (child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === \"template\") {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots;\n }", "function resolveSlots(children, context) {\n var slots = {};\n if (!children) {\n return slots;\n }\n var defaultSlot = [];\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.functionalContext === context) && data && data.slot != null) {\n var name = child.data.slot;\n var slot = slots[name] || (slots[name] = []);\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children);\n } else {\n slot.push(child);\n }\n } else {\n defaultSlot.push(child);\n }\n }\n // ignore whitespace\n if (!defaultSlot.every(isWhitespace)) {\n slots.default = defaultSlot;\n }\n return slots;\n}", "function resolveSlots(children, context) {\n var slots = {};\n if (!children) {\n return slots;\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.functionalContext === context) && data && data.slot != null) {\n var name = child.data.slot;\n var slot = slots[name] || (slots[name] = []);\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots;\n}", "function resolveSlots (\n children,\n context\n ) {\n if (!children || !children.length) {\n return {}\n }\n var slots = {};\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n }", "function resolveSlots (\n children,\n context\n ) {\n if (!children || !children.length) {\n return {}\n }\n var slots = {};\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n }", "function resolveSlots (\n children,\n context\n ) {\n if (!children || !children.length) {\n return {}\n }\n var slots = {};\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n }", "function resolveSlots (\r\n children,\r\n context\r\n) {\r\n var slots = {};\r\n if (!children) {\r\n return slots\r\n }\r\n for (var i = 0, l = children.length; i < l; i++) {\r\n var child = children[i];\r\n var data = child.data;\r\n // remove slot attribute if the node is resolved as a Vue slot node\r\n if (data && data.attrs && data.attrs.slot) {\r\n delete data.attrs.slot;\r\n }\r\n // named slots should only be respected if the vnode was rendered in the\r\n // same context.\r\n if ((child.context === context || child.fnContext === context) &&\r\n data && data.slot != null\r\n ) {\r\n var name = data.slot;\r\n var slot = (slots[name] || (slots[name] = []));\r\n if (child.tag === 'template') {\r\n slot.push.apply(slot, child.children || []);\r\n } else {\r\n slot.push(child);\r\n }\r\n } else {\r\n (slots.default || (slots.default = [])).push(child);\r\n }\r\n }\r\n // ignore slots that contains only whitespace\r\n for (var name$1 in slots) {\r\n if (slots[name$1].every(isWhitespace)) {\r\n delete slots[name$1];\r\n }\r\n }\r\n return slots\r\n}", "function resolveSlots(\n children,\n context\n ) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n }" ]
[ "0.71123827", "0.70876837", "0.6743867", "0.67305523", "0.67168945", "0.67168945", "0.67168945", "0.6715018", "0.6715018", "0.6715018", "0.6715018", "0.6715018", "0.6715018", "0.6715018", "0.6715018", "0.6715018", "0.6715018", "0.6715018", "0.6715018", "0.6715018", "0.6715018", "0.6715018", "0.6715018", "0.6715018", "0.6715018", "0.6715018", "0.6715018", "0.6715018", "0.6715018", "0.6715018", "0.6715018", "0.6715018", "0.6715018", "0.6715018", "0.6715018", "0.6715018", "0.6715018", "0.6715018", "0.6715018", "0.6715018", "0.6715018", "0.6715018", "0.6715018", "0.6715018", "0.6711917", "0.6711091", "0.6711091", "0.6711091", "0.6711091", "0.6711091", "0.6711091", "0.6711091", "0.6711091", "0.6710729", "0.6710729", "0.6710729", "0.6710729", "0.6710729", "0.671026", "0.671026", "0.671026", "0.671026", "0.671026", "0.67077947", "0.6699337", "0.6698928", "0.66985685", "0.669845", "0.6689305", "0.6689305", "0.6689305", "0.6677008", "0.6664249" ]
0.0
-1
Runtime helper for rendering vfor lists.
function renderList ( val, render ) { var ret, i, l, keys, key; if (Array.isArray(val) || typeof val === 'string') { ret = new Array(val.length); for (i = 0, l = val.length; i < l; i++) { ret[i] = render(val[i], i); } } else if (typeof val === 'number') { ret = new Array(val); for (i = 0; i < val; i++) { ret[i] = render(i + 1, i); } } else if (isObject(val)) { if (hasSymbol && val[Symbol.iterator]) { ret = []; var iterator = val[Symbol.iterator](); var result = iterator.next(); while (!result.done) { ret.push(render(result.value, ret.length)); result = iterator.next(); } } else { keys = Object.keys(val); ret = new Array(keys.length); for (i = 0, l = keys.length; i < l; i++) { key = keys[i]; ret[i] = render(val[key], key, i); } } } if (!isDef(ret)) { ret = []; } (ret)._isVList = true; return ret }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderList(val,render){var ret,i,l,keys,key;if(Array.isArray(val)||typeof val==='string'){ret=new Array(val.length);for(i=0,l=val.length;i<l;i++){ret[i]=render(val[i],i);}}else if(typeof val==='number'){ret=new Array(val);for(i=0;i<val;i++){ret[i]=render(i+1,i);}}else if(isObject(val)){keys=Object.keys(val);ret=new Array(keys.length);for(i=0,l=keys.length;i<l;i++){key=keys[i];ret[i]=render(val[key],key,i);}}if(isDef(ret)){ret._isVList=true;}return ret;}", "function renderList(val,render){var ret,i,l,keys,key;if(Array.isArray(val)||typeof val==='string'){ret=new Array(val.length);for(i=0,l=val.length;i<l;i++){ret[i]=render(val[i],i);}}else if(typeof val==='number'){ret=new Array(val);for(i=0;i<val;i++){ret[i]=render(i+1,i);}}else if(isObject(val)){keys=Object.keys(val);ret=new Array(keys.length);for(i=0,l=keys.length;i<l;i++){key=keys[i];ret[i]=render(val[key],key,i);}}if(isDef(ret)){ret._isVList=true;}return ret;}", "function renderList(val, render) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n ret._isVList = true;\n }\n return ret;\n }", "function renderList(val, render) {\n\t var ret, i, l, keys, key;\n\t if (Array.isArray(val) || typeof val === 'string') {\n\t ret = new Array(val.length);\n\t for (i = 0, l = val.length; i < l; i++) {\n\t ret[i] = render(val[i], i);\n\t }\n\t } else if (typeof val === 'number') {\n\t ret = new Array(val);\n\t for (i = 0; i < val; i++) {\n\t ret[i] = render(i + 1, i);\n\t }\n\t } else if (isObject(val)) {\n\t keys = Object.keys(val);\n\t ret = new Array(keys.length);\n\t for (i = 0, l = keys.length; i < l; i++) {\n\t key = keys[i];\n\t ret[i] = render(val[key], key, i);\n\t }\n\t }\n\t if (isDef(ret)) {\n\t ret._isVList = true;\n\t }\n\t return ret;\n\t}", "function renderList(val, render) {\n\t var ret, i, l, keys, key;\n\t if (Array.isArray(val) || typeof val === 'string') {\n\t ret = new Array(val.length);\n\t for (i = 0, l = val.length; i < l; i++) {\n\t ret[i] = render(val[i], i);\n\t }\n\t } else if (typeof val === 'number') {\n\t ret = new Array(val);\n\t for (i = 0; i < val; i++) {\n\t ret[i] = render(i + 1, i);\n\t }\n\t } else if (isObject(val)) {\n\t keys = Object.keys(val);\n\t ret = new Array(keys.length);\n\t for (i = 0, l = keys.length; i < l; i++) {\n\t key = keys[i];\n\t ret[i] = render(val[key], key, i);\n\t }\n\t }\n\t if (isDef(ret)) {\n\t ret._isVList = true;\n\t }\n\t return ret;\n\t}", "function renderList(val, render) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n ret._isVList = true;\n }\n return ret;\n}", "function renderList(val, render) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n ret._isVList = true;\n }\n return ret;\n}", "function renderList(val, render) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n ret._isVList = true;\n }\n return ret;\n}", "function renderList(val, render) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n ret._isVList = true;\n }\n return ret;\n}", "function renderList(val, render) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n ret._isVList = true;\n }\n return ret;\n}", "function renderList(val, render) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n ret._isVList = true;\n }\n return ret;\n}", "function renderList(val, render) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n ret._isVList = true;\n }\n return ret;\n}", "function renderList(val, render) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n ret._isVList = true;\n }\n return ret;\n}", "function render() {\n $videogameList.empty();\n // pass allVideogames into the template function\n let videogameHtml = getAllVideogamesHtml(allVideogames);\n $videogameList.append(videogameHtml);\n }", "produce() {\n var listElem = [],\n uniqueKey = [];\n this.list.forEach(item => {\n var elem = <RenderElement elemkey={item.key} text={item.text} type={item.type} inlineStyleRanges={item.inlineStyleRanges}/>\n uniqueKey.push(item.key)\n listElem.push(elem)\n })\n return (this.list[0].type == \"unordered-list-item\" ? <ul key={uniqueKey.join(\"|\")}>{listElem}</ul> : <ol key={uniqueKey.join(\"|\")}>{listElem}</ol>)\n }", "function renderList (\n\t val,\n\t render\n\t) {\n\t var ret, i, l, keys, key;\n\t if (Array.isArray(val) || typeof val === 'string') {\n\t ret = new Array(val.length);\n\t for (i = 0, l = val.length; i < l; i++) {\n\t ret[i] = render(val[i], i);\n\t }\n\t } else if (typeof val === 'number') {\n\t ret = new Array(val);\n\t for (i = 0; i < val; i++) {\n\t ret[i] = render(i + 1, i);\n\t }\n\t } else if (isObject(val)) {\n\t keys = Object.keys(val);\n\t ret = new Array(keys.length);\n\t for (i = 0, l = keys.length; i < l; i++) {\n\t key = keys[i];\n\t ret[i] = render(val[key], key, i);\n\t }\n\t }\n\t if (isDef(ret)) {\n\t (ret)._isVList = true;\n\t }\n\t return ret\n\t}", "function renderList (\n\t val,\n\t render\n\t) {\n\t var ret, i, l, keys, key;\n\t if (Array.isArray(val) || typeof val === 'string') {\n\t ret = new Array(val.length);\n\t for (i = 0, l = val.length; i < l; i++) {\n\t ret[i] = render(val[i], i);\n\t }\n\t } else if (typeof val === 'number') {\n\t ret = new Array(val);\n\t for (i = 0; i < val; i++) {\n\t ret[i] = render(i + 1, i);\n\t }\n\t } else if (isObject(val)) {\n\t keys = Object.keys(val);\n\t ret = new Array(keys.length);\n\t for (i = 0, l = keys.length; i < l; i++) {\n\t key = keys[i];\n\t ret[i] = render(val[key], key, i);\n\t }\n\t }\n\t if (isDef(ret)) {\n\t (ret)._isVList = true;\n\t }\n\t return ret\n\t}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}", "function renderList (\r\n val,\r\n render\r\n) {\r\n var ret, i, l, keys, key;\r\n if (Array.isArray(val) || typeof val === 'string') {\r\n ret = new Array(val.length);\r\n for (i = 0, l = val.length; i < l; i++) {\r\n ret[i] = render(val[i], i);\r\n }\r\n } else if (typeof val === 'number') {\r\n ret = new Array(val);\r\n for (i = 0; i < val; i++) {\r\n ret[i] = render(i + 1, i);\r\n }\r\n } else if (isObject(val)) {\r\n keys = Object.keys(val);\r\n ret = new Array(keys.length);\r\n for (i = 0, l = keys.length; i < l; i++) {\r\n key = keys[i];\r\n ret[i] = render(val[key], key, i);\r\n }\r\n }\r\n if (isDef(ret)) {\r\n (ret)._isVList = true;\r\n }\r\n return ret\r\n}", "function renderList(\n val,\n render\n ) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n }", "function _drawLists() {\n let template = ''\n _listService.List.forEach((list, index) => {\n template += list.getTemplate(index)\n });\n document.querySelector(\"#lists\").innerHTML = template\n}", "function _drawLists() {\n let template = \"\";\n let lists = _store.Lists;\n console.log(lists);\n lists.forEach(list => {\n template += list.template;\n });\n document.querySelector(\"#lists\").innerHTML = template;\n}", "function _drawLists() {\n let lists = store.State.lists;\n let template = '';\n lists.forEach(list => {\n template += list.Template;\n })\n \n document.getElementById('lists').innerHTML = template;\n}", "render() {\n this.list.innerHTML = '';\n\n startingData.forEach(item => {\n this.createDomElements(item.id);\n this.li.insertAdjacentHTML('afterbegin', item.authorLast+\", \"+item.authorFirst+\". \"+\"<i>\"+item.title+\". \"+\"</i>\"+item.publisher+\": \"+item.year+\".\");\n this.list.appendChild(this.li);\n });\n }", "function renderList (\n val,\n render\n ) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (!isDef(ret)) {\n ret = [];\n }\n (ret)._isVList = true;\n return ret\n }", "showLists() {\n return toIndexArray(this.lists)\n .map(listIdx => (\n <p key={`p-${listIdx}`}>List #{listIdx + 1}:\n {\n ' ' + toIndexArray(this.lists[listIdx])\n .map(itemIdx => `(${this.lists[listIdx][itemIdx]}, ${this.weights[listIdx][itemIdx]})`)\n .join(', ')\n }\n </p>\n ));\n }", "function render(){\n\tvar src = \"\"\n\tfor(i in TodoList.items) src += ItemTemplate(TodoList.items[i]);\n\tel.innerHTML = src;\n}", "function _drawLists() {\n let template = ''\n let lists = _store.State.lists\n let listId = ''\n\n\n lists.forEach(list => template += list.Template)\n\n document.getElementById(\"lists\").innerHTML = template\n}", "function renderList(\n val,\n render,\n ) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === \"string\") {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === \"number\") {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n if (hasSymbol && val[Symbol.iterator]) {\n ret = [];\n var iterator = val[Symbol.iterator]();\n var result = iterator.next();\n while (!result.done) {\n ret.push(render(result.value, ret.length));\n result = iterator.next();\n }\n } else {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n }\n if (!isDef(ret)) {\n ret = [];\n }\n (ret)._isVList = true;\n return ret;\n }", "function renderList(val, render) {\n val = typeof val === 'string' && this[val] || val;\n var ret, i, l, keys, key;\n\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n if (hasSymbol && val[Symbol.iterator]) {\n ret = [];\n var iterator = val[Symbol.iterator]();\n var result = iterator.next();\n\n while (!result.done) {\n ret.push(render(result.value, ret.length));\n result = iterator.next();\n }\n } else {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n }\n\n if (!isDef(ret)) {\n ret = [];\n }\n\n ret._isVList = true;\n return ret;\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (!isDef(ret)) {\n ret = [];\n }\n (ret)._isVList = true;\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (!isDef(ret)) {\n ret = [];\n }\n (ret)._isVList = true;\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (!isDef(ret)) {\n ret = [];\n }\n (ret)._isVList = true;\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (!isDef(ret)) {\n ret = [];\n }\n (ret)._isVList = true;\n return ret\n}", "function renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (!isDef(ret)) {\n ret = [];\n }\n (ret)._isVList = true;\n return ret\n}", "render() {\r\n dxp.log.debug(this.element.tagName, 'render()', `in dxp-content-list render() : ${process.env.MODE}`);\r\n return (h(\"div\", { class: this.base.componentClass(), dir: this.dir, \"data-theme\": this.theme },\r\n h(\"div\", { class: \"header-tag\" }, this.titleText && (this.href ? h(\"h4\", { class: this.headerSize },\r\n h(\"a\", { href: this.href }, this.titleText)) :\r\n h(\"h4\", { class: this.headerSize }, this.titleText))),\r\n h(\"div\", { class: `dxp-content-list-items sc-dxp-content-list ${this.orientation ? this.orientation : 'vertical'}`, ref: el => this.linksContainer = el },\r\n h(\"slot\", null))));\r\n }", "function renderList (\n val,\n render\n ) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n if (hasSymbol && val[Symbol.iterator]) {\n ret = [];\n var iterator = val[Symbol.iterator]();\n var result = iterator.next();\n while (!result.done) {\n ret.push(render(result.value, ret.length));\n result = iterator.next();\n }\n } else {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n }\n if (!isDef(ret)) {\n ret = [];\n }\n (ret)._isVList = true;\n return ret\n }", "function renderList(val, render) {\n var ret = [];\n var i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n }\n else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n }\n else if (isObject(val)) {\n if (hasSymbol && val[Symbol.iterator]) {\n ret = [];\n var iterator = val[Symbol.iterator]();\n var result = iterator.next();\n while (!result.done) {\n ret.push(render(result.value, ret.length));\n result = iterator.next();\n }\n }\n else {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n }\n if (!isDef(ret)) {\n ret = [];\n }\n ret._isVList = true;\n return ret;\n }", "function renderList (\n val,\n render\n ) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n if (hasSymbol && val[Symbol.iterator]) {\n ret = [];\n var iterator = val[Symbol.iterator]();\n var result = iterator.next();\n while (!result.done) {\n ret.push(render(result.value, ret.length));\n result = iterator.next();\n }\n } else {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n }\n if (!isDef(ret)) {\n ret = [];\n }\n (ret)._isVList = true;\n return ret\n }", "function renderList (\n val,\n render\n ) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n if (hasSymbol && val[Symbol.iterator]) {\n ret = [];\n var iterator = val[Symbol.iterator]();\n var result = iterator.next();\n while (!result.done) {\n ret.push(render(result.value, ret.length));\n result = iterator.next();\n }\n } else {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n }\n if (!isDef(ret)) {\n ret = [];\n }\n (ret)._isVList = true;\n return ret\n }", "function renderList (\n val,\n render\n ) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n if (hasSymbol && val[Symbol.iterator]) {\n ret = [];\n var iterator = val[Symbol.iterator]();\n var result = iterator.next();\n while (!result.done) {\n ret.push(render(result.value, ret.length));\n result = iterator.next();\n }\n } else {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n }\n if (!isDef(ret)) {\n ret = [];\n }\n (ret)._isVList = true;\n return ret\n }", "function renderWithKeys(list) {\n return h('ul', [ list.map(item => h('li', { key: item }, item)) ])\n}" ]
[ "0.69482017", "0.69482017", "0.6754226", "0.6730061", "0.6730061", "0.6683929", "0.6683929", "0.6683929", "0.6683929", "0.6683929", "0.6683929", "0.6683929", "0.6683929", "0.66441935", "0.6616919", "0.6566886", "0.6566886", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.6562391", "0.65489984", "0.6524853", "0.65218157", "0.6519017", "0.64958847", "0.64840364", "0.64096516", "0.64072746", "0.6400891", "0.63810307", "0.63713735", "0.63501567", "0.63478935", "0.63478935", "0.63478935", "0.63478935", "0.63478935", "0.63343453", "0.63234675", "0.6318215", "0.6313254", "0.6313254", "0.6313254", "0.63063484" ]
0.0
-1
Runtime helper for rendering
function renderSlot ( name, fallback, props, bindObject ) { var scopedSlotFn = this.$scopedSlots[name]; var nodes; if (scopedSlotFn) { // scoped slot props = props || {}; if (bindObject) { if (false) {} props = extend(extend({}, bindObject), props); } nodes = scopedSlotFn(props) || fallback; } else { nodes = this.$slots[name] || fallback; } var target = props && props.slot; if (target) { return this.$createElement('template', { slot: target }, nodes) } else { return nodes } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_render() {}", "render() {}", "render() {}", "render() {}", "static rendered () {}", "static rendered () {}", "render(){}", "render(){}", "function render() {\n\n\t\t\t}", "render() { }", "function render() {\n\t\t\n\t}", "function render() {\n\t\t\t}", "function render() {\n\t}", "render() {\n\n\t}", "render() {\n\n\t}", "function render() {\r\n\r\n}", "function render() {\r\n\r\n}", "render(){return html``}", "render() {\n }", "render() {\n // Subclasses should override\n }", "render() {\n\n }", "render() {\n return <div className=\"border red\">{this.helperrender()}</div>\n }", "render() {\n return html ``;\n }", "render() {\n\t\treturn null;\n\t}", "function general_render(obj) {\n obj.render();\n }", "render() {\n\t\treturn (\n\t\t\tnull\n\t\t)\n\t}", "render( ) {\n return null;\n }", "render() {\n return '';\n }", "render() {\n\n }", "render() {\n\n }", "render() {\n\n }", "render() {\n }", "render() {\n }", "render(){\r\n\r\n\t}", "render() {\n return \"\";\n }", "render(){return renderNotImplemented;}", "render() {\n return this.renderContent()\n }", "render() {\n return <div>{this.toRender()}</div>;\n }", "sysRender() {\n \n let rendered = this.render();\n \n // If render() returns a String, then insert that as innerHTML in the\n // Part View node. Otherwise, do something else (TODO)\n \n if (typeof rendered === 'string') {\n this.domNode.innerHTML = rendered;\n } else if (false) { // TODO: test for jQuery return, DOM Node object, etc.\n // WHAT? \n }\n }", "render() {\n\t\treturn <div>{this.renderContent()}</div>;\n\t}", "renderHTML() {\n \n }", "render(){if(this.renderer){this.renderer.call(this.owner,this.content,this.owner,this.model)}}", "render () {\n throw new Error('render function must be override!')\n }", "render() { // it is a function ==> render: function() {}\n return (<h1>Hello World!!!!!!!</h1>);\n }", "_render()\n {\n if (this.isDisabled())\n return;\n\n this._setContentSizeCss();\n this._setDirection();\n const paragraph = html`<p>${this.text}</p>`;\n let anchor = \"\";\n let action = \"\";\n if (this.link && this.linkText)\n anchor = html`<a href=\"${this.link}\" target=\"_blank\">${this.linkText}</a>`;\n if (this.action && this.actionText)\n action = html`${anchor ? \" | \" : \"\"}<a href=\"javascript:void(0)\" @click=${this.action}>${this.actionText}</a>`;\n let heading = \"\";\n if (this.heading)\n heading = html`<h4>${this.heading}</h4>`;\n\n render(html`${heading}${paragraph}<div id=\"links\">${anchor}${action}</div>`, this.tooltipElem);\n }", "render() {\n return this.renderContent();\n }", "render() {\n return renderNotImplemented;\n }", "render() {\n return renderNotImplemented;\n }", "function render () {\n return (this[_DOM] || (this[_DOM] = _template(this))).view\n}", "render() {\n return null;\n }", "render() {\n return null;\n }", "render() //we must define the render method\n {\n return (\n //wrap our conditional content in static stuff that needs to be there all the time\n <div>\n {this.renderContent()}\n </div>\n )\n }", "render(context)\n {\n throw new Error(\"Not Implenemted\")\n }", "render() {\n let output =\n this.getHelperWordsBefore() +\n \" \" +\n this.renderForms()\n .map((i) => `<b>${i}</b>`)\n .join(\" / \") +\n this.getHelperWordsAfter();\n output = output.trim();\n\n // const highlight = options?.highlight\n // if (highlight && this.is(highlight)) {\n // output = `<span class=\"highlight\">${output}</span>`\n // }\n\n return output;\n }", "function render() {\n renderRegistry();\n renderDirectory();\n renderOverride();\n}", "render() { return super.render(); }", "getClassName(){return \"Core.UI.Render.RenderHelper\";}", "render(){\n //Every render method always return HTML\n return <h1>Welcome to Myclass</h1>;\n }", "function render() {\n let bigString;\n console.log('render fxn ran')\n if (store.view === 'landing') {\n bigString = generateTitleTemplate(store);\n\n }\n else if (store.view === 'question') {\n bigString = generateQuestionTemplate(store);\n\n }\n else if (store.view === 'feedback') {\n bigString = generateFeedbackTemplate(store)\n\n }\n else if (store.view === 'results') {\n bigString = generateResultsTemplate(store);\n\n }\n $('main').html(bigString);\n\n //attach event listeners\n\n\n}", "renderPage() {}", "render() {\n return null;\n }", "render() {\n return null;\n }", "render() {\n return null;\n }", "render() {\n return null;\n }", "render() {\n return null;\n }", "render() {\n return null;\n }", "renderPrep() {\n }", "render() {\n\n return (\n <div>\n {this.renderContent()}\n </div>\n );\n \n }", "render() {\n return (\n <div className=\"border red\">\n {this.renderHelper()}\n </div>\n );\n }", "render() {\n return super.render();\n }", "returnRenderText() {\n /*-- add heading part of seating chart --*/\n let layout = /*html*/`\n <div class=\"seating-container\">\n <div class=\"buffer\"></div>\n <div class=\"movie-details-row\">\n <em>${bookingTempStore.showingDetails.film}: ${bookingTempStore.showingDetails.date} (${bookingTempStore.showingDetails.time})</em>\n </div>\n <div class=\"screen-row\">\n <div></div>\n <h1>BIODUK</h1>\n <div></div>\n </div>\n <div class=\"seating-rows-container\">\n `\n /*-- add seating/checkboxes part of seating chart --*/\n layout += this.seatingChart();\n /*-- closing tags and footer part of seating chart --*/\n layout += /*html*/`\n </div>\n <div class=\"text-row\">\n <em>Välj din plats</em>\n </div>\n <div class=\"age-btn-row\">\n `\n layout += this.ageButtons();\n layout += /*html*/`\n </div>\n <div class=\"button-row\">\n ${BookingUtilityFunctions.bookingPriceButton()}\n </div>\n <div class=\"buffer\"></div>\n </div>\n `\n return layout;\n }", "function nullRender() { return null; }", "render()\n {\n return template;\n }", "yourMethodHere() {\n // any display logic, style, conditional rendering etc\n }", "function TextRenderer(){}// no need for block level renderers", "render() {\n return html`\n <article>\n ${this.label}\n </article>`;\n }", "render() {\r\n return;\r\n }", "function init() { render(this); }", "render() {\n return super.render();\n }", "render() {\n return super.render();\n }", "function render(){ \n console.log('`render function` ran');\n const createdHtml = generateHtml(STORE); \n $('main').html(createdHtml);\n}", "render() {\n if (this.renderer) {\n this.renderer.call(this.owner, this.content, this.owner, this.model);\n }\n }", "renderContent() {\n return null;\n }", "function render() {\r\n let content = '';\r\n if (STORE.view === 'home') {\r\n $('main').html(welcomePage());\r\n }\r\n else if (STORE.view === 'question') {\r\n content = questionAsked();\r\n content += generateAnswers();\r\n content += questionAndScoreStanding();\r\n $('main').html(`<form>${content}</form>`);\r\n } else if (STORE.view === 'feedback') {\r\n answerFeedback();\r\n } else if (STORE.view === 'score') {\r\n finalScore();\r\n }\r\n}", "Render(){\n throw new Error(\"Render() method must be implemented in child!\");\n }", "renderScreenContent(){}", "onBeforeRendering() {}", "function render() {\n\t\treturn graphTpl;\n\t}", "function render(model) {\n const {\n mount\n } = model;\n\n container(mount).innerHTML = 'sometext'\n }", "render(data, option_, callback_) {\n\t let option = option_;\n\t let callback = callback_;\n\t let html = '';\n\t const fn = this.fn;\n\t const config = this.config;\n\t if (typeof option === 'function') {\n\t callback = option;\n\t option = null;\n\t }\n\t option = option || {};\n\t if (!callback) {\n\t callback = (error_, ret) => {\n\t let error = error_;\n\t if (error) {\n\t if (!(error instanceof Error)) {\n\t error = new Error(error);\n\t }\n\t throw error;\n\t }\n\t html = ret;\n\t };\n\t }\n\t let name = this.config.name;\n\t if (!name && fn && fn.TPL_NAME) {\n\t name = fn.TPL_NAME;\n\t }\n\t let scope;\n\t if (data instanceof Scope) {\n\t scope = data;\n\t } else {\n\t scope = new Scope(data);\n\t }\n\t const buffer = new LinkedBuffer(callback, config).head;\n\t const tpl = new TplWrap(name, {\n\t commands: option.commands\n\t }, this, scope, buffer, name, fn);\n\t buffer.tpl = tpl;\n\t if (!fn) {\n\t config.loader.load(tpl, (err, fn2) => {\n\t if (fn2) {\n\t tpl.fn = this.fn = fn2;\n\t renderTpl(tpl);\n\t } else if (err) {\n\t buffer.error(err);\n\t }\n\t });\n\t return html;\n\t }\n\t renderTpl(tpl);\n\t return html;\n\t }", "function render(){\n\tvar src = \"\"\n\tfor(i in TodoList.items) src += ItemTemplate(TodoList.items[i]);\n\tel.innerHTML = src;\n}", "function render(){\n let html='';\n if (store.quizStarted === false){\n html = generateStartPage();\n }else if (store.giveFeedback === true){\n html = generateQuestionsPage();\n } else if (store.giveFeedback === false && store.questionNumber === store.questions.length -1){\n html = generateLastPage();\n }\n else {\n html= generateRightWrong();\n }\n \n $('main').html(html);\n}", "function wrapRender(opts) {\n\t opts.render = render$1(opts);\n\t}", "function render() {\n\n const renderedString = createRenderString(store);\n\n // insert html into DOM\n $('main').html(renderedString);\n}", "function render(view, info){\n return `VIEW NAME: ${view} \\nADDITIONAL INFO: ${info}`;\n}", "render(){\n\n //retorna el template usando el html del tag del template, crea los elementos en el dom\n return html`\n <div>Hello Word!!</div>\n `;\n }", "function render(element) {\n return {\n test: function(testFunc){\n return function(){\n testFunc(jsxTemplating.render(element));\n };\n\t}\n };\n }", "function nullRender() {\r\n return null;\r\n}", "function nullRender() {\r\n return null;\r\n}", "render(){\n return `<li>${this.text}</li>`\n }", "render() {\n return html` ${this.toolbarTemplate} `;\n }" ]
[ "0.81951976", "0.797086", "0.797086", "0.797086", "0.79466", "0.79466", "0.7533175", "0.7533175", "0.74335504", "0.7409195", "0.7390453", "0.7383342", "0.7373111", "0.7324088", "0.7324088", "0.7256009", "0.7256009", "0.7075014", "0.70568293", "0.7052554", "0.7010985", "0.7010954", "0.7005714", "0.69305074", "0.6920901", "0.6920404", "0.68977755", "0.6869812", "0.6853033", "0.6853033", "0.6853033", "0.68323284", "0.68323284", "0.68300706", "0.67742443", "0.6771025", "0.67524034", "0.6734932", "0.6733651", "0.67132944", "0.67108405", "0.66839546", "0.66788167", "0.66635036", "0.6662645", "0.66395086", "0.6616579", "0.6616579", "0.6574594", "0.65516686", "0.65516686", "0.65254396", "0.64775306", "0.64758307", "0.6412163", "0.6404171", "0.638774", "0.6386144", "0.63435835", "0.63245213", "0.6310696", "0.6310696", "0.6310696", "0.6310696", "0.6310696", "0.6310696", "0.63025826", "0.6294794", "0.6292516", "0.6255817", "0.6254246", "0.62459105", "0.62449837", "0.6233547", "0.6229666", "0.62183195", "0.61981225", "0.61729854", "0.6165064", "0.6165064", "0.6163427", "0.6162565", "0.6159705", "0.61485976", "0.61484945", "0.61339647", "0.61329424", "0.61317277", "0.6102828", "0.6098624", "0.6096634", "0.6094014", "0.60878015", "0.6085391", "0.6083491", "0.6053332", "0.6035129", "0.6024441", "0.6024441", "0.60242635", "0.6012403" ]
0.0
-1
Runtime helper for resolving filters
function resolveFilter (id) { return resolveAsset(this.$options, 'filters', id, true) || identity }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "applyFindFilters(filters) { throw 'Not Implemented' }", "function resolveFilter(id){return resolveAsset(this.$options,'filters',id,true)||identity;}", "function resolveFilter(id){return resolveAsset(this.$options,'filters',id,true)||identity;}", "function executeOnFilters(fn) {\n\t var appState = getAppState();\n\t var globalFilters = [];\n\t var appFilters = [];\n\n\t if (globalState.filters) globalFilters = globalState.filters;\n\t if (appState && appState.filters) appFilters = appState.filters;\n\n\t globalFilters.concat(appFilters).forEach(fn);\n\t }", "function resolveFilter (id) {\n\t return resolveAsset(this.$options, 'filters', id, true) || identity\n\t}", "function resolveFilter (id) {\n\t return resolveAsset(this.$options, 'filters', id, true) || identity\n\t}", "function resolveFilter (id) {\n\t return resolveAsset(this.$options, 'filters', id, true) || identity\n\t}", "function resolveFilter (id) {\n\t return resolveAsset(this.$options, 'filters', id, true) || identity\n\t}", "function resolveFilter (id) {\n\t return resolveAsset(this.$options, 'filters', id, true) || identity\n\t}", "get filters(){\n\t\treturn [controllerFilter];\n\t}", "function resolveFilter(id) {\n\t return resolveAsset(this.$options, 'filters', id, true) || identity;\n\t}", "function resolveFilter(id) {\n\t return resolveAsset(this.$options, 'filters', id, true) || identity;\n\t}", "function applyFilters()\n /* filter, filtered arg, arg2, ... */\n {\n var args = slice.call(arguments);\n var filter = args.shift();\n\n if ('string' === typeof filter) {\n return _runHook('filters', filter, args);\n }\n\n return MethodsAvailable;\n }", "function initCommonFilters() {\n Main.appModule\n .filter('zeroAsEmpty', [zeroAsEmpty])\n .filter('dateAsString', [dateAsStringFilter])\n .filter('longText', [longTextFilter]);\n }", "function testFilter(self) {\n if (self.filters.tagOptions == \"all\") {\n return function(item) {\n console.log(\"filter run because all\");\n return true;\n }\n } else {\n return function(item) {\n console.log(\"filter run because any\");\n return true;\n }\n }\n}", "applyFindFiltersForVirtual(filters) { throw 'Not Implemented'; }", "function resolveFilter (id) {\n return resolveAsset(this.$options, 'filters', id, true) || identity\n }", "function resolveFilter (id) {\n return resolveAsset(this.$options, 'filters', id, true) || identity\n }", "function resolveFilter (id) {\n return resolveAsset(this.$options, 'filters', id, true) || identity\n }", "function resolveFilter (id) {\n return resolveAsset(this.$options, 'filters', id, true) || identity\n }", "function resolveFilter (id) {\r\n return resolveAsset(this.$options, 'filters', id, true) || identity\r\n}", "function filterParamsToFns_(filters) {\n\n return _.map(filters, function(filterParam) {\n\n var filter = filterParam.filter || filterParam;\n\n if (_.isFunction(filter)) return filter;\n\n // Return the filter matching an attr\n if (_.isString(filter)) return getFilterFnForAttr_(filter);\n\n });\n\n }", "function resolveFilter (id) {\n return resolveAsset(this.$options, 'filters', id, true) || identity\n }", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}", "function setFilters() {}" ]
[ "0.69978595", "0.6792624", "0.6792624", "0.6602312", "0.6572347", "0.6572347", "0.6572347", "0.6572347", "0.6572347", "0.6559325", "0.6551497", "0.6551497", "0.6546134", "0.6533371", "0.64145756", "0.63767576", "0.6374046", "0.6374046", "0.6374046", "0.6374046", "0.63544434", "0.63488936", "0.6344382", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972", "0.6334972" ]
0.0
-1
Runtime helper for checking keyCodes from config. exposed as Vue.prototype._k passing in eventKeyName as last argument separately for backwards compat
function checkKeyCodes ( eventKeyCode, key, builtInKeyCode, eventKeyName, builtInKeyName ) { var mappedKeyCode = config.keyCodes[key] || builtInKeyCode; if (builtInKeyName && eventKeyName && !config.keyCodes[key]) { return isKeyNotMatch(builtInKeyName, eventKeyName) } else if (mappedKeyCode) { return isKeyNotMatch(mappedKeyCode, eventKeyCode) } else if (eventKeyName) { return hyphenate(eventKeyName) !== key } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkKeyCodes(eventKeyCode,key,builtInAlias,eventKeyName){var keyCodes=config.keyCodes[key]||builtInAlias;if(keyCodes){if(Array.isArray(keyCodes)){return keyCodes.indexOf(eventKeyCode)===-1;}else{return keyCodes!==eventKeyCode;}}else if(eventKeyName){return hyphenate(eventKeyName)!==key;}}", "function checkKeyCodes(eventKeyCode,key,builtInAlias,eventKeyName){var keyCodes=config.keyCodes[key]||builtInAlias;if(keyCodes){if(Array.isArray(keyCodes)){return keyCodes.indexOf(eventKeyCode)===-1;}else{return keyCodes!==eventKeyCode;}}else if(eventKeyName){return hyphenate(eventKeyName)!==key;}}", "function checkKeyCodes(eventKeyCode, key, builtInKeyCode, eventKeyName, builtInKeyName) {\n var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;\n // 如果没有在 vue keyCodes\n if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {\n // 事件中的key 不与 定义的key 相等\n return isKeyNotMatch(builtInKeyName, eventKeyName);\n }\n else if (mappedKeyCode) {\n return isKeyNotMatch(mappedKeyCode, eventKeyCode);\n }\n else if (eventKeyName) {\n return hyphenate(eventKeyName) !== key;\n }\n }", "function checkKeyCodes (\n eventKeyCode,\n key,\n builtInAlias,\n eventKeyName\n) {\n var keyCodes = config.keyCodes[key] || builtInAlias;\n if (keyCodes) {\n if (Array.isArray(keyCodes)) {\n return keyCodes.indexOf(eventKeyCode) === -1\n } else {\n return keyCodes !== eventKeyCode\n }\n } else if (eventKeyName) {\n return hyphenate(eventKeyName) !== key\n }\n}", "function checkKeyCodes (\n eventKeyCode,\n key,\n builtInAlias,\n eventKeyName\n) {\n var keyCodes = config.keyCodes[key] || builtInAlias;\n if (keyCodes) {\n if (Array.isArray(keyCodes)) {\n return keyCodes.indexOf(eventKeyCode) === -1\n } else {\n return keyCodes !== eventKeyCode\n }\n } else if (eventKeyName) {\n return hyphenate(eventKeyName) !== key\n }\n}", "function checkKeyCodes (\n eventKeyCode,\n key,\n builtInAlias,\n eventKeyName\n) {\n var keyCodes = config.keyCodes[key] || builtInAlias;\n if (keyCodes) {\n if (Array.isArray(keyCodes)) {\n return keyCodes.indexOf(eventKeyCode) === -1\n } else {\n return keyCodes !== eventKeyCode\n }\n } else if (eventKeyName) {\n return hyphenate(eventKeyName) !== key\n }\n}", "function checkKeyCodes (\n eventKeyCode,\n key,\n builtInAlias,\n eventKeyName\n) {\n var keyCodes = config.keyCodes[key] || builtInAlias;\n if (keyCodes) {\n if (Array.isArray(keyCodes)) {\n return keyCodes.indexOf(eventKeyCode) === -1\n } else {\n return keyCodes !== eventKeyCode\n }\n } else if (eventKeyName) {\n return hyphenate(eventKeyName) !== key\n }\n}", "function checkKeyCodes (\n eventKeyCode,\n key,\n builtInAlias,\n eventKeyName\n) {\n var keyCodes = config.keyCodes[key] || builtInAlias;\n if (keyCodes) {\n if (Array.isArray(keyCodes)) {\n return keyCodes.indexOf(eventKeyCode) === -1\n } else {\n return keyCodes !== eventKeyCode\n }\n } else if (eventKeyName) {\n return hyphenate(eventKeyName) !== key\n }\n}", "function checkKeyCodes (\n eventKeyCode,\n key,\n builtInAlias,\n eventKeyName\n) {\n var keyCodes = config.keyCodes[key] || builtInAlias;\n if (keyCodes) {\n if (Array.isArray(keyCodes)) {\n return keyCodes.indexOf(eventKeyCode) === -1\n } else {\n return keyCodes !== eventKeyCode\n }\n } else if (eventKeyName) {\n return hyphenate(eventKeyName) !== key\n }\n}", "function checkKeyCodes (\n eventKeyCode,\n key,\n builtInAlias,\n eventKeyName\n) {\n var keyCodes = config.keyCodes[key] || builtInAlias;\n if (keyCodes) {\n if (Array.isArray(keyCodes)) {\n return keyCodes.indexOf(eventKeyCode) === -1\n } else {\n return keyCodes !== eventKeyCode\n }\n } else if (eventKeyName) {\n return hyphenate(eventKeyName) !== key\n }\n}", "function checkKeyCodes (\n eventKeyCode,\n key,\n builtInAlias,\n eventKeyName\n) {\n var keyCodes = config.keyCodes[key] || builtInAlias;\n if (keyCodes) {\n if (Array.isArray(keyCodes)) {\n return keyCodes.indexOf(eventKeyCode) === -1\n } else {\n return keyCodes !== eventKeyCode\n }\n } else if (eventKeyName) {\n return hyphenate(eventKeyName) !== key\n }\n}", "function checkKeyCodes (\n eventKeyCode,\n key,\n builtInAlias,\n eventKeyName\n) {\n var keyCodes = config.keyCodes[key] || builtInAlias;\n if (keyCodes) {\n if (Array.isArray(keyCodes)) {\n return keyCodes.indexOf(eventKeyCode) === -1\n } else {\n return keyCodes !== eventKeyCode\n }\n } else if (eventKeyName) {\n return hyphenate(eventKeyName) !== key\n }\n}", "function checkKeyCodes (\n eventKeyCode,\n key,\n builtInAlias,\n eventKeyName\n) {\n var keyCodes = config.keyCodes[key] || builtInAlias;\n if (keyCodes) {\n if (Array.isArray(keyCodes)) {\n return keyCodes.indexOf(eventKeyCode) === -1\n } else {\n return keyCodes !== eventKeyCode\n }\n } else if (eventKeyName) {\n return hyphenate(eventKeyName) !== key\n }\n}", "function checkKeyCodes (\n eventKeyCode,\n key,\n builtInAlias,\n eventKeyName\n) {\n var keyCodes = config.keyCodes[key] || builtInAlias;\n if (keyCodes) {\n if (Array.isArray(keyCodes)) {\n return keyCodes.indexOf(eventKeyCode) === -1\n } else {\n return keyCodes !== eventKeyCode\n }\n } else if (eventKeyName) {\n return hyphenate(eventKeyName) !== key\n }\n}", "function checkKeyCodes (\n eventKeyCode,\n key,\n builtInAlias,\n eventKeyName\n) {\n var keyCodes = config.keyCodes[key] || builtInAlias;\n if (keyCodes) {\n if (Array.isArray(keyCodes)) {\n return keyCodes.indexOf(eventKeyCode) === -1\n } else {\n return keyCodes !== eventKeyCode\n }\n } else if (eventKeyName) {\n return hyphenate(eventKeyName) !== key\n }\n}", "function checkKeyCodes (\n eventKeyCode,\n key,\n builtInAlias,\n eventKeyName\n) {\n var keyCodes = config.keyCodes[key] || builtInAlias;\n if (keyCodes) {\n if (Array.isArray(keyCodes)) {\n return keyCodes.indexOf(eventKeyCode) === -1\n } else {\n return keyCodes !== eventKeyCode\n }\n } else if (eventKeyName) {\n return hyphenate(eventKeyName) !== key\n }\n}", "function checkKeyCodes(eventKeyCode, key, builtInAlias, eventKeyName) {\n var keyCodes = config.keyCodes[key] || builtInAlias;\n if (keyCodes) {\n if (Array.isArray(keyCodes)) {\n return keyCodes.indexOf(eventKeyCode) === -1;\n } else {\n return keyCodes !== eventKeyCode;\n }\n } else if (eventKeyName) {\n return hyphenate(eventKeyName) !== key;\n }\n }", "function checkKeyCodes (\n eventKeyCode,\n key,\n builtInKeyCode,\n eventKeyName,\n builtInKeyName\n ) {\n var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;\n if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {\n return isKeyNotMatch(builtInKeyName, eventKeyName)\n } else if (mappedKeyCode) {\n return isKeyNotMatch(mappedKeyCode, eventKeyCode)\n } else if (eventKeyName) {\n return hyphenate(eventKeyName) !== key\n }\n }", "function checkKeyCodes (\n eventKeyCode,\n key,\n builtInKeyCode,\n eventKeyName,\n builtInKeyName\n ) {\n var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;\n if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {\n return isKeyNotMatch(builtInKeyName, eventKeyName)\n } else if (mappedKeyCode) {\n return isKeyNotMatch(mappedKeyCode, eventKeyCode)\n } else if (eventKeyName) {\n return hyphenate(eventKeyName) !== key\n }\n }", "function checkKeyCodes (\n eventKeyCode,\n key,\n builtInKeyCode,\n eventKeyName,\n builtInKeyName\n ) {\n var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;\n if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {\n return isKeyNotMatch(builtInKeyName, eventKeyName)\n } else if (mappedKeyCode) {\n return isKeyNotMatch(mappedKeyCode, eventKeyCode)\n } else if (eventKeyName) {\n return hyphenate(eventKeyName) !== key\n }\n }", "function checkKeyCodes (\n eventKeyCode,\n key,\n builtInKeyCode,\n eventKeyName,\n builtInKeyName\n ) {\n var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;\n if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {\n return isKeyNotMatch(builtInKeyName, eventKeyName)\n } else if (mappedKeyCode) {\n return isKeyNotMatch(mappedKeyCode, eventKeyCode)\n } else if (eventKeyName) {\n return hyphenate(eventKeyName) !== key\n }\n }", "function checkKeyCodes (\n eventKeyCode,\n key,\n builtInKeyCode,\n eventKeyName,\n builtInKeyName\n ) {\n var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;\n if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {\n return isKeyNotMatch(builtInKeyName, eventKeyName)\n } else if (mappedKeyCode) {\n return isKeyNotMatch(mappedKeyCode, eventKeyCode)\n } else if (eventKeyName) {\n return hyphenate(eventKeyName) !== key\n }\n }", "function checkKeyCodes (\n eventKeyCode,\n key,\n builtInKeyCode,\n eventKeyName,\n builtInKeyName\n) {\n var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;\n if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {\n return isKeyNotMatch(builtInKeyName, eventKeyName)\n } else if (mappedKeyCode) {\n return isKeyNotMatch(mappedKeyCode, eventKeyCode)\n } else if (eventKeyName) {\n return hyphenate(eventKeyName) !== key\n }\n return eventKeyCode === undefined\n}", "function checkKeyCodes (\n eventKeyCode,\n key,\n builtInKeyCode,\n eventKeyName,\n builtInKeyName\n) {\n var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;\n if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {\n return isKeyNotMatch(builtInKeyName, eventKeyName)\n } else if (mappedKeyCode) {\n return isKeyNotMatch(mappedKeyCode, eventKeyCode)\n } else if (eventKeyName) {\n return hyphenate(eventKeyName) !== key\n }\n return eventKeyCode === undefined\n}", "function checkKeyCodes (\n eventKeyCode,\n key,\n builtInKeyCode,\n eventKeyName,\n builtInKeyName\n) {\n var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;\n if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {\n return isKeyNotMatch(builtInKeyName, eventKeyName)\n } else if (mappedKeyCode) {\n return isKeyNotMatch(mappedKeyCode, eventKeyCode)\n } else if (eventKeyName) {\n return hyphenate(eventKeyName) !== key\n }\n return eventKeyCode === undefined\n}", "function checkKeyCodes (\n eventKeyCode,\n key,\n builtInKeyCode,\n eventKeyName,\n builtInKeyName\n) {\n var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;\n if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {\n return isKeyNotMatch(builtInKeyName, eventKeyName)\n } else if (mappedKeyCode) {\n return isKeyNotMatch(mappedKeyCode, eventKeyCode)\n } else if (eventKeyName) {\n return hyphenate(eventKeyName) !== key\n }\n return eventKeyCode === undefined\n}", "function checkKeyCodes (\n eventKeyCode,\n key,\n builtInKeyCode,\n eventKeyName,\n builtInKeyName\n) {\n var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;\n if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {\n return isKeyNotMatch(builtInKeyName, eventKeyName)\n } else if (mappedKeyCode) {\n return isKeyNotMatch(mappedKeyCode, eventKeyCode)\n } else if (eventKeyName) {\n return hyphenate(eventKeyName) !== key\n }\n return eventKeyCode === undefined\n}", "function checkKeyCodes (\n eventKeyCode,\n key,\n builtInKeyCode,\n eventKeyName,\n builtInKeyName\n) {\n var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;\n if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {\n return isKeyNotMatch(builtInKeyName, eventKeyName)\n } else if (mappedKeyCode) {\n return isKeyNotMatch(mappedKeyCode, eventKeyCode)\n } else if (eventKeyName) {\n return hyphenate(eventKeyName) !== key\n }\n return eventKeyCode === undefined\n}", "function checkKeyCodes (\n eventKeyCode,\n key,\n builtInKeyCode,\n eventKeyName,\n builtInKeyName\n) {\n var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;\n if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {\n return isKeyNotMatch(builtInKeyName, eventKeyName)\n } else if (mappedKeyCode) {\n return isKeyNotMatch(mappedKeyCode, eventKeyCode)\n } else if (eventKeyName) {\n return hyphenate(eventKeyName) !== key\n }\n return eventKeyCode === undefined\n}", "function checkKeyCodes (\n eventKeyCode,\n key,\n builtInKeyCode,\n eventKeyName,\n builtInKeyName\n) {\n var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;\n if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {\n return isKeyNotMatch(builtInKeyName, eventKeyName)\n } else if (mappedKeyCode) {\n return isKeyNotMatch(mappedKeyCode, eventKeyCode)\n } else if (eventKeyName) {\n return hyphenate(eventKeyName) !== key\n }\n return eventKeyCode === undefined\n}" ]
[ "0.7394007", "0.7394007", "0.71686095", "0.69838387", "0.69838387", "0.69838387", "0.69838387", "0.69838387", "0.69838387", "0.69838387", "0.69838387", "0.69838387", "0.69838387", "0.69838387", "0.69838387", "0.69838387", "0.6928423", "0.69021493", "0.6880145", "0.6880145", "0.6880145", "0.6880145", "0.6850913", "0.6850913", "0.6850913", "0.6850913", "0.6850913", "0.6850913", "0.6850913", "0.6850913" ]
0.0
-1
Runtime helper for merging vbind="object" into a VNode's data.
function bindObjectProps ( data, tag, value, asProp, isSync ) { if (value) { if (!isObject(value)) { false && false; } else { if (Array.isArray(value)) { value = toObject(value); } var hash; var loop = function ( key ) { if ( key === 'class' || key === 'style' || isReservedAttribute(key) ) { hash = data; } else { var type = data.attrs && data.attrs.type; hash = asProp || config.mustUseProp(tag, type, key) ? data.domProps || (data.domProps = {}) : data.attrs || (data.attrs = {}); } var camelizedKey = camelize(key); var hyphenatedKey = hyphenate(key); if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) { hash[key] = value[key]; if (isSync) { var on = data.on || (data.on = {}); on[("update:" + key)] = function ($event) { value[key] = $event; }; } } }; for (var key in value) loop( key ); } } return data }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bindObjectProps(data,tag,value,asProp,isSync){if(value){if(!isObject(value)){\"development\"!=='production'&&warn('v-bind without argument expects an Object or Array value',this);}else{if(Array.isArray(value)){value=toObject(value);}var hash;var loop=function loop(key){if(key==='class'||key==='style'||isReservedAttribute(key)){hash=data;}else{var type=data.attrs&&data.attrs.type;hash=asProp||config.mustUseProp(tag,type,key)?data.domProps||(data.domProps={}):data.attrs||(data.attrs={});}if(!(key in hash)){hash[key]=value[key];if(isSync){var on=data.on||(data.on={});on[\"update:\"+key]=function($event){value[key]=$event;};}}};for(var key in value){loop(key);}}}return data;}", "function bindObjectProps(data,tag,value,asProp,isSync){if(value){if(!isObject(value)){\"development\"!=='production'&&warn('v-bind without argument expects an Object or Array value',this);}else{if(Array.isArray(value)){value=toObject(value);}var hash;var loop=function loop(key){if(key==='class'||key==='style'||isReservedAttribute(key)){hash=data;}else{var type=data.attrs&&data.attrs.type;hash=asProp||config.mustUseProp(tag,type,key)?data.domProps||(data.domProps={}):data.attrs||(data.attrs={});}if(!(key in hash)){hash[key]=value[key];if(isSync){var on=data.on||(data.on={});on[\"update:\"+key]=function($event){value[key]=$event;};}}};for(var key in value){loop(key);}}}return data;}", "function bindObjectProps(data, tag, value, asProp, isSync) {\n\t if (value) {\n\t if (!isObject(value)) {\n\t process.env.NODE_ENV !== 'production' && warn('v-bind without argument expects an Object or Array value', this);\n\t } else {\n\t if (Array.isArray(value)) {\n\t value = toObject(value);\n\t }\n\t var hash;\n\t var loop = function loop(key) {\n\t if (key === 'class' || key === 'style' || isReservedAttribute(key)) {\n\t hash = data;\n\t } else {\n\t var type = data.attrs && data.attrs.type;\n\t hash = asProp || config.mustUseProp(tag, type, key) ? data.domProps || (data.domProps = {}) : data.attrs || (data.attrs = {});\n\t }\n\t if (!(key in hash)) {\n\t hash[key] = value[key];\n\t\n\t if (isSync) {\n\t var on = data.on || (data.on = {});\n\t on[\"update:\" + key] = function ($event) {\n\t value[key] = $event;\n\t };\n\t }\n\t }\n\t };\n\t\n\t for (var key in value) {\n\t loop(key);\n\t }\n\t }\n\t }\n\t return data;\n\t}", "function bindObjectProps(data, tag, value, asProp, isSync) {\n\t if (value) {\n\t if (!isObject(value)) {\n\t process.env.NODE_ENV !== 'production' && warn('v-bind without argument expects an Object or Array value', this);\n\t } else {\n\t if (Array.isArray(value)) {\n\t value = toObject(value);\n\t }\n\t var hash;\n\t var loop = function loop(key) {\n\t if (key === 'class' || key === 'style' || isReservedAttribute(key)) {\n\t hash = data;\n\t } else {\n\t var type = data.attrs && data.attrs.type;\n\t hash = asProp || config.mustUseProp(tag, type, key) ? data.domProps || (data.domProps = {}) : data.attrs || (data.attrs = {});\n\t }\n\t if (!(key in hash)) {\n\t hash[key] = value[key];\n\n\t if (isSync) {\n\t var on = data.on || (data.on = {});\n\t on[\"update:\" + key] = function ($event) {\n\t value[key] = $event;\n\t };\n\t }\n\t }\n\t };\n\n\t for (var key in value) {\n\t loop(key);\n\t }\n\t }\n\t }\n\t return data;\n\t}", "function rtdbBindAsObject(_a, extraOptions) {\r\n var vm = _a.vm, key = _a.key, document = _a.document, resolve = _a.resolve, reject = _a.reject, ops = _a.ops;\r\n if (extraOptions === void 0) { extraOptions = DEFAULT_OPTIONS; }\r\n var options = Object.assign({}, DEFAULT_OPTIONS, extraOptions);\r\n var listener = document.on('value', function (snapshot) {\r\n ops.set(vm, key, options.serialize(snapshot));\r\n }, reject);\r\n document.once('value', resolve);\r\n return function (reset) {\r\n document.off('value', listener);\r\n if (reset !== false) {\r\n var value = typeof reset === 'function' ? reset() : null;\r\n ops.set(vm, key, value);\r\n }\r\n };\r\n}", "function createBinding(obj, template) {\n if (!TEMPLATEPROCESSEDMAP.get(template)) {\n processTemplate(template);\n };\n var clone = TEMPLATEPROCESSEDMAP.get(template).cloneNode(true);\n var target = { };\n var proxy = new Proxy(target, PROXYOBJECT);\n var context = createContext(clone, template);\n var startNode = createAnchor(0, 'proxy');\n var endNode = createAnchor(1, 'proxy');\n var nodes = [startNode, endNode];\n var mount = obj[SYMBOLMOUNT];\n var unmount = obj[SYMBOLUNMOUNT];\n var move = obj[SYMBOLMOVE];\n var fragment = document.createDocumentFragment();\n if (unmount) {\n PROXYUNMOUNTMAP.set(proxy, unmount);\n };\n if (move) {\n PROXYMOVEMAP.set(proxy, move);\n };\n TARGETCONTEXTMAP.set(target, context);\n TARGETEVENTMAP.set(target, { });\n TARGETDELIMITERMAP.set(target, { });\n for (var key in obj) {\n if (key in context) {\n continue;\n };\n target[key] = obj[key];\n };\n for (var key in context) {\n setProperty(target, key, obj[key], proxy, true);\n };\n if (mount) {\n mount.call(proxy, clone);\n };\n fragment.appendChild(startNode);\n fragment.appendChild(clone);\n fragment.appendChild(endNode);\n PROXYDELIMITERMAP.set(proxy, nodes);\n __PS_MV_REG = [];\n return [proxy, fragment];\n}", "function bindObjectProps(data, tag, value, asProp, isSync) {\n if (value) {\n if (!isObject(value)) {\n \"development\" !== 'production' && warn('v-bind without argument expects an Object or Array value', this);\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function (key) {\n if (key === 'class' || key === 'style' || isReservedAttribute(key)) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key) ? data.domProps || (data.domProps = {}) : data.attrs || (data.attrs = {});\n }\n if (!(key in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[\"update:\" + key] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop(key);\n }\n }\n return data;\n }", "function bindObjectProps(data, tag, value, asProp, isSync) {\n if (value) {\n if (!isObject(value)) {\n warn('v-bind without argument expects an Object or Array value', this);\n }\n else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash = void 0;\n var _loop_1 = function (key) {\n if (key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)) {\n hash = data;\n }\n else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n if (!(key in hash) && !(camelizedKey in hash)) {\n hash[key] = value[key];\n if (isSync) {\n var on = data.on || (data.on = {});\n on[\"update:\" + camelizedKey] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n for (var key in value) {\n _loop_1(key);\n }\n }\n }\n return data;\n }", "function bindObjectProps (\n\t data,\n\t tag,\n\t value,\n\t asProp\n\t) {\n\t if (value) {\n\t if (!isObject(value)) {\n\t \"development\" !== 'production' && warn(\n\t 'v-bind without argument expects an Object or Array value',\n\t this\n\t );\n\t } else {\n\t if (Array.isArray(value)) {\n\t value = toObject(value);\n\t }\n\t for (var key in value) {\n\t if (key === 'class' || key === 'style') {\n\t data[key] = value[key];\n\t } else {\n\t var type = data.attrs && data.attrs.type;\n\t var hash = asProp || config.mustUseProp(tag, type, key)\n\t ? data.domProps || (data.domProps = {})\n\t : data.attrs || (data.attrs = {});\n\t hash[key] = value[key];\n\t }\n\t }\n\t }\n\t }\n\t return data\n\t}", "function bindObjectProps(data, tag, value, asProp, isSync) {\n if (value) {\n if (!isObject(value)) {\n \"development\" !== 'production' && warn('v-bind without argument expects an Object or Array value', this);\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function (key) {\n if (key === 'class' || key === 'style' || isReservedAttribute(key)) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key) ? data.domProps || (data.domProps = {}) : data.attrs || (data.attrs = {});\n }\n if (!(key in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[\"update:\" + key] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop(key);\n }\n }\n return data;\n}", "function bindObjectProps(data, tag, value, asProp, isSync) {\n if (value) {\n if (!isObject(value)) {\n \"development\" !== 'production' && warn('v-bind without argument expects an Object or Array value', this);\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function loop(key) {\n if (key === 'class' || key === 'style' || isReservedAttribute(key)) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key) ? data.domProps || (data.domProps = {}) : data.attrs || (data.attrs = {});\n }\n if (!(key in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[\"update:\" + key] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) {\n loop(key);\n }\n }\n }\n return data;\n}", "function bindObjectProps(data, tag, value, asProp, isSync) {\n if (value) {\n if (!isObject(value)) {\n 'development' !== 'production' && warn('v-bind without argument expects an Object or Array value', this);\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function (key) {\n if (key === 'class' || key === 'style' || isReservedAttribute(key)) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key) ? data.domProps || (data.domProps = {}) : data.attrs || (data.attrs = {});\n }\n if (!(key in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[\"update:\" + key] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop(key);\n }\n }\n return data;\n}", "function bindObjectProps(data, tag, value, asProp, isSync) {\n if (value) {\n if (!isObject(value)) {\n process.env.NODE_ENV !== 'production' && warn('v-bind without argument expects an Object or Array value', this);\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function loop(key) {\n if (key === 'class' || key === 'style' || isReservedAttribute(key)) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key) ? data.domProps || (data.domProps = {}) : data.attrs || (data.attrs = {});\n }\n if (!(key in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[\"update:\" + key] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) {\n loop(key);\n }\n }\n }\n return data;\n}", "function bindObjectProps(data, tag, value, asProp, isSync) {\n if (value) {\n if (!isObject(value)) {\n process.env.NODE_ENV !== 'production' && warn('v-bind without argument expects an Object or Array value', this);\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function loop(key) {\n if (key === 'class' || key === 'style' || isReservedAttribute(key)) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key) ? data.domProps || (data.domProps = {}) : data.attrs || (data.attrs = {});\n }\n if (!(key in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[\"update:\" + key] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) {\n loop(key);\n }\n }\n }\n return data;\n}", "function bindObjectProps(data, tag, value, asProp, isSync) {\n if (value) {\n if (!isObject(value)) {\n process.env.NODE_ENV !== 'production' && warn('v-bind without argument expects an Object or Array value', this);\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function loop(key) {\n if (key === 'class' || key === 'style' || isReservedAttribute(key)) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key) ? data.domProps || (data.domProps = {}) : data.attrs || (data.attrs = {});\n }\n if (!(key in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[\"update:\" + key] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) {\n loop(key);\n }\n }\n }\n return data;\n}", "function bindObjectProps(data, tag, value, asProp, isSync) {\n if (value) {\n if (!isObject(value)) {\n process.env.NODE_ENV !== 'production' && warn('v-bind without argument expects an Object or Array value', this);\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function (key) {\n if (key === 'class' || key === 'style' || isReservedAttribute(key)) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key) ? data.domProps || (data.domProps = {}) : data.attrs || (data.attrs = {});\n }\n if (!(key in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[\"update:\" + key] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop(key);\n }\n }\n return data;\n}", "function bindObjectProps(data, tag, value, asProp, isSync) {\n if (value) {\n if (!isObject(value)) {\n process.env.NODE_ENV !== 'production' && warn('v-bind without argument expects an Object or Array value', this);\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function (key) {\n if (key === 'class' || key === 'style' || isReservedAttribute(key)) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key) ? data.domProps || (data.domProps = {}) : data.attrs || (data.attrs = {});\n }\n if (!(key in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[\"update:\" + key] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop(key);\n }\n }\n return data;\n}", "function bindObjectProps (\n\t data,\n\t tag,\n\t value,\n\t asProp\n\t) {\n\t if (value) {\n\t if (!isObject(value)) {\n\t (\"development\") !== 'production' && warn(\n\t 'v-bind without argument expects an Object or Array value',\n\t this\n\t );\n\t } else {\n\t if (Array.isArray(value)) {\n\t value = toObject(value);\n\t }\n\t var hash;\n\t for (var key in value) {\n\t if (key === 'class' || key === 'style') {\n\t hash = data;\n\t } else {\n\t var type = data.attrs && data.attrs.type;\n\t hash = asProp || config.mustUseProp(tag, type, key)\n\t ? data.domProps || (data.domProps = {})\n\t : data.attrs || (data.attrs = {});\n\t }\n\t if (!(key in hash)) {\n\t hash[key] = value[key];\n\t }\n\t }\n\t }\n\t }\n\t return data\n\t}", "function bindObjectProps(data, tag, value, asProp, isSync) {\n if (value) {\n if (!isObject(value)) {\n \"development\" !== 'production' && warn('v-bind without argument expects an Object or Array value', this);\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n\n var hash;\n\n var loop = function (key) {\n if (key === 'class' || key === 'style' || isReservedAttribute(key)) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key) ? data.domProps || (data.domProps = {}) : data.attrs || (data.attrs = {});\n }\n\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n\n on[\"update:\" + key] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop(key);\n }\n }\n\n return data;\n}", "function bindObjectProps(data, tag, value, asProp, isSync) {\n if (value) {\n if (!isObject(value)) {\n warn('v-bind without argument expects an Object or Array value', this);\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n\n var hash;\n\n var loop = function loop(key) {\n if (key === 'class' || key === 'style' || isReservedAttribute(key)) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key) ? data.domProps || (data.domProps = {}) : data.attrs || (data.attrs = {});\n }\n\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n\n on[\"update:\" + key] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) {\n loop(key);\n }\n }\n }\n\n return data;\n }", "function bindObjectProps(data, tag, value, asProp, isSync) {\n if (value) {\n if (!isObject(value)) {\n true && warn('v-bind without argument expects an Object or Array value', this);\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n\n var hash;\n\n var loop = function loop(key) {\n if (key === 'class' || key === 'style' || isReservedAttribute(key)) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key) ? data.domProps || (data.domProps = {}) : data.attrs || (data.attrs = {});\n }\n\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n\n on[\"update:\" + key] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) {\n loop(key);\n }\n }\n }\n\n return data;\n}", "function bindObjectProps (\n\t data,\n\t tag,\n\t value,\n\t asProp\n\t) {\n\t if (value) {\n\t if (!isObject(value)) {\n\t \"development\" !== 'production' && warn(\n\t 'v-bind without argument expects an Object or Array value',\n\t this\n\t );\n\t } else {\n\t if (Array.isArray(value)) {\n\t value = toObject(value);\n\t }\n\t var hash;\n\t for (var key in value) {\n\t if (key === 'class' || key === 'style') {\n\t hash = data;\n\t } else {\n\t var type = data.attrs && data.attrs.type;\n\t hash = asProp || config.mustUseProp(tag, type, key)\n\t ? data.domProps || (data.domProps = {})\n\t : data.attrs || (data.attrs = {});\n\t }\n\t if (!(key in hash)) {\n\t hash[key] = value[key];\n\t }\n\t }\n\t }\n\t }\n\t return data\n\t}", "function bindObjectProps (\n\t data,\n\t tag,\n\t value,\n\t asProp\n\t) {\n\t if (value) {\n\t if (!isObject(value)) {\n\t \"development\" !== 'production' && warn(\n\t 'v-bind without argument expects an Object or Array value',\n\t this\n\t );\n\t } else {\n\t if (Array.isArray(value)) {\n\t value = toObject(value);\n\t }\n\t var hash;\n\t for (var key in value) {\n\t if (key === 'class' || key === 'style') {\n\t hash = data;\n\t } else {\n\t var type = data.attrs && data.attrs.type;\n\t hash = asProp || config.mustUseProp(tag, type, key)\n\t ? data.domProps || (data.domProps = {})\n\t : data.attrs || (data.attrs = {});\n\t }\n\t if (!(key in hash)) {\n\t hash[key] = value[key];\n\t }\n\t }\n\t }\n\t }\n\t return data\n\t}", "function Obj() {\n\tevents.EventEmitter.call(this);\n\tthis._data = {}; // Stores data\n\tthis._virtuals = {}; // Stores virtuals\n\tthis._type = {}; // Stores data types\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp\n) {\n if (value) {\n if (!isObject(value)) {\n process.env.NODE_ENV !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n for (var key in value) {\n if (key === 'class' || key === 'style') {\n data[key] = value[key];\n } else {\n var type = data.attrs && data.attrs.type;\n var hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n hash[key] = value[key];\n }\n }\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp\n) {\n if (value) {\n if (!isObject(value)) {\n process.env.NODE_ENV !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n for (var key in value) {\n if (key === 'class' || key === 'style') {\n data[key] = value[key];\n } else {\n var type = data.attrs && data.attrs.type;\n var hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n hash[key] = value[key];\n }\n }\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n ) {\n if (value) {\n if (!isObject(value)) {\n \"debug\" !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n \n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n \n for (var key in value) loop( key );\n }\n }\n return data\n }", "function copyVar(v){\n var newV = getVarType(v) === \"object\"? copyObj():\n getVarType(v) === \"array\"? v.concat([]):\n v;\n return newV;\n }", "function objExtend(data) {\n\tvar i, j;\n\tfor (i in data) {\n\t\tif (!bobj[i]) bobj[i] = {};\n\t\tfor (j in data[i]) {\n\t\t\tif (!bobj[i][j]) bobj[i][j] = 0;\n\t\t\tbobj[i][j] += data[i][j];\n\t\t}\n\t}\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp\n) {\n if (value) {\n if (!isObject(value)) {\n \"production\" !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n for (var key in value) {\n if (key === 'class' || key === 'style') {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n if (!(key in hash)) {\n hash[key] = value[key];\n }\n }\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp\n) {\n if (value) {\n if (!isObject(value)) {\n \"production\" !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n for (var key in value) {\n if (key === 'class' || key === 'style') {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n if (!(key in hash)) {\n hash[key] = value[key];\n }\n }\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp\n) {\n if (value) {\n if (!isObject(value)) {\n \"production\" !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n for (var key in value) {\n if (key === 'class' || key === 'style') {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n if (!(key in hash)) {\n hash[key] = value[key];\n }\n }\n }\n }\n return data\n}", "function packGlobalObj (name, object) {\n // This function copies a global object over to a simple JS Object and then is stringified to JSON in order to be sent over websocket\n let packedGlobal = {}\n packedGlobal[name] = recursivelyCopy(object)\n\n return JSON.stringify(packedGlobal)\n\n function recursivelyCopy (object) {\n let objectCopy = {}\n \n if (typeof object === 'object') {\n // Break down various object types and copy them all to a simple javascript object\n if (object instanceof Array) {\n object.forEach( function (value, index) {\n objectCopy[index] = recursivelyCopy(value)\n\n })\n } else if (object instanceof Map) {\n object.forEach( function (value, key) {\n objectCopy[key] = recursivelyCopy(value)\n\n })\n } else if (object instanceof Object) {\n for (let element in object ) {\n if (element === 'nodeModules') {\n //Only copies name of each dependency\n let dependencies = []\n for (let module in object[element] ) {\n dependencies.push(module)\n }\n objectCopy[element] = dependencies\n } else {\n objectCopy[element] = recursivelyCopy(object[element])\n }\n }\n } \n } else if (typeof object === 'function') {\n objectCopy = object.constructor.name\n\n } else {\n // All other variables are directly assigned to objectCopy\n objectCopy = object\n\n } \n return objectCopy\n }\n }", "function bindObjectProps (\n data,\n tag,\n value,\n asProp\n) {\n if (value) {\n if (!isObject(value)) {\n process.env.NODE_ENV !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n for (var key in value) {\n if (key === 'class' || key === 'style') {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n if (!(key in hash)) {\n hash[key] = value[key];\n }\n }\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp\n) {\n if (value) {\n if (!isObject(value)) {\n process.env.NODE_ENV !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n for (var key in value) {\n if (key === 'class' || key === 'style') {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n if (!(key in hash)) {\n hash[key] = value[key];\n }\n }\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp\n) {\n if (value) {\n if (!isObject(value)) {\n process.env.NODE_ENV !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n for (var key in value) {\n if (key === 'class' || key === 'style') {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n if (!(key in hash)) {\n hash[key] = value[key];\n }\n }\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp\n) {\n if (value) {\n if (!isObject(value)) {\n \"development\" !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n for (var key in value) {\n if (key === 'class' || key === 'style') {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n if (!(key in hash)) {\n hash[key] = value[key];\n }\n }\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp\n) {\n if (value) {\n if (!isObject(value)) {\n \"development\" !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n for (var key in value) {\n if (key === 'class' || key === 'style') {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n if (!(key in hash)) {\n hash[key] = value[key];\n }\n }\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp\n) {\n if (value) {\n if (!isObject(value)) {\n \"development\" !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n for (var key in value) {\n if (key === 'class' || key === 'style') {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n if (!(key in hash)) {\n hash[key] = value[key];\n }\n }\n }\n }\n return data\n}", "function bindObjectProps (\n\t data,\n\t tag,\n\t value,\n\t asProp,\n\t isSync\n\t) {\n\t if (value) {\n\t if (!isObject(value)) {\n\t (\"production\") !== 'production' && warn(\n\t 'v-bind without argument expects an Object or Array value',\n\t this\n\t );\n\t } else {\n\t if (Array.isArray(value)) {\n\t value = toObject(value);\n\t }\n\t var hash;\n\t var loop = function ( key ) {\n\t if (\n\t key === 'class' ||\n\t key === 'style' ||\n\t isReservedAttribute(key)\n\t ) {\n\t hash = data;\n\t } else {\n\t var type = data.attrs && data.attrs.type;\n\t hash = asProp || config.mustUseProp(tag, type, key)\n\t ? data.domProps || (data.domProps = {})\n\t : data.attrs || (data.attrs = {});\n\t }\n\t if (!(key in hash)) {\n\t hash[key] = value[key];\n\t\n\t if (isSync) {\n\t var on = data.on || (data.on = {});\n\t on[(\"update:\" + key)] = function ($event) {\n\t value[key] = $event;\n\t };\n\t }\n\t }\n\t };\n\t\n\t for (var key in value) loop( key );\n\t }\n\t }\n\t return data\n\t}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n 'development' !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n for (var key in value) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n if (!(key in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[`update:${key}`] = function ($event) {\n value[key] = $event;\n };\n }\n }\n }\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n \"production\" !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n \"production\" !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n \"production\" !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n \"production\" !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n \"production\" !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "add(obj){\n this.dict = this.extend(this.dict, obj);\n }", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n true && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n true && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n true && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n true && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n true && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n true && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n true && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n true && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n true && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n true && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n true && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n true && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n true && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n true && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n true && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n true && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n true && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n true && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n true && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n true && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n true && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n true && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n true && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n true && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n true && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n true && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n true && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n true && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n true && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n true && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n true && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n \"production\" !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n if (!(key in hash) && !(camelizedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + camelizedKey)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n \"production\" !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n if (!(key in hash) && !(camelizedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + camelizedKey)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n \"production\" !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n if (!(key in hash) && !(camelizedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + camelizedKey)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n \"production\" !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n if (!(key in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n \"production\" !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n if (!(key in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n \"production\" !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n if (!(key in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n \"production\" !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n if (!(key in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n \"production\" !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n if (!(key in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n \"production\" !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n if (!(key in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n \"production\" !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n if (!(key in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n \"production\" !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n if (!(key in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n \"production\" !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n if (!(key in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n \"production\" !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n if (!(key in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n \"production\" !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n if (!(key in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n \"production\" !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n if (!(key in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n \"production\" !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n if (!(key in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n \"production\" !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n if (!(key in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n \"production\" !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n if (!(key in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n process.env.NODE_ENV !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n process.env.NODE_ENV !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n var hyphenatedKey = hyphenate(key);\n if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n true && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n if (!(key in hash) && !(camelizedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + camelizedKey)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n true && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n if (!(key in hash) && !(camelizedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + camelizedKey)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}", "function bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n \"development\" !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n var camelizedKey = camelize(key);\n if (!(key in hash) && !(camelizedKey in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + camelizedKey)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}" ]
[ "0.5750111", "0.5750111", "0.5574623", "0.5570438", "0.55449307", "0.5451092", "0.544886", "0.543797", "0.54336005", "0.5427807", "0.5426836", "0.5420182", "0.54180074", "0.54180074", "0.54180074", "0.5417664", "0.5417664", "0.53927517", "0.53875333", "0.53802675", "0.5369361", "0.53691524", "0.53691524", "0.5335967", "0.53008616", "0.53008616", "0.52768254", "0.52758706", "0.52702904", "0.5260717", "0.5260717", "0.5260717", "0.5257754", "0.5252805", "0.5252805", "0.5252805", "0.52513814", "0.52513814", "0.52513814", "0.5208529", "0.51900405", "0.5170231", "0.5170231", "0.5170231", "0.5170231", "0.5170231", "0.51624376", "0.5162361", "0.5162361", "0.5162361", "0.5162361", "0.5162361", "0.5162361", "0.5162361", "0.5162361", "0.5162361", "0.5162361", "0.5162361", "0.5162361", "0.5162361", "0.5162361", "0.5162361", "0.5162361", "0.5162361", "0.5162361", "0.5162361", "0.5162361", "0.5162361", "0.5162361", "0.5162361", "0.5162361", "0.5162361", "0.5162361", "0.5162361", "0.5162361", "0.5162361", "0.5162361", "0.5162361", "0.5157339", "0.5157339", "0.5157339", "0.5155379", "0.5155379", "0.5155379", "0.5155379", "0.5155379", "0.5155379", "0.5155379", "0.5155379", "0.5155379", "0.5155379", "0.5155379", "0.5155379", "0.5155379", "0.5155379", "0.5155379", "0.5152447", "0.5152447", "0.514921", "0.514921", "0.51481885" ]
0.0
-1
Runtime helper for rendering static trees.
function renderStatic ( index, isInFor ) { var cached = this._staticTrees || (this._staticTrees = []); var tree = cached[index]; // if has already-rendered static tree and not inside v-for, // we can reuse the same tree. if (tree && !isInFor) { return tree } // otherwise, render a fresh tree. tree = cached[index] = this.$options.staticRenderFns[index].call( this._renderProxy, null, this // for render fns generated for functional component templates ); markStatic(tree, ("__static__" + index), false); return tree }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderStatic(index, isInFor) {\n // static trees can be rendered once and cached on the contructor options\n // so every instance shares the same cached trees\n var options = this.$options;\n var cached = options.cached || (options.cached = []);\n var tree = cached[index];\n // if has already-rendered static tree and not inside v-for,\n // we can reuse the same tree by doing a shallow clone.\n if (tree && !isInFor) {\n return Array.isArray(tree) ? cloneVNodes(tree) : cloneVNode(tree);\n }\n // otherwise, render a fresh tree.\n tree = cached[index] = options.staticRenderFns[index].call(this._renderProxy, null, this);\n markStatic(tree, \"__static__\" + index, false);\n return tree;\n}", "function renderStatic(index,isInFor,isOnce){// render fns generated by compiler < 2.5.4 does not provide v-once\n// information to runtime so be conservative\nvar isOldVersion=arguments.length<3;// if a static tree is generated by v-once, it is cached on the instance;\n// otherwise it is purely static and can be cached on the shared options\n// across all instances.\nvar renderFns=this.$options.staticRenderFns;var cached=isOldVersion||isOnce?this._staticTrees||(this._staticTrees=[]):renderFns.cached||(renderFns.cached=[]);var tree=cached[index];// if has already-rendered static tree and not inside v-for,\n// we can reuse the same tree by doing a shallow clone.\nif(tree&&!isInFor){return Array.isArray(tree)?cloneVNodes(tree):cloneVNode(tree);}// otherwise, render a fresh tree.\ntree=cached[index]=renderFns[index].call(this._renderProxy,null,this);markStatic(tree,\"__static__\"+index,false);return tree;}", "function renderStatic(index,isInFor,isOnce){// render fns generated by compiler < 2.5.4 does not provide v-once\n// information to runtime so be conservative\nvar isOldVersion=arguments.length<3;// if a static tree is generated by v-once, it is cached on the instance;\n// otherwise it is purely static and can be cached on the shared options\n// across all instances.\nvar renderFns=this.$options.staticRenderFns;var cached=isOldVersion||isOnce?this._staticTrees||(this._staticTrees=[]):renderFns.cached||(renderFns.cached=[]);var tree=cached[index];// if has already-rendered static tree and not inside v-for,\n// we can reuse the same tree by doing a shallow clone.\nif(tree&&!isInFor){return Array.isArray(tree)?cloneVNodes(tree):cloneVNode(tree);}// otherwise, render a fresh tree.\ntree=cached[index]=renderFns[index].call(this._renderProxy,null,this);markStatic(tree,\"__static__\"+index,false);return tree;}", "function renderStatic(index, isInFor) {\n var cached = this._staticTrees || (this._staticTrees = []);\n var tree = cached[index];\n // if has already-rendered static tree and not inside v-for,\n // we can reuse the same tree.\n if (tree && !isInFor) {\n return tree;\n }\n // otherwise, render a fresh tree.\n tree = cached[index] = this.$options.staticRenderFns[index].call(this._renderProxy, null, this // for render fns generated for functional component templates\n );\n markStatic(tree, \"__static__\" + index, false);\n return tree;\n }", "function renderStatic(index, isInFor) {\n var cached = this._staticTrees || (this._staticTrees = []);\n var tree = cached[index]; // if has already-rendered static tree and not inside v-for,\n // we can reuse the same tree.\n\n if (tree && !isInFor) {\n return tree;\n } // otherwise, render a fresh tree.\n\n\n tree = cached[index] = this.$options.staticRenderFns[index].call(this._renderProxy, null, this // for render fns generated for functional component templates\n );\n markStatic(tree, \"__static__\" + index, false);\n return tree;\n }", "function renderStatic (\n index,\n isInFor\n) {\n // static trees can be rendered once and cached on the contructor options\n // so every instance shares the same cached trees\n var renderFns = this.$options.staticRenderFns;\n var cached = renderFns.cached || (renderFns.cached = []);\n var tree = cached[index];\n // if has already-rendered static tree and not inside v-for,\n // we can reuse the same tree by doing a shallow clone.\n if (tree && !isInFor) {\n return Array.isArray(tree)\n ? cloneVNodes(tree)\n : cloneVNode(tree)\n }\n // otherwise, render a fresh tree.\n tree = cached[index] = renderFns[index].call(this._renderProxy, null, this);\n markStatic(tree, (\"__static__\" + index), false);\n return tree\n}", "function renderStatic (\n index,\n isInFor\n) {\n // static trees can be rendered once and cached on the contructor options\n // so every instance shares the same cached trees\n var renderFns = this.$options.staticRenderFns;\n var cached = renderFns.cached || (renderFns.cached = []);\n var tree = cached[index];\n // if has already-rendered static tree and not inside v-for,\n // we can reuse the same tree by doing a shallow clone.\n if (tree && !isInFor) {\n return Array.isArray(tree)\n ? cloneVNodes(tree)\n : cloneVNode(tree)\n }\n // otherwise, render a fresh tree.\n tree = cached[index] = renderFns[index].call(this._renderProxy, null, this);\n markStatic(tree, (\"__static__\" + index), false);\n return tree\n}", "function renderStatic (\n index,\n isInFor\n) {\n // static trees can be rendered once and cached on the contructor options\n // so every instance shares the same cached trees\n var renderFns = this.$options.staticRenderFns;\n var cached = renderFns.cached || (renderFns.cached = []);\n var tree = cached[index];\n // if has already-rendered static tree and not inside v-for,\n // we can reuse the same tree by doing a shallow clone.\n if (tree && !isInFor) {\n return Array.isArray(tree)\n ? cloneVNodes(tree)\n : cloneVNode(tree)\n }\n // otherwise, render a fresh tree.\n tree = cached[index] = renderFns[index].call(this._renderProxy, null, this);\n markStatic(tree, (\"__static__\" + index), false);\n return tree\n}", "function renderStatic (\n index,\n isInFor\n) {\n // static trees can be rendered once and cached on the contructor options\n // so every instance shares the same cached trees\n var renderFns = this.$options.staticRenderFns;\n var cached = renderFns.cached || (renderFns.cached = []);\n var tree = cached[index];\n // if has already-rendered static tree and not inside v-for,\n // we can reuse the same tree by doing a shallow clone.\n if (tree && !isInFor) {\n return Array.isArray(tree)\n ? cloneVNodes(tree)\n : cloneVNode(tree)\n }\n // otherwise, render a fresh tree.\n tree = cached[index] = renderFns[index].call(this._renderProxy, null, this);\n markStatic(tree, (\"__static__\" + index), false);\n return tree\n}", "function renderStatic (\n index,\n isInFor\n) {\n // static trees can be rendered once and cached on the contructor options\n // so every instance shares the same cached trees\n var renderFns = this.$options.staticRenderFns;\n var cached = renderFns.cached || (renderFns.cached = []);\n var tree = cached[index];\n // if has already-rendered static tree and not inside v-for,\n // we can reuse the same tree by doing a shallow clone.\n if (tree && !isInFor) {\n return Array.isArray(tree)\n ? cloneVNodes(tree)\n : cloneVNode(tree)\n }\n // otherwise, render a fresh tree.\n tree = cached[index] = renderFns[index].call(this._renderProxy, null, this);\n markStatic$1(tree, `__static__${index}`, false);\n return tree\n}", "function renderStatic(index, isInFor) {\n var cached = this._staticTrees || (this._staticTrees = []);\n var tree = cached[index];\n // if has already-rendered static tree and not inside v-for,\n // we can reuse the same tree.\n if (tree && !isInFor) {\n return tree;\n }\n // otherwise, render a fresh tree.\n tree = cached[index] = this.$options.staticRenderFns[index].call(this._renderProxy, null, this // for render fns generated for functional component templates\n );\n markStatic(tree, \"__static__\" + index, false);\n return tree;\n}", "function renderStatic(index, isInFor) {\n var cached = this._staticTrees || (this._staticTrees = []);\n var tree = cached[index];\n // if has already-rendered static tree and not inside v-for,\n // we can reuse the same tree.\n if (tree && !isInFor) {\n return tree;\n }\n // otherwise, render a fresh tree.\n tree = cached[index] = this.$options.staticRenderFns[index].call(this._renderProxy, null, this // for render fns generated for functional component templates\n );\n markStatic(tree, \"__static__\" + index, false);\n return tree;\n}", "function renderStatic(index, isInFor) {\n var cached = this._staticTrees || (this._staticTrees = []);\n var tree = cached[index];\n // if has already-rendered static tree and not inside v-for,\n // we can reuse the same tree by doing a shallow clone.\n if (tree && !isInFor) {\n return Array.isArray(tree) ? cloneVNodes(tree) : cloneVNode(tree);\n }\n // otherwise, render a fresh tree.\n tree = cached[index] = this.$options.staticRenderFns[index].call(this._renderProxy, null, this // for render fns generated for functional component templates\n );\n markStatic(tree, \"__static__\" + index, false);\n return tree;\n}", "function renderStatic(index, isInFor) {\n var cached = this._staticTrees || (this._staticTrees = []);\n var tree = cached[index];\n // if has already-rendered static tree and not inside v-for,\n // we can reuse the same tree by doing a shallow clone.\n if (tree && !isInFor) {\n return Array.isArray(tree) ? cloneVNodes(tree) : cloneVNode(tree);\n }\n // otherwise, render a fresh tree.\n tree = cached[index] = this.$options.staticRenderFns[index].call(this._renderProxy, null, this // for render fns generated for functional component templates\n );\n markStatic(tree, \"__static__\" + index, false);\n return tree;\n}", "function renderStatic(index, isInFor) {\n var cached = this._staticTrees || (this._staticTrees = []);\n var tree = cached[index];\n // if has already-rendered static tree and not inside v-for,\n // we can reuse the same tree by doing a shallow clone.\n if (tree && !isInFor) {\n return Array.isArray(tree) ? cloneVNodes(tree) : cloneVNode(tree);\n }\n // otherwise, render a fresh tree.\n tree = cached[index] = this.$options.staticRenderFns[index].call(this._renderProxy, null, this // for render fns generated for functional component templates\n );\n markStatic(tree, \"__static__\" + index, false);\n return tree;\n}", "function renderStaticView() {\n\t// Text for class view\n\tclassViewText();\n\n\t// Rect for line under title\n\t//classViewLine();\n\t// ORDER LEVEL and FAMILY LEVEL label\n\tstaticLabels();\n\t// Legend\n\t//legend();\n\t//incrementProgress();\n\tinstructions();\n}", "function renderStatic(index, isInFor) {\n\t var tree = this._staticTrees[index];\n\t // if has already-rendered static tree and not inside v-for,\n\t // we can reuse the same tree by doing a shallow clone.\n\t if (tree && !isInFor) {\n\t return Array.isArray(tree) ? cloneVNodes(tree) : cloneVNode(tree);\n\t }\n\t // otherwise, render a fresh tree.\n\t tree = this._staticTrees[index] = this.$options.staticRenderFns[index].call(this._renderProxy);\n\t markStatic(tree, \"__static__\" + index, false);\n\t return tree;\n\t}", "function renderStatic(index, isInFor) {\n\t var tree = this._staticTrees[index];\n\t // if has already-rendered static tree and not inside v-for,\n\t // we can reuse the same tree by doing a shallow clone.\n\t if (tree && !isInFor) {\n\t return Array.isArray(tree) ? cloneVNodes(tree) : cloneVNode(tree);\n\t }\n\t // otherwise, render a fresh tree.\n\t tree = this._staticTrees[index] = this.$options.staticRenderFns[index].call(this._renderProxy);\n\t markStatic(tree, \"__static__\" + index, false);\n\t return tree;\n\t}", "function renderStatic(index, isInFor, isOnce) {\n // render fns generated by compiler < 2.5.4 does not provide v-once\n // information to runtime so be conservative\n var isOldVersion = arguments.length < 3;\n // if a static tree is generated by v-once, it is cached on the instance;\n // otherwise it is purely static and can be cached on the shared options\n // across all instances.\n var renderFns = this.$options.staticRenderFns;\n var cached = isOldVersion || isOnce ? this._staticTrees || (this._staticTrees = []) : renderFns.cached || (renderFns.cached = []);\n var tree = cached[index];\n // if has already-rendered static tree and not inside v-for,\n // we can reuse the same tree by doing a shallow clone.\n if (tree && !isInFor) {\n return Array.isArray(tree) ? cloneVNodes(tree) : cloneVNode(tree);\n }\n // otherwise, render a fresh tree.\n tree = cached[index] = renderFns[index].call(this._renderProxy, null, this);\n markStatic(tree, \"__static__\" + index, false);\n return tree;\n }", "function renderStatic (\n\t index,\n\t isInFor\n\t) {\n\t var cached = this._staticTrees || (this._staticTrees = []);\n\t var tree = cached[index];\n\t // if has already-rendered static tree and not inside v-for,\n\t // we can reuse the same tree.\n\t if (tree && !isInFor) {\n\t return tree\n\t }\n\t // otherwise, render a fresh tree.\n\t tree = cached[index] = this.$options.staticRenderFns[index].call(\n\t this._renderProxy,\n\t null,\n\t this // for render fns generated for functional component templates\n\t );\n\t markStatic(tree, (\"__static__\" + index), false);\n\t return tree\n\t}", "function renderStatic (\n index,\n isInFor\n ) {\n var cached = this._staticTrees || (this._staticTrees = []);\n var tree = cached[index];\n // if has already-rendered static tree and not inside v-for,\n // we can reuse the same tree.\n if (tree && !isInFor) {\n return tree\n }\n // otherwise, render a fresh tree.\n tree = cached[index] = this.$options.staticRenderFns[index].call(\n this._renderProxy,\n null,\n this // for render fns generated for functional component templates\n );\n markStatic(tree, (\"__static__\" + index), false);\n return tree\n }", "function renderStatic(\n index,\n isInFor,\n ) {\n var cached = this._staticTrees || (this._staticTrees = []);\n var tree = cached[index];\n // if has already-rendered static tree and not inside v-for,\n // we can reuse the same tree.\n if (tree && !isInFor) {\n return tree;\n }\n // otherwise, render a fresh tree.\n tree = cached[index] = this.$options.staticRenderFns[index].call(\n this._renderProxy,\n null,\n this, // for render fns generated for functional component templates\n );\n markStatic(tree, (\"__static__\" + index), false);\n return tree;\n }", "function renderStatic(index, isInFor) {\n var cached = this._staticTrees || (this._staticTrees = []);\n var tree = cached[index]; // if has already-rendered static tree and not inside v-for,\n // we can reuse the same tree.\n\n if (tree && !isInFor) {\n return tree;\n } // otherwise, render a fresh tree.\n\n\n tree = cached[index] = this.$options.staticRenderFns[index].call(this._renderProxy, null, this // for render fns generated for functional component templates\n );\n markStatic(tree, \"__static__\" + index, false);\n return tree;\n}", "function renderStatic(index, isInFor) {\n var cached = this._staticTrees || (this._staticTrees = []);\n var tree = cached[index]; // if has already-rendered static tree and not inside v-for,\n // we can reuse the same tree.\n\n if (tree && !isInFor) {\n return tree;\n } // otherwise, render a fresh tree.\n\n\n tree = cached[index] = this.$options.staticRenderFns[index].call(this._renderProxy, null, this // for render fns generated for functional component templates\n );\n markStatic(tree, \"__static__\" + index, false);\n return tree;\n}", "function renderStatic(index, isInFor) {\n var cached = this._staticTrees || (this._staticTrees = []);\n var tree = cached[index]; // if has already-rendered static tree and not inside v-for,\n // we can reuse the same tree.\n\n if (tree && !isInFor) {\n return tree;\n } // otherwise, render a fresh tree.\n\n\n tree = cached[index] = this.$options.staticRenderFns[index].call(this._renderProxy, null, this // for render fns generated for functional component templates\n );\n markStatic(tree, \"__static__\" + index, false);\n return tree;\n}", "function renderStatic(index, isInFor) {\n var cached = this._staticTrees || (this._staticTrees = []);\n var tree = cached[index]; // if has already-rendered static tree and not inside v-for,\n // we can reuse the same tree.\n\n if (tree && !isInFor) {\n return tree;\n } // otherwise, render a fresh tree.\n\n\n tree = cached[index] = this.$options.staticRenderFns[index].call(this._renderProxy, null, this // for render fns generated for functional component templates\n );\n markStatic(tree, \"__static__\" + index, false);\n return tree;\n}", "function renderStatic(index, isInFor) {\n var cached = this._staticTrees || (this._staticTrees = []);\n var tree = cached[index]; // if has already-rendered static tree and not inside v-for,\n // we can reuse the same tree.\n\n if (tree && !isInFor) {\n return tree;\n } // otherwise, render a fresh tree.\n\n\n tree = cached[index] = this.$options.staticRenderFns[index].call(this._renderProxy, null, this // for render fns generated for functional component templates\n );\n markStatic(tree, \"__static__\".concat(index), false);\n return tree;\n}", "function renderStatic (\n index,\n isInFor\n ) {\n var cached = this._staticTrees || (this._staticTrees = []);\n var tree = cached[index];\n // if has already-rendered static tree and not inside v-for,\n // we can reuse the same tree.\n if (tree && !isInFor) {\n return tree\n }\n // otherwise, render a fresh tree.\n tree = cached[index] = this.$options.staticRenderFns[index].call(\n this._renderProxy,\n null,\n this // for render fns generated for functional component templates\n );\n markStatic(tree, (\"__static__\" + index), false);\n return tree\n }", "function renderStatic (\n index,\n isInFor\n ) {\n var cached = this._staticTrees || (this._staticTrees = []);\n var tree = cached[index];\n // if has already-rendered static tree and not inside v-for,\n // we can reuse the same tree.\n if (tree && !isInFor) {\n return tree\n }\n // otherwise, render a fresh tree.\n tree = cached[index] = this.$options.staticRenderFns[index].call(\n this._renderProxy,\n null,\n this // for render fns generated for functional component templates\n );\n markStatic(tree, (\"__static__\" + index), false);\n return tree\n }", "function renderStatic (\n index,\n isInFor\n ) {\n var cached = this._staticTrees || (this._staticTrees = []);\n var tree = cached[index];\n // if has already-rendered static tree and not inside v-for,\n // we can reuse the same tree.\n if (tree && !isInFor) {\n return tree\n }\n // otherwise, render a fresh tree.\n tree = cached[index] = this.$options.staticRenderFns[index].call(\n this._renderProxy,\n null,\n this // for render fns generated for functional component templates\n );\n markStatic(tree, (\"__static__\" + index), false);\n return tree\n }", "function renderStatic (\n index,\n isInFor\n ) {\n var cached = this._staticTrees || (this._staticTrees = []);\n var tree = cached[index];\n // if has already-rendered static tree and not inside v-for,\n // we can reuse the same tree.\n if (tree && !isInFor) {\n return tree\n }\n // otherwise, render a fresh tree.\n tree = cached[index] = this.$options.staticRenderFns[index].call(\n this._renderProxy,\n null,\n this // for render fns generated for functional component templates\n );\n markStatic(tree, (\"__static__\" + index), false);\n return tree\n }", "function renderStatic (\n\t index,\n\t isInFor\n\t) {\n\t var tree = this._staticTrees[index];\n\t // if has already-rendered static tree and not inside v-for,\n\t // we can reuse the same tree by doing a shallow clone.\n\t if (tree && !isInFor) {\n\t return Array.isArray(tree)\n\t ? cloneVNodes(tree)\n\t : cloneVNode(tree)\n\t }\n\t // otherwise, render a fresh tree.\n\t tree = this._staticTrees[index] =\n\t this.$options.staticRenderFns[index].call(this._renderProxy);\n\t markStatic(tree, (\"__static__\" + index), false);\n\t return tree\n\t}", "function renderStatic (\n\t index,\n\t isInFor\n\t) {\n\t var tree = this._staticTrees[index];\n\t // if has already-rendered static tree and not inside v-for,\n\t // we can reuse the same tree by doing a shallow clone.\n\t if (tree && !isInFor) {\n\t return Array.isArray(tree)\n\t ? cloneVNodes(tree)\n\t : cloneVNode(tree)\n\t }\n\t // otherwise, render a fresh tree.\n\t tree = this._staticTrees[index] =\n\t this.$options.staticRenderFns[index].call(this._renderProxy);\n\t markStatic(tree, (\"__static__\" + index), false);\n\t return tree\n\t}", "function renderStatic (\n\t index,\n\t isInFor\n\t) {\n\t var tree = this._staticTrees[index];\n\t // if has already-rendered static tree and not inside v-for,\n\t // we can reuse the same tree by doing a shallow clone.\n\t if (tree && !isInFor) {\n\t return Array.isArray(tree)\n\t ? cloneVNodes(tree)\n\t : cloneVNode(tree)\n\t }\n\t // otherwise, render a fresh tree.\n\t tree = this._staticTrees[index] =\n\t this.$options.staticRenderFns[index].call(this._renderProxy);\n\t markStatic(tree, (\"__static__\" + index), false);\n\t return tree\n\t}", "function renderStatic (\n\t index,\n\t isInFor\n\t) {\n\t var tree = this._staticTrees[index];\n\t // if has already-rendered static tree and not inside v-for,\n\t // we can reuse the same tree by doing a shallow clone.\n\t if (tree && !isInFor) {\n\t return Array.isArray(tree)\n\t ? cloneVNodes(tree)\n\t : cloneVNode(tree)\n\t }\n\t // otherwise, render a fresh tree.\n\t tree = this._staticTrees[index] =\n\t this.$options.staticRenderFns[index].call(this._renderProxy);\n\t markStatic(tree, (\"__static__\" + index), false);\n\t return tree\n\t}", "function renderStatic(index, isInFor) {\n var tree = this._staticTrees[index];\n // if has already-rendered static tree and not inside v-for,\n // we can reuse the same tree by doing a shallow clone.\n if (tree && !isInFor) {\n return Array.isArray(tree) ? cloneVNodes(tree) : cloneVNode(tree);\n }\n // otherwise, render a fresh tree.\n tree = this._staticTrees[index] = this.$options.staticRenderFns[index].call(this._renderProxy);\n markStatic(tree, \"__static__\" + index, false);\n return tree;\n}", "function renderStatic(index, isInFor) {\n var tree = this._staticTrees[index];\n // if has already-rendered static tree and not inside v-for,\n // we can reuse the same tree by doing a shallow clone.\n if (tree && !isInFor) {\n return Array.isArray(tree) ? cloneVNodes(tree) : cloneVNode(tree);\n }\n // otherwise, render a fresh tree.\n tree = this._staticTrees[index] = this.$options.staticRenderFns[index].call(this._renderProxy);\n markStatic(tree, \"__static__\" + index, false);\n return tree;\n}" ]
[ "0.70392305", "0.7030688", "0.7030688", "0.7001824", "0.69432634", "0.6933784", "0.6933784", "0.6933784", "0.6933784", "0.69145143", "0.6898034", "0.6898034", "0.6897683", "0.6897683", "0.6897683", "0.6893906", "0.6892661", "0.6892661", "0.6889333", "0.6887244", "0.6866389", "0.6864308", "0.6840243", "0.6840243", "0.6840243", "0.6840243", "0.6826938", "0.68241155", "0.68241155", "0.68241155", "0.68241155", "0.6824084", "0.6824084", "0.6824084", "0.6824084", "0.68004733", "0.68004733" ]
0.0
-1
Runtime helper for vonce. Effectively it means marking the node as static with a unique key.
function markOnce ( tree, index, key ) { markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true); return tree }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function markOnce(tree, index, key) {\n markStatic(tree, \"__once__\" + index + (key ? \"_\" + key : \"\"), true);\n return tree;\n }", "function markOnce(tree, index, key) {\n\t markStatic(tree, \"__once__\" + index + (key ? \"_\" + key : \"\"), true);\n\t return tree;\n\t}", "function markOnce(tree, index, key) {\n\t markStatic(tree, \"__once__\" + index + (key ? \"_\" + key : \"\"), true);\n\t return tree;\n\t}", "function markOnce(tree, index, key) {\n markStatic(tree, \"__once__\" + index + (key ? \"_\" + key : \"\"), true);\n return tree;\n }", "function markOnce(tree, index, key) {\n markStatic(tree, \"__once__\" + index + (key ? \"_\" + key : \"\"), true);\n return tree;\n }", "function markOnce(tree, index, key) {\n markStatic(tree, \"__once__\" + index + (key ? \"_\" + key : \"\"), true);\n return tree;\n}", "function markOnce(tree, index, key) {\n markStatic(tree, \"__once__\" + index + (key ? \"_\" + key : \"\"), true);\n return tree;\n}", "function markOnce(tree, index, key) {\n markStatic(tree, \"__once__\" + index + (key ? \"_\" + key : \"\"), true);\n return tree;\n}", "function markOnce(tree, index, key) {\n markStatic(tree, \"__once__\" + index + (key ? \"_\" + key : \"\"), true);\n return tree;\n}", "function markOnce(tree, index, key) {\n markStatic(tree, \"__once__\" + index + (key ? \"_\" + key : \"\"), true);\n return tree;\n}", "function markOnce(tree, index, key) {\n markStatic(tree, \"__once__\" + index + (key ? \"_\" + key : \"\"), true);\n return tree;\n}", "function markOnce(tree, index, key) {\n markStatic(tree, \"__once__\" + index + (key ? \"_\" + key : \"\"), true);\n return tree;\n}", "function markOnce(tree, index, key) {\n markStatic(tree, \"__once__\" + index + (key ? \"_\" + key : \"\"), true);\n return tree;\n}", "function markOnce(tree, index, key) {\n markStatic(tree, \"__once__\" + index + (key ? \"_\" + key : \"\"), true);\n return tree;\n}", "function markOnce(tree, index, key) {\n markStatic(tree, \"__once__\" + index + (key ? \"_\" + key : \"\"), true);\n return tree;\n}", "function markOnce(tree, index, key) {\n markStatic(tree, \"__once__\" + index + (key ? \"_\" + key : \"\"), true);\n return tree;\n}", "function markOnce(tree, index, key) {\n markStatic(tree, \"__once__\" + index + (key ? \"_\" + key : \"\"), true);\n return tree;\n}", "function markOnce(tree, index, key) {\n markStatic(tree, \"__once__\".concat(index).concat(key ? \"_\".concat(key) : \"\"), true);\n return tree;\n}", "function markOnce(tree,index,key){markStatic(tree,\"__once__\"+index+(key?\"_\"+key:\"\"),true);return tree;}", "function markOnce(tree,index,key){markStatic(tree,\"__once__\"+index+(key?\"_\"+key:\"\"),true);return tree;}", "function markOnce(\n tree,\n index,\n key,\n ) {\n markStatic(tree, (\"__once__\" + index + (key ? (\"_\" + key) : \"\")), true);\n return tree;\n }", "function markOnce (\n tree,\n index,\n key\n ) {\n markStatic(tree, (\"__once__\" + index + (key ? (\"_\" + key) : \"\")), true);\n return tree\n }", "function markOnce (\r\n tree,\r\n index,\r\n key\r\n) {\r\n markStatic(tree, (\"__once__\" + index + (key ? (\"_\" + key) : \"\")), true);\r\n return tree\r\n}", "function markOnce (\n\t tree,\n\t index,\n\t key\n\t) {\n\t markStatic(tree, (\"__once__\" + index + (key ? (\"_\" + key) : \"\")), true);\n\t return tree\n\t}", "function markOnce (\n\t tree,\n\t index,\n\t key\n\t) {\n\t markStatic(tree, (\"__once__\" + index + (key ? (\"_\" + key) : \"\")), true);\n\t return tree\n\t}", "function markOnce (\n\t tree,\n\t index,\n\t key\n\t) {\n\t markStatic(tree, (\"__once__\" + index + (key ? (\"_\" + key) : \"\")), true);\n\t return tree\n\t}", "function markOnce (\n\t tree,\n\t index,\n\t key\n\t) {\n\t markStatic(tree, (\"__once__\" + index + (key ? (\"_\" + key) : \"\")), true);\n\t return tree\n\t}", "function markOnce (\n\t tree,\n\t index,\n\t key\n\t) {\n\t markStatic(tree, (\"__once__\" + index + (key ? (\"_\" + key) : \"\")), true);\n\t return tree\n\t}", "function markOnce(\n tree,\n index,\n key\n ) {\n markStatic(tree, (\"__once__\" + index + (key ? (\"_\" + key) : \"\")), true);\n return tree\n }", "function markOnce(\n tree,\n index,\n key\n ) {\n markStatic(tree, (\"__once__\" + index + (key ? (\"_\" + key) : \"\")), true);\n return tree\n }" ]
[ "0.7307867", "0.72644734", "0.72644734", "0.72334355", "0.72334355", "0.7207664", "0.7207664", "0.7207664", "0.7207664", "0.7207664", "0.7207664", "0.7207664", "0.7207664", "0.7207664", "0.7207664", "0.7207664", "0.7207664", "0.71539545", "0.71056765", "0.71056765", "0.7084502", "0.7068957", "0.70687896", "0.706295", "0.706295", "0.706295", "0.706295", "0.706295", "0.7041292", "0.7041292" ]
0.0
-1
helper to dynamically append modifier runtime markers to event names. ensure only append when value is already string, otherwise it will be cast to string and cause the type check to miss.
function prependModifier (value, symbol) { return typeof value === 'string' ? symbol + value : value }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function prependModifier (value, symbol) {\n return typeof value === 'string' ? symbol + value : value\n }", "function prependModifier (value, symbol) {\n return typeof value === 'string' ? symbol + value : value\n }", "function prependModifier (value, symbol) {\n return typeof value === 'string' ? symbol + value : value\n }", "function prependModifier (value, symbol) {\n return typeof value === 'string' ? symbol + value : value\n }", "function prependModifier(value, symbol) {\n return typeof value === 'string' ? symbol + value : value;\n}", "function prependModifier(value, symbol) {\n return typeof value === 'string' ? symbol + value : value;\n}", "function prependModifier(value, symbol) {\n return typeof value === 'string' ? symbol + value : value;\n}", "function prependModifier(value, symbol) {\n return typeof value === 'string' ? symbol + value : value;\n}", "function prependModifier(value, symbol) {\n return typeof value === 'string' ? symbol + value : value;\n}", "function prependModifier(value, symbol) {\n return typeof value === \"string\" ? symbol + value : value;\n }", "function prependModifier(value, symbol) {\n return typeof value === 'string' ? symbol + value : value;\n }", "function appendValue(key, value) {\n\n\n if (key !== pattern) {\n return;\n }\n\n console.log(\"Key: \" + key + \" Value: \" + value)\n \n // another helper to join the path to the value\n const stringify = tail => path.concat(tail).join('_').toUpperCase();\n \n // attempt to match key as <name>_<type>\n const match = key.match(/^(.+?)_([^_]+)$/);\n \n // check if type is TextCheck, and if so handle it appropriately\n if (match && match[2] === 'TextCheck') {\n appendValue(`${match[1]}_CHECKBOX`, value !== null ? 'Y' : 'null');\n appendValue(`${match[1]}_TEXT`, value);\n return;\n }\n \n // any other types just get appended normally\n //result.push(`${stringify(key)}: ${value}`);\n //result.push('{\"' + key + '\": \"' + value + '\"}');\n result.push(value);\n }", "function w(e) {\n var t = C(e);\n switch (t) {\n case \"array\":\n case \"object\":\n return \"an \" + t;\n\n case \"boolean\":\n case \"date\":\n case \"regexp\":\n return \"a \" + t;\n\n default:\n return t;\n }\n }", "function isModifierKey(value) {\n\t\t var name = typeof value == \"string\" ? value : keyNames[value.keyCode];\n\t\t return name == \"Ctrl\" || name == \"Alt\" || name == \"Shift\" || name == \"Mod\"\n\t\t }", "function stringify(evt) {\n var which = evt.which || evt.keyCode;\n var keyVal = KEY_VALUES[which];\n var key;\n var modifiers = [];\n\n if (evt.ctrlKey) modifiers.push('Ctrl');\n if (evt.originalEvent && evt.originalEvent.metaKey) modifiers.push('Meta');\n if (evt.altKey) modifiers.push('Alt');\n if (evt.shiftKey) modifiers.push('Shift');\n\n key = keyVal || String.fromCharCode(which);\n\n if (!modifiers.length && !keyVal) return key;\n\n modifiers.push(key);\n return modifiers.join('-');\n }", "function stringify(evt) {\n var which = evt.which || evt.keyCode;\n var keyVal = KEY_VALUES[which];\n var key;\n var modifiers = [];\n\n if (evt.ctrlKey) modifiers.push('Ctrl');\n if (evt.originalEvent && evt.originalEvent.metaKey) modifiers.push('Meta');\n if (evt.altKey) modifiers.push('Alt');\n if (evt.shiftKey) modifiers.push('Shift');\n\n key = keyVal || String.fromCharCode(which);\n\n if (!modifiers.length && !keyVal) return key;\n\n modifiers.push(key);\n return modifiers.join('-');\n }", "function isPropertyModifier(path) {\n return typeof path === 'string';\n }", "function isModifierKey(value) {\n var name = typeof value == \"string\" ? value : keyNames[value.keyCode];\n return name == \"Ctrl\" || name == \"Alt\" || name == \"Shift\" || name == \"Mod\"\n }", "function isModifierKey(value) {\n var name = typeof value == \"string\" ? value : keyNames[value.keyCode];\n return name == \"Ctrl\" || name == \"Alt\" || name == \"Shift\" || name == \"Mod\"\n }", "function isModifierKey(value) {\n var name = typeof value == \"string\" ? value : keyNames[value.keyCode];\n return name == \"Ctrl\" || name == \"Alt\" || name == \"Shift\" || name == \"Mod\"\n }", "function isModifierKey(value) {\n var name = typeof value == \"string\" ? value : keyNames[value.keyCode];\n return name == \"Ctrl\" || name == \"Alt\" || name == \"Shift\" || name == \"Mod\"\n }" ]
[ "0.5749372", "0.5749372", "0.5749372", "0.57420117", "0.5670296", "0.5670296", "0.5670296", "0.5670296", "0.5670296", "0.5659303", "0.5654612", "0.5258461", "0.51142997", "0.51061094", "0.50927186", "0.50927186", "0.5085455", "0.50337696", "0.50337696", "0.50337696", "0.50337696" ]
0.5724932
71
transform component vmodel info (value and callback) into prop and event handler respectively.
function transformModel (options, data) { var prop = (options.model && options.model.prop) || 'value'; var event = (options.model && options.model.event) || 'input' ;(data.attrs || (data.attrs = {}))[prop] = data.model.value; var on = data.on || (data.on = {}); var existing = on[event]; var callback = data.model.callback; if (isDef(existing)) { if ( Array.isArray(existing) ? existing.indexOf(callback) === -1 : existing !== callback ) { on[event] = [callback].concat(existing); } } else { on[event] = callback; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function transformModel (options, data) {\n\t var prop = (options.model && options.model.prop) || 'value';\n\t var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n\t var on = data.on || (data.on = {});\n\t if (isDef(on[event])) {\n\t on[event] = [data.model.callback].concat(on[event]);\n\t } else {\n\t on[event] = data.model.callback;\n\t }\n\t}", "function transformModel (options, data) {\n\t var prop = (options.model && options.model.prop) || 'value';\n\t var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n\t var on = data.on || (data.on = {});\n\t if (isDef(on[event])) {\n\t on[event] = [data.model.callback].concat(on[event]);\n\t } else {\n\t on[event] = data.model.callback;\n\t }\n\t}", "function transformModel (options, data) {\n\t var prop = (options.model && options.model.prop) || 'value';\n\t var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n\t var on = data.on || (data.on = {});\n\t if (on[event]) {\n\t on[event] = [data.model.callback].concat(on[event]);\n\t } else {\n\t on[event] = data.model.callback;\n\t }\n\t}", "function transformModel (options, data) {\n\t var prop = (options.model && options.model.prop) || 'value';\n\t var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n\t var on = data.on || (data.on = {});\n\t if (on[event]) {\n\t on[event] = [data.model.callback].concat(on[event]);\n\t } else {\n\t on[event] = data.model.callback;\n\t }\n\t}", "function transformModel (options, data) {\n\t var prop = (options.model && options.model.prop) || 'value';\n\t var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n\t var on = data.on || (data.on = {});\n\t if (on[event]) {\n\t on[event] = [data.model.callback].concat(on[event]);\n\t } else {\n\t on[event] = data.model.callback;\n\t }\n\t}", "function transformModel(options, data) {\n var prop = options.model && options.model.prop || 'value';\n var event = options.model && options.model.event || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n }", "function transformModel(options, data) {\n\t var prop = options.model && options.model.prop || 'value';\n\t var event = options.model && options.model.event || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n\t var on = data.on || (data.on = {});\n\t if (isDef(on[event])) {\n\t on[event] = [data.model.callback].concat(on[event]);\n\t } else {\n\t on[event] = data.model.callback;\n\t }\n\t}", "function transformModel(options, data) {\n\t var prop = options.model && options.model.prop || 'value';\n\t var event = options.model && options.model.event || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n\t var on = data.on || (data.on = {});\n\t if (isDef(on[event])) {\n\t on[event] = [data.model.callback].concat(on[event]);\n\t } else {\n\t on[event] = data.model.callback;\n\t }\n\t}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input'\n ;(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n var existing = on[event];\n var callback = data.model.callback;\n if (isDef(existing)) {\n if (\n Array.isArray(existing)\n ? existing.indexOf(callback) === -1\n : existing !== callback\n ) {\n on[event] = [callback].concat(existing);\n }\n } else {\n on[event] = callback;\n }\n }", "function transformModel (options, data) {\r\n var prop = (options.model && options.model.prop) || 'value';\r\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\r\n var on = data.on || (data.on = {});\r\n if (isDef(on[event])) {\r\n on[event] = [data.model.callback].concat(on[event]);\r\n } else {\r\n on[event] = data.model.callback;\r\n }\r\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (on[event]) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (on[event]) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (on[event]) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel(options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';\n (data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n }", "function transformModel(options, data) {\n var prop = options.model && options.model.prop || 'value';\n var event = options.model && options.model.event || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel(options, data) {\n var prop = options.model && options.model.prop || 'value';\n var event = options.model && options.model.event || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel(options, data) {\n var prop = options.model && options.model.prop || 'value';\n var event = options.model && options.model.event || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel(options, data) {\n var prop = options.model && options.model.prop || 'value';\n var event = options.model && options.model.event || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel(options, data) {\n var prop = options.model && options.model.prop || 'value';\n var event = options.model && options.model.event || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel(options, data) {\n var prop = options.model && options.model.prop || 'value';\n var event = options.model && options.model.event || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel(options, data) {\n var prop = options.model && options.model.prop || 'value';\n var event = options.model && options.model.event || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel(options, data) {\n var prop = options.model && options.model.prop || 'value';\n var event = options.model && options.model.event || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input'\n ;(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n var existing = on[event];\n var callback = data.model.callback;\n if (isDef(existing)) {\n if (\n Array.isArray(existing)\n ? existing.indexOf(callback) === -1\n : existing !== callback\n ) {\n on[event] = [callback].concat(existing);\n }\n } else {\n on[event] = callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input'\n ;(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n var existing = on[event];\n var callback = data.model.callback;\n if (isDef(existing)) {\n if (\n Array.isArray(existing)\n ? existing.indexOf(callback) === -1\n : existing !== callback\n ) {\n on[event] = [callback].concat(existing);\n }\n } else {\n on[event] = callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input'\n ;(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n var existing = on[event];\n var callback = data.model.callback;\n if (isDef(existing)) {\n if (\n Array.isArray(existing)\n ? existing.indexOf(callback) === -1\n : existing !== callback\n ) {\n on[event] = [callback].concat(existing);\n }\n } else {\n on[event] = callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input'\n ;(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n var existing = on[event];\n var callback = data.model.callback;\n if (isDef(existing)) {\n if (\n Array.isArray(existing)\n ? existing.indexOf(callback) === -1\n : existing !== callback\n ) {\n on[event] = [callback].concat(existing);\n }\n } else {\n on[event] = callback;\n }\n}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input'\n ;(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n var existing = on[event];\n var callback = data.model.callback;\n if (isDef(existing)) {\n if (\n Array.isArray(existing)\n ? existing.indexOf(callback) === -1\n : existing !== callback\n ) {\n on[event] = [callback].concat(existing);\n }\n } else {\n on[event] = callback;\n }\n}", "function transformModel(options,data){var prop=options.model&&options.model.prop||'value';var event=options.model&&options.model.event||'input';(data.props||(data.props={}))[prop]=data.model.value;var on=data.on||(data.on={});if(isDef(on[event])){on[event]=[data.model.callback].concat(on[event]);}else{on[event]=data.model.callback;}}", "function transformModel(options,data){var prop=options.model&&options.model.prop||'value';var event=options.model&&options.model.event||'input';(data.props||(data.props={}))[prop]=data.model.value;var on=data.on||(data.on={});if(isDef(on[event])){on[event]=[data.model.callback].concat(on[event]);}else{on[event]=data.model.callback;}}", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input'\n ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n var existing = on[event];\n var callback = data.model.callback;\n if (isDef(existing)) {\n if (\n Array.isArray(existing)\n ? existing.indexOf(callback) === -1\n : existing !== callback\n ) {\n on[event] = [callback].concat(existing);\n }\n } else {\n on[event] = callback;\n }\n }", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input'\n ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n var existing = on[event];\n var callback = data.model.callback;\n if (isDef(existing)) {\n if (\n Array.isArray(existing)\n ? existing.indexOf(callback) === -1\n : existing !== callback\n ) {\n on[event] = [callback].concat(existing);\n }\n } else {\n on[event] = callback;\n }\n }", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input'\n ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n var existing = on[event];\n var callback = data.model.callback;\n if (isDef(existing)) {\n if (\n Array.isArray(existing)\n ? existing.indexOf(callback) === -1\n : existing !== callback\n ) {\n on[event] = [callback].concat(existing);\n }\n } else {\n on[event] = callback;\n }\n }", "function transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input'\n ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n var existing = on[event];\n var callback = data.model.callback;\n if (isDef(existing)) {\n if (\n Array.isArray(existing)\n ? existing.indexOf(callback) === -1\n : existing !== callback\n ) {\n on[event] = [callback].concat(existing);\n }\n } else {\n on[event] = callback;\n }\n }" ]
[ "0.67385936", "0.67385936", "0.673094", "0.673094", "0.673094", "0.6685295", "0.6651494", "0.6651494", "0.6646578", "0.66293675", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.66081053", "0.6590641", "0.6590641", "0.6590641", "0.6585255", "0.65210265", "0.65210265", "0.65210265", "0.65210265", "0.65210265", "0.65210265", "0.65210265", "0.65210265", "0.6517133", "0.6517133", "0.6517133", "0.6517133", "0.6517133", "0.6469004", "0.6469004", "0.6448308", "0.63941276", "0.63941276", "0.63941276" ]
0.0
-1
wrapper function for providing a more flexible interface without getting yelled at by flow
function createElement ( context, tag, data, children, normalizationType, alwaysNormalize ) { if (Array.isArray(data) || isPrimitive(data)) { normalizationType = children; children = data; data = undefined; } if (isTrue(alwaysNormalize)) { normalizationType = ALWAYS_NORMALIZE; } return _createElement(context, tag, data, children, normalizationType) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function PipeDecorator(){}// WARNING: interface has both a type and a value, skipping emit", "function PipeDecorator() {} // WARNING: interface has both a type and a value, skipping emit", "function PipeDecorator() {} // WARNING: interface has both a type and a value, skipping emit", "function PipeDecorator() {} // WARNING: interface has both a type and a value, skipping emit", "obtain(){}", "function OptionalDecorator(){}// WARNING: interface has both a type and a value, skipping emit", "function SelfDecorator(){}// WARNING: interface has both a type and a value, skipping emit", "function HostDecorator(){}// WARNING: interface has both a type and a value, skipping emit", "function oi(){}", "function OutputDecorator(){}// WARNING: interface has both a type and a value, skipping emit", "private public function m246() {}", "function SkipSelfDecorator(){}// WARNING: interface has both a type and a value, skipping emit", "function FunctionalComponent() {}", "function v(t, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ne) {\n return t;\n}", "function HostBindingDecorator(){}// WARNING: interface has both a type and a value, skipping emit", "function Adaptor() {}", "function dummy(){}", "function dummy(){}", "function dummy(){}", "static [EXTENDS](R) {\n\t\t\treturn f(R)\n\t\t}", "function AttributeDecorator(){}// WARNING: interface has both a type and a value, skipping emit", "function miFuncion (){}", "function i(e){return new s.default(function(t){t(a(e))})}", "function __it() {}", "function Xb(){return function(v){return v}}", "function _____SHARED_functions_____(){}", "function fi(){return fi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fi.apply(this,arguments)}", "function dummy() {}", "function dummy() {}", "function dummy() {}", "function OutputDecorator() {} // WARNING: interface has both a type and a value, skipping emit", "function OutputDecorator() {} // WARNING: interface has both a type and a value, skipping emit", "function OutputDecorator() {} // WARNING: interface has both a type and a value, skipping emit", "function foo(wrapper){\n wrapper.a = 42;\n}", "function Adapter() {}", "function g(a){[\"next\",\"throw\",\"return\"].forEach(function(b){a[b]=function(a){return this._invoke(b,a)}})}", "get Custom() {}", "apply () {}", "transient protected internal function m189() {}", "compilable(_locator) {\n throw new Error('Method not implemented.');\n }", "compilable(_locator) {\n throw new Error('Method not implemented.');\n }", "compilable(_locator) {\n throw new Error('Method not implemented.');\n }", "function ea(){}", "function Helper() {}", "function o(e){return function(){return e}}", "internalToExternal (metadata, v) {\n return v;\n }", "transient private internal function m185() {}", "function miFuncion(){}", "function miFuncion(){}", "function miFuncion(){}", "function m(t, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ne) {\n return t;\n}", "function HostListenerDecorator(){}// WARNING: interface has both a type and a value, skipping emit", "function L(t, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ne) {\n return t;\n}", "function promoterenhancer(){\n\n}", "function Mixin() {}", "function l(e){[\"next\",\"throw\",\"return\"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}", "function z(){// can be called as an API method\nD(),F()}", "transient private protected internal function m182() {}", "function I(x) { return x; }", "function Alerter() {}", "function wrapfunction(fn,message){if(typeof fn!=='function'){throw new TypeError('argument fn must be a function');}return fn;}", "function NgModuleDecorator(){}// WARNING: interface has both a type and a value, skipping emit", "function example4() {\n\n var me = {\n name: \"Vlad\",\n surname: \"Argentum\"\n };\n\n function hi(_ref) {\n var _ref$name = _ref.name;\n var name = _ref$name === undefined ? \"Guest\" : _ref$name;\n var _ref$surname = _ref.surname;\n var s = _ref$surname === undefined ? \"Anon\" : _ref$surname;\n\n console.log(\"Hi, \" + name + \" \" + s);\n }\n\n hi({}); //Guest Anon\n hi(me); //Vlad Argentum\n\n //even can call without params\n function hi() {\n var _ref2 = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n var _ref2$name = _ref2.name;\n var name = _ref2$name === undefined ? \"No\" : _ref2$name;\n var _ref2$surname = _ref2.surname;\n var s = _ref2$surname === undefined ? \"Params\" : _ref2$surname;\n\n console.log(\"Hi, \" + name + \" \" + s);\n }\n hi(); //No Params\n}", "intercept(): * {\n return {}\n }", "function i(e){[\"next\",\"throw\",\"return\"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}", "static defaultTransform(): Transform {\n /* eslint-disable no-unused-vars */\n return (\n inputObj: any,\n query?: Query,\n requiredProps?: RequiredContractProps,\n ) => inputObj;\n /* eslint-enable no-unused-vars */\n }", "function f(e){const t={inspect:function(){return e}};return l.inspect.custom&&(t[l.inspect.custom]=t.inspect),t}", "function Composition() {}", "function Composition() {}", "function Composition() {}", "function Composition() {}", "function x(t){return\"function\"==typeof t?t:function(){return t}}", "function customHandling() { }", "function lu(){return lu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lu.apply(this,arguments)}", "function __func(){}", "function example(arg1: number, arg2: MyObject): Array<Object> {\n// ^ variable\n// ^ punctuation.type.flowtype\n// ^ support.type.builtin.primitive.flowtype\n// ^ variable\n// ^ support.type.class.flowtype\n// ^ punctuation.type.flowtype\n// ^ support.type.builtin.class.flowtype\n// ^ punctuation.flowtype\n// ^ support.type.builtin.class.flowtype\n// ^ punctuation.flowtype\n}", "function f(e){return e}", "private internal function m248() {}", "function foo(wrapper) {\n\twrapper.a = 42;\n}", "function D(t, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ne) {\n return t;\n}", "function v(){return function(){}}", "function C(t, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ne) {\n return t;\n}", "function Ia(){return(Ia=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}", "function a(e){return function(t){return i(t,e)}}", "function a(e){return function(t){return i(t,e)}}", "function Hi(){return Hi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hi.apply(this,arguments)}", "function I () {}", "function purchaseItem(...fns) => fns.reduce(compose)\n\n{} // so I have to make sure that I have returned in here this property", "adoptedCallback() { }", "function bar (wrapper) {\n wrapper.a = 42;\n}", "function getImplementation( cb ){\n\n }", "function i(e,t){return t}", "function r(e){return function(t){return new a.default(function(n){n(e(t))}).then(function(){return t}).catch(function(){return t})}}", "function Interfaz(){}", "function Io(t,e){for(var n in e)t[n]=e[n];return t}", "extend() {}", "extend() {}", "function ba(){}", "function ba(){}", "function ba(){}", "function ba(){}" ]
[ "0.600452", "0.5736569", "0.5736569", "0.5736569", "0.5734356", "0.56715864", "0.5587215", "0.55719346", "0.5557246", "0.55180275", "0.54874575", "0.5399787", "0.5294553", "0.52819973", "0.5254858", "0.5233107", "0.5231385", "0.5231385", "0.5231385", "0.52263063", "0.5190922", "0.5181019", "0.51663536", "0.5154507", "0.51448727", "0.5139882", "0.5138388", "0.5123674", "0.5123674", "0.5123674", "0.5102041", "0.5102041", "0.5102041", "0.5053621", "0.5038881", "0.50341976", "0.50337803", "0.50294745", "0.49999475", "0.49915645", "0.49915645", "0.49915645", "0.49900842", "0.49786466", "0.4976598", "0.4967648", "0.49618486", "0.49601364", "0.49601364", "0.49601364", "0.49566847", "0.49553165", "0.4948199", "0.49407747", "0.49298203", "0.49297148", "0.49275607", "0.4927093", "0.4926358", "0.49250993", "0.49246368", "0.49133894", "0.49090245", "0.49023944", "0.48947525", "0.4890912", "0.48878673", "0.488763", "0.488763", "0.488763", "0.488763", "0.4882322", "0.4862427", "0.4857748", "0.48552817", "0.4853394", "0.48504314", "0.48454508", "0.48350167", "0.48326564", "0.48173797", "0.48170716", "0.4811127", "0.48076025", "0.48076025", "0.48066065", "0.48011476", "0.47954866", "0.47938985", "0.47911406", "0.47902188", "0.47895208", "0.47855234", "0.47847673", "0.47830936", "0.47828168", "0.47828168", "0.47797564", "0.47797564", "0.47797564", "0.47797564" ]
0.0
-1
ref 5318 necessary to ensure parent rerender when deep bindings like :style and :class are used on slot nodes
function registerDeepBindings (data) { if (isObject(data.style)) { traverse(data.style); } if (isObject(data.class)) { traverse(data.class); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "slotchange() {\n let call = 0;\n for (const child of this.slotted.assignedNodes()) {\n if (child && child.nodeType === 1) {\n child.style.zIndex = 99 - call;\n if (this.isEvenNumber(call++)) {\n child.classList.add('animate-down');\n } else {\n child.classList.add('animate-up');\n }\n this.dispatchEvent(new CustomEvent('child-change', {detail: child}));\n }\n }\n }", "slotchange() {\n let call = 0;\n for (const child of this.slotted.assignedNodes()) {\n if (child && child.nodeType === 1) {\n child.style.zIndex = 99 - call;\n if (this.isEvenNumber(call++)) {\n child.classList.add('animate-down');\n } else {\n child.classList.add('animate-up');\n }\n this.dispatchEvent(new CustomEvent('child-change', {detail: child}));\n }\n }\n }", "_render() {\n const ctor = this.constructor;\n const hasIndividualSlots = ctor.getMetadata().hasIndividualSlots();\n // suppress invalidation to prevent state changes scheduling another rendering\n this._suppressInvalidation = true;\n this.onBeforeRendering();\n // Intended for framework usage only. Currently ItemNavigation updates tab indexes after the component has updated its state but before the template is rendered\n if (this._onComponentStateFinalized) {\n this._onComponentStateFinalized();\n }\n // resume normal invalidation handling\n this._suppressInvalidation = false;\n // Update the shadow root with the render result\n /*\n if (this._changedState.length) {\n let element = this.localName;\n if (this.id) {\n element = `${element}#${this.id}`;\n }\n console.log(\"Re-rendering:\", element, this._changedState.map(x => { // eslint-disable-line\n let res = `${x.type}`;\n if (x.reason) {\n res = `${res}(${x.reason})`;\n }\n res = `${res}: ${x.name}`;\n if (x.type === \"property\") {\n res = `${res} ${JSON.stringify(x.oldValue)} => ${JSON.stringify(x.newValue)}`;\n }\n return res;\n }));\n }\n */\n this._changedState = [];\n // Update shadow root and static area item\n if (ctor._needsShadowDOM()) {\n (0, _updateShadowRoot.default)(this);\n }\n if (this.staticAreaItem) {\n this.staticAreaItem.update();\n }\n // Safari requires that children get the slot attribute only after the slot tags have been rendered in the shadow DOM\n if (hasIndividualSlots) {\n this._assignIndividualSlotsToChildren();\n }\n // Call the onAfterRendering hook\n this.onAfterRendering();\n }", "OnRebuiltByParent(parent)\n {\n this._parent = parent;\n this._bone = parent ? parent.GetBone(this.boneIndex) : null;\n this._dirty = false;\n }", "update(e){super.update(e);const t=this.render();t instanceof TemplateResult&&this.constructor.render(t,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach(e=>{const t=document.createElement(\"style\");t.textContent=e.cssText,this.renderRoot.appendChild(t)}))}", "setVarientComponents (qModel) {\n // console.debug('setInstanceComponents')\n\n /**\n * Mark all elements of a variant as a component for the\n * design lets\n */\n let varientComponents = {}\n Object.values(qModel.widgets).forEach(widget => {\n let parent = qModel.widgets[widget.parentId]\n if (parent && parent.figmaType === 'COMPONENT_SET') {\n widget.props.isComponet = true\n widget.props.isVaraint = true\n widget.variant = this.parseVariant(widget.name)\n if (!varientComponents[widget.parentId]){\n varientComponents[widget.parentId] = []\n }\n varientComponents[widget.parentId].push(widget)\n /**\n * Give a better na,e other wise css will fail\n */\n widget.name = parent.name + '-' + Object.values(widget.variant).join('-')\n }\n })\n }", "function resetComponentState(){isParent=false;previousOrParentTNode=null;elementDepthCount=0;bindingsEnabled=true;}", "function updateParentComponentVNodes(vNode, dom) {\r\n if (vNode.flags & 28 /* Component */) {\r\n var parentVNode = vNode.parentVNode;\r\n if (parentVNode) {\r\n parentVNode.dom = dom;\r\n updateParentComponentVNodes(parentVNode, dom);\r\n }\r\n }\r\n}", "function updateParentComponentVNodes(vNode, dom) {\n if (vNode.flags & 28 /* Component */) {\n var parentVNode = vNode.parentVNode;\n if (parentVNode) {\n parentVNode.dom = dom;\n updateParentComponentVNodes(parentVNode, dom);\n }\n }\n }", "parseChild(parent, astElement, code, options) {\n const child = super.parseChild(parent, astElement, code, options);\n if (child instanceof JSXElement) {\n if (parent.oid) child._parent = parent.oid;\n }\n return child;\n }", "bind(context) {\n this.$parent = context;\n }", "refresh_() {\n // Can be overridden in sub-component.\n }", "update(changedProperties){super.update(changedProperties);const templateResult=this.render();if(templateResult instanceof TemplateResult){this.constructor.render(templateResult,this.renderRoot,{scopeName:this.localName,eventContext:this})}// When native Shadow DOM is used but adoptedStyles are not supported,\n// insert styling after rendering to ensure adoptedStyles have highest\n// priority.\nif(this._needsShimAdoptedStyleSheets){this._needsShimAdoptedStyleSheets=!1;this.constructor._styles.forEach(s=>{const style=document.createElement(\"style\");style.textContent=s.cssText;this.renderRoot.appendChild(style)})}}", "c4uAddChild(child) { \n if (this.c4uUid == child.c4uParentId) {\n child.c4uParent = this; // maybe get changed later (if mounted)\n child.c4uAncestor = this; // this is final here \n var childTag = child.c4uTag;\n var uniqueElements = new Array();\n if(childTag in this.c4uChildren) {\n this.c4uChildren[childTag].forEach(elem => {\n uniqueElements[elem.c4uUid] = elem;\n })\n }\n // check if old element will be overwritten by new one\n if(uniqueElements[child.c4uUid]) {\n uniqueElements[child.c4uUid].c4uParentDisconnected(this); \n this.c4uChildDisconnected(uniqueElements[child.c4uUid]);\n }\n // add new element\n uniqueElements[child.c4uUid] = child;\n\n var newChildren = new Array();\n for (var items in uniqueElements){\n newChildren.push( uniqueElements[items] );\n }\n child.c4uParentReconnected(this);\n this.c4uChildReconnected(child);\n Vue.set(this.c4uChildren, childTag, newChildren);\n\n }\n }", "firstUpdated(props) {\n [...this.renderRoot.querySelectorAll('[id]')].forEach(node => {\n this.$[node.id] = node;\n });\n super.firstUpdated(props);\n }", "c4uParentReconnected(parent) {}", "update(changedProperties){// Setting properties in `render` should not trigger an update. Since\n// updates are allowed after super.update, it's important to call `render`\n// before that.\nconst templateResult=this.render();super.update(changedProperties);// If render is not implemented by the component, don't call lit-html render\nif(templateResult!==renderNotImplemented){this.constructor.render(templateResult,this.renderRoot,{scopeName:this.localName,eventContext:this});}// When native Shadow DOM is used but adoptedStyles are not supported,\n// insert styling after rendering to ensure adoptedStyles have highest\n// priority.\nif(this._needsShimAdoptedStyleSheets){this._needsShimAdoptedStyleSheets=false;this.constructor._styles.forEach(s=>{const style=document.createElement('style');style.textContent=s.cssText;this.renderRoot.appendChild(style);});}}", "function resetComponentState() {\n isParent = false;\n previousOrParentTNode = null;\n elementDepthCount = 0;\n bindingsEnabled = true;\n}", "function resetComponentState() {\n isParent = false;\n previousOrParentTNode = null;\n elementDepthCount = 0;\n bindingsEnabled = true;\n}", "function resetComponentState() {\n isParent = false;\n previousOrParentTNode = null;\n elementDepthCount = 0;\n bindingsEnabled = true;\n}", "function resetComponentState() {\n isParent = false;\n previousOrParentTNode = null;\n elementDepthCount = 0;\n bindingsEnabled = true;\n}", "constructor(props) { super(props); autoBind(this); }", "function updateParentComponentVNodes(vNode, dom) {\n if (vNode.flags & 28 /* Component */) {\n const parentVNode = vNode.parentVNode;\n if (parentVNode) {\n parentVNode.dom = dom;\n updateParentComponentVNodes(parentVNode, dom);\n }\n }\n}", "function updateParentComponentVNodes(vNode, dom) {\n if (vNode.flags & 28 /* Component */) {\n const parentVNode = vNode.parentVNode;\n if (parentVNode) {\n parentVNode.dom = dom;\n updateParentComponentVNodes(parentVNode, dom);\n }\n }\n}", "_renderNewRootComponent(/* instance, ... */) { }", "function propagateSubinstances () {\n var re = {};\n each(child.get(), function (val, key) {\n if (isRactiveInstance(val)) re[key] = val;\n });\n\n parent.set(prefixer(re));\n }", "_didRender(_props, _changedProps, _prevProps) { }", "_update() {\n render(this._template(), this.shadowRoot, {eventContext: this});\n }", "function QMLBaseObject(meta, parent, engine) {\n var i,\n prop,\n self = this;\n\n if (!this.$draw)\n this.$draw = noop;\n this.$scope = workingContext[workingContext.length-1];\n if (!this.$ownProperties)\n this.$ownProperties = [];\n\n // parent\n this.parent = parent;\n\n // id\n if (meta.id) {\n this.id = meta.id;\n this.$scope.defId(meta.id, this);\n }\n\n // children\n this.$children = [];\n function setChildren(childMeta) {\n child = construct(childMeta, this, engine);\n this.$children.push( child );\n }\n function getChildren() {\n return this.$children;\n }\n setupGetterSetter(this, \"children\", getChildren, setChildren);\n\n //defaultProperty\n if (!this.$applyChild) {\n this.$applyChild = function(newVal) {\n this.children = newVal;\n };\n }\n\n // properties\n if (meta.$properties) {\n for (i in meta.$properties) {\n prop = meta.$properties[i];\n if (prop.type == \"alias\") {\n // alias is reverse property, reverse getters and setters needed\n if (!(prop.value instanceof QMLBinding)) {\n console.log(\"Assumption failed: alias was not binding\");\n }\n console.log(\"Aliases not yet supported\");\n /* Aliases are not yet supported.\n Following code has never been executed.\n Left here for reference.\n\n this[GETTER](i, function() {\n return evalBinding(null, prop.value.src, this);\n });\n this[SETTER](i, function(val) {\n // val needs to be assigned to property/object/thingie\n // pointed by value.\n // todo: not sure how to do this by-the-book.\n\n // Way 1:\n // Inject value-to-be-assigned to scope and alter the\n // binding to assign the value. Then evaluate. Dirty hack?\n var scope = this,\n assignment = \"(\" + prop.value.src + \") = $$$val\";\n scope.$$$val = val;\n evalBinding(null, assignment, scope);\n\n // Way 2:\n // Evaluate binding to get the target object, then simply\n // assign. Didn't choose this as I'm afraid it wont work for\n // primitives.\n // var a = evalBinding(null,\n // prop.value.src, scope);\n // a = val;\n //\n\n });\n }\n */\n } else {\n createSimpleProperty(this, i);\n this[i] = prop.value;\n }\n }\n }\n\n // todo: handle alias property assignments here?\n\n // methods\n function createMethod(item, name, method) {\n // Trick: evaluate method with bindings to get pointer to\n // function that can then be applied with arguments\n // given to this function to do the job (and get the return\n // values).\n var func = evalBinding(null,\n method + \";\" + name,\n item,\n workingContext[workingContext.length-1].getIdScope());\n return function() {\n return func.apply(null, arguments);\n };\n }\n if (meta.$functions) {\n for (i in meta.$functions) {\n this[i] = createMethod(this, i, meta.$functions[i]);\n }\n }\n\n // signals\n if (meta.$signals) {\n for (i in meta.$signals) {\n createSignal(this, meta.$signals[i].name, meta.$signals[i].params);\n }\n }\n\n // Component.onCompleted\n this.Component = {};\n createSignal(this.Component, \"completed\", [], { altParent: this });\n engine.completedSignals.push(this.Component.completed);\n\n // Construct from meta, not from this!\n if (meta.$children) {\n for (i = 0; i < meta.$children.length; i++) {\n // This will call the setter of the defaultProperty\n // In case of the default property being children\n // (normal case) it will add a new child\n this.$applyChild(meta.$children[i]);\n }\n }\n\n if (!this.$init)\n this.$init = [];\n this.$init[0] = function() {\n if (engine.renderMode == QMLRenderMode.DOM\n && self.$domElement !== Undefined && parent.$domElement) {\n parent.$domElement.appendChild(self.$domElement);\n }\n\n // Apply property-values which are set inside the Component-definition\n if (meta.$componentMeta) {\n workingContext.push(self.$internScope);\n applyProperties(meta.$componentMeta, self);\n workingContext.pop();\n }\n\n workingContext.push(self.$scope);\n applyProperties(meta, self);\n workingContext.pop();\n\n\n if (self.$internChildren != undefined) {\n for (var i in self.$internChildren) {\n for (var j = self.$internChildren[i].$init.length - 1; j>=0; j--)\n self.$internChildren[i].$init[j]();\n }\n } else {\n for (var i in self.$children) {\n for (var j = self.$children[i].$init.length - 1; j>=0; j--)\n self.$children[i].$init[j]();\n }\n }\n }\n}", "renderChildrenOnly() {\n this.children.forEach(child => child.render(this.$element));\n }", "_renderChild(comp, vel) {\n // HACK: to make this work with the rest of the implementation\n // we ingest a fake parent\n var state = new RenderingEngine.State(this.elementFactory)\n vel.parent = { _comp: comp }\n try {\n _capture(state, vel)\n _render(state, vel)\n return vel._comp\n } finally {\n state.dispose()\n }\n }", "get parent () { return this._parent; }", "render_() {\n super.render_();\n this.updateSlider_();\n }", "render() {\n return cloneElement(this.props.children, { qewd: this.props.qewd, qewdProviderState: this.state })\n }", "render (parent) {\n // Update template\n this.template = '<div>' + this.label + '</div>';\n\n // Call original render function\n this._render (parent);\n }", "function updateParent(e) {\n var context = e.context;\n\n self.updateParent(context.shape || context.connection, context.oldParent);\n }", "function updateParent(e) {\n var context = e.context;\n\n self.updateParent(context.shape || context.connection, context.oldParent);\n }", "_onCurrentChanged(sender, args) {\n if (args.newValue) {\n args.newValue.title.className += ` ${CURRENT_CLASS}`;\n }\n if (args.oldValue) {\n args.oldValue.title.className = args.oldValue.title.className.replace(CURRENT_CLASS, '');\n }\n this._currentChanged.emit(args);\n this._onLayoutModified();\n }", "_updateZIndexAllSiblings() {\n HSystem.updateZIndexOfChildren(this.parent.viewId);\n }", "applyRenderAttributes() {\n let me = this,\n container = Neo.getComponent(me.containerId),\n cls = container && container.cls;\n\n if (!container) {\n Neo.logError('layout.Fit: applyRenderAttributes -> container not yet created', me.containerId);\n }\n\n _util_Array_mjs__WEBPACK_IMPORTED_MODULE_1__.default.add(cls || [], 'neo-layout-fit');\n\n container.cls = cls;\n }", "applyRenderAttributes() {\n let me = this,\n container = Neo.getComponent(me.containerId),\n cls = container && container.cls;\n\n if (!container) {\n Neo.logError('layout.Fit: applyRenderAttributes -> container not yet created', me.containerId);\n }\n\n _util_Array_mjs__WEBPACK_IMPORTED_MODULE_1__[\"default\"].add(cls || [], 'neo-layout-fit');\n\n container.cls = cls;\n }", "function patchSlot(vnode, vm) {\n if (vnode.context) {\n vnode.context = vm._self;\n }\n if (vnode.fnContext) {\n vnode.fnContext = vm._self;\n }\n return vnode;\n}", "function updateParent(e) {\n var context = e.context;\n self.updateParent(context.shape || context.connection, context.oldParent);\n }", "_resolveDef() {\n if (this._resolved) {\n return;\n }\n this._resolved = true;\n // set initial attrs\n for (let i = 0; i < this.attributes.length; i++) {\n this._setAttr(this.attributes[i].name);\n }\n // watch future attr changes\n new MutationObserver(mutations => {\n for (const m of mutations) {\n this._setAttr(m.attributeName);\n }\n }).observe(this, { attributes: true });\n const resolve = (def) => {\n const { props, styles } = def;\n const hasOptions = !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(props);\n const rawKeys = props ? (hasOptions ? Object.keys(props) : props) : [];\n // cast Number-type props set before resolve\n let numberProps;\n if (hasOptions) {\n for (const key in this._props) {\n const opt = props[key];\n if (opt === Number || (opt && opt.type === Number)) {\n this._props[key] = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toNumber)(this._props[key]);\n (numberProps || (numberProps = Object.create(null)))[key] = true;\n }\n }\n }\n this._numberProps = numberProps;\n // check if there are props set pre-upgrade or connect\n for (const key of Object.keys(this)) {\n if (key[0] !== '_') {\n this._setProp(key, this[key], true, false);\n }\n }\n // defining getter/setters on prototype\n for (const key of rawKeys.map(_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)) {\n Object.defineProperty(this, key, {\n get() {\n return this._getProp(key);\n },\n set(val) {\n this._setProp(key, val);\n }\n });\n }\n // apply CSS\n this._applyStyles(styles);\n // initial render\n this._update();\n };\n const asyncDef = this._def.__asyncLoader;\n if (asyncDef) {\n asyncDef().then(resolve);\n }\n else {\n resolve(this._def);\n }\n }", "function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {\n if (_shared.isArray(rawRef)) {\n rawRef.forEach((r, i)=>setRef(r, oldRawRef && (_shared.isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), parentSuspense, vnode, isUnmount)\n );\n return;\n }\n if (isAsyncWrapper(vnode) && !isUnmount) // when mounting async components, nothing needs to be done,\n // because the template ref is forwarded to inner component\n return;\n const refValue = vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */ ? getExposeProxy(vnode.component) || vnode.component.proxy : vnode.el;\n const value = isUnmount ? null : refValue;\n const { i: owner , r: ref } = rawRef;\n if (!owner) {\n warn(`Missing ref owner context. ref cannot be used on hoisted vnodes. ` + `A vnode with ref must be created inside the render function.`);\n return;\n }\n const oldRef = oldRawRef && oldRawRef.r;\n const refs = owner.refs === _shared.EMPTY_OBJ ? owner.refs = {\n } : owner.refs;\n const setupState = owner.setupState;\n // dynamic ref changed. unset old ref\n if (oldRef != null && oldRef !== ref) {\n if (_shared.isString(oldRef)) {\n refs[oldRef] = null;\n if (_shared.hasOwn(setupState, oldRef)) setupState[oldRef] = null;\n } else if (_reactivity.isRef(oldRef)) oldRef.value = null;\n }\n if (_shared.isFunction(ref)) callWithErrorHandling(ref, owner, 12 /* FUNCTION_REF */ , [\n value,\n refs\n ]);\n else {\n const _isString = _shared.isString(ref);\n const _isRef = _reactivity.isRef(ref);\n if (_isString || _isRef) {\n const doSet = ()=>{\n if (rawRef.f) {\n const existing = _isString ? refs[ref] : ref.value;\n if (isUnmount) _shared.isArray(existing) && _shared.remove(existing, refValue);\n else {\n if (!_shared.isArray(existing)) {\n if (_isString) refs[ref] = [\n refValue\n ];\n else {\n ref.value = [\n refValue\n ];\n if (rawRef.k) refs[rawRef.k] = ref.value;\n }\n } else if (!existing.includes(refValue)) existing.push(refValue);\n }\n } else if (_isString) {\n refs[ref] = value;\n if (_shared.hasOwn(setupState, ref)) setupState[ref] = value;\n } else if (_reactivity.isRef(ref)) {\n ref.value = value;\n if (rawRef.k) refs[rawRef.k] = value;\n } else warn('Invalid template ref type:', ref, `(${typeof ref})`);\n };\n if (value) {\n doSet.id = -1;\n queuePostRenderEffect(doSet, parentSuspense);\n } else doSet();\n } else warn('Invalid template ref type:', ref, `(${typeof ref})`);\n }\n}", "function getRealChild(vnode){var compOptions=vnode&&vnode.componentOptions;if(compOptions&&compOptions.Ctor.options.abstract){return getRealChild(getFirstComponentChild(compOptions.children));}else{return vnode;}}", "function getRealChild(vnode){var compOptions=vnode&&vnode.componentOptions;if(compOptions&&compOptions.Ctor.options.abstract){return getRealChild(getFirstComponentChild(compOptions.children));}else{return vnode;}}", "function getRealChild(vnode){var compOptions=vnode&&vnode.componentOptions;if(compOptions&&compOptions.Ctor.options.abstract){return getRealChild(getFirstComponentChild(compOptions.children));}else{return vnode;}}", "c4uChildReconnected(child) {}", "_propertiesChanged(...args) {\n super._propertiesChanged(...args);\n render(this.render(), this.shadowRoot);\n }", "render() {\n return (\n <div rel={ ref => ( this.domContainer = ref ) }></div>\n )\n }", "[_virtualRender]() {\n let contents = this.render() || [];\n let items = this[_items];\n let childContext = this.getChildContext();\n\n if (!(contents instanceof Array)) {\n contents = [ contents ];\n }\n\n // Sometimes the array can contain other arrays, so we need to flatten it out\n // (this also strips out any null elements)\n contents = flatten(contents, isNullOrWhitespace);\n\n for (let i = 0; i < contents.length; i++) {\n let content = contents[i];\n let item = items[i];\n\n if (item && !(item instanceof content.type)) {\n item.componentWillUnmount && item.componentWillUnmount();\n this.unlink(item);\n item = undefined;\n }\n if (item && (propsDiffer(content.props, item.props) || propsDiffer(childContext, item.context))) {\n item.componentWillUpdate(content.props, childContext);\n item.props = content.props;\n item.context = childContext;\n }\n if (!item) {\n items[i] = this.link(instantiateContent(content, childContext));\n items[i]._parent = this;\n items[i][_virtualRender]();\n items[i].componentDidMount && items[i].componentDidMount();\n }\n }\n for (let i = contents.length; i < items.length; i++) {\n let item = items[i];\n if (item) {\n item.componentWillUnmount && item.componentWillUnmount();\n this.unlink(item);\n }\n }\n items.length = contents.length;\n\n BinderRecordChange(this, 'virtual.children');\n }", "connectedCallback() {\n\t\tif (this.attached) return;\n\t\t// \"this\" will be the instance of the tag that extends BaseComponent.\n\t\tBaseComponent.buildReverseBindings(this);\n\t\tthis.attached = true;\n\t}", "render() { return super.render(); }", "UNSAFE_componentWillReceiveProps(parentProps) {\n if (this.state.visible !== parentProps.visible) {\n this.setState({\n visible: parentProps.visible,\n dataset: parentProps.dataset\n });\n }\n }", "_propertiesChanged(props, changedProps, prevProps) {\n super._propertiesChanged(props, changedProps, prevProps);\n const result = this._render(props);\n if (result && this._root !== undefined) {\n this._applyRender(result, this._root);\n }\n this._didRender(props, changedProps, prevProps);\n if (this.__resolveRenderComplete) {\n this.__resolveRenderComplete(true);\n }\n }", "onCustomWidgetBeforeUpdate(changedProperties) {\r\n\r\n\t\t}", "onCustomWidgetBeforeUpdate(oChangedProperties) {\n\n \n\n\n }", "beforeUpdate() {\n this.items.children[this.index].style.transform = `scale(1)`\n }", "function McOptionParentComponent() { }", "constructor(){\n super();\n this.name='parent element';\n }", "function ViewChildDecorator() { }", "function ViewChildDecorator() { }", "function registerDeepBindings(data) {\n if (isObject(data.style)) {\n traverse(data.style);\n }\n\n if (isObject(data[\"class\"])) {\n traverse(data[\"class\"]);\n }\n }", "removeRenderAttributes() {\n let me = this,\n container = Neo.getComponent(me.containerId),\n cls = container && container.cls;\n\n if (!container) {\n Neo.logError('layout.Fit: removeRenderAttributes -> container not yet created', me.containerId);\n }\n\n _util_Array_mjs__WEBPACK_IMPORTED_MODULE_1__.default.remove(cls, 'neo-layout-fit');\n\n container.cls = cls;\n }", "function bindObjectProps(data,tag,value,asProp,isSync){if(value){if(!isObject(value)){\"development\"!=='production'&&warn('v-bind without argument expects an Object or Array value',this);}else{if(Array.isArray(value)){value=toObject(value);}var hash;var loop=function loop(key){if(key==='class'||key==='style'||isReservedAttribute(key)){hash=data;}else{var type=data.attrs&&data.attrs.type;hash=asProp||config.mustUseProp(tag,type,key)?data.domProps||(data.domProps={}):data.attrs||(data.attrs={});}if(!(key in hash)){hash[key]=value[key];if(isSync){var on=data.on||(data.on={});on[\"update:\"+key]=function($event){value[key]=$event;};}}};for(var key in value){loop(key);}}}return data;}", "function bindObjectProps(data,tag,value,asProp,isSync){if(value){if(!isObject(value)){\"development\"!=='production'&&warn('v-bind without argument expects an Object or Array value',this);}else{if(Array.isArray(value)){value=toObject(value);}var hash;var loop=function loop(key){if(key==='class'||key==='style'||isReservedAttribute(key)){hash=data;}else{var type=data.attrs&&data.attrs.type;hash=asProp||config.mustUseProp(tag,type,key)?data.domProps||(data.domProps={}):data.attrs||(data.attrs={});}if(!(key in hash)){hash[key]=value[key];if(isSync){var on=data.on||(data.on={});on[\"update:\"+key]=function($event){value[key]=$event;};}}};for(var key in value){loop(key);}}}return data;}", "initialize(){super.initialize(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}", "function SVGParent() {}", "_restoreOriginalChildNodes() {\n // Add the original nodes back in\n this.properties.originalChildNodes.forEach(item => this.nodes.content.appendChild(item));\n // Remove this stale array\n delete this.properties.originalChildNodes;\n\n // Make sure that any nodes with a layer-id are properly linked in the parent component\n // Note that onReplaceableContentAdded() will not get called to add these the way it is\n // called for any replaceable content that is inserted\n this._findNodesWithin(this, (node, isComponent) => {\n const layerId = node.getAttribute && node.getAttribute('layer-id');\n if (layerId) this.parentComponent.nodes[layerId] = node;\n\n // If its a UI Component and not some generic DOM node, setup the originalChildNode's parentComponent pointer as well\n if (isComponent) {\n if (!node.properties) node.properties = {};\n node.properties.parentComponent = this.parentComponent;\n }\n });\n }", "updateSelf(namedChildren, data) {\n this.namedChildren = namedChildren;\n this.props = data;\n }", "reRender() {\n this.removeAllChildrenComponents()\n\n this.build()\n }", "observe() {\n this.target.addEventListener(\"slotchange\", this);\n }", "childrenUpdated() {\n\t\t\tsuper.childrenUpdated && super.childrenUpdated();\n\t\t\tif (this.props && this.props.hasOwnProperty('children')) {\n\t\t\t\tthis.props = { children: this.children };\n\t\t\t}\n\t\t}", "changed() {\n if ( this.nameParent ) {\n var pos = this.headPos().clone();\n pos.y += .4;\n this.nameParent.position = pos;\n }\n }", "function preLinkFn($is, $el, attrs) {\n $is.widgetProps = attrs.widgetid ? Utils.getClonedObject(widgetProps) : widgetProps;\n updateLiveListProps(attrs.position);\n }", "function ViewChildDecorator(){}", "_refresh() {\n const children = Array.from(this.slottedChildren);\n if (children.length && this.expanded) {\n this._expand();\n Array.from(children).forEach(el => el._refresh());\n }\n }", "function slotFor(that, prop) {\n if (that._rhaboo.kids[prop]===undefined) {\n var slotnum = newSlot(that._rhaboo.storage);\n appendKid(that, prop, slotnum); //Manage the linked list of children in _rhaboo\n updateSlot(that, that._rhaboo.kids[prop].prev); //The formerly last child now needs a reference to the new one\n //This slot is about to be written by caller\n }\n}", "connectedCallback() {\n \tsuper.connectedCallback();\n \t\n \tvar element = this;\n while(element.parentNode && (element = element.parentNode)) {\n if(element instanceof ShadowRoot){\n console.error(\"This element does not support shadow roots. Please use a <slot> for the element instead.\", element);\n }\n }\n }", "removeRenderAttributes() {\n let me = this,\n container = Neo.getComponent(me.containerId),\n cls = container && container.cls;\n\n if (!container) {\n Neo.logError('layout.Fit: removeRenderAttributes -> container not yet created', me.containerId);\n }\n\n _util_Array_mjs__WEBPACK_IMPORTED_MODULE_1__[\"default\"].remove(cls, 'neo-layout-fit');\n\n container.cls = cls;\n }", "function registerDeepBindings(data) {\n if (isObject(data.style)) {\n traverse(data.style);\n }\n\n if (isObject(data[\"class\"])) {\n traverse(data[\"class\"]);\n }\n} // import {", "function registerDeepBindings(data) {\n if (isObject(data.style)) {\n traverse(data.style);\n }\n\n if (isObject(data[\"class\"])) {\n traverse(data[\"class\"]);\n }\n}", "componentWillUpdate() {\n hotButtonStyle = notSelectedClass;\n newButtonStyle = notSelectedClass;\n risingButtonStyle = notSelectedClass;\n topButtonStyle = notSelectedClass;\n }", "function setScope(vnode){var i;if(isDef(i=vnode.fnScopeId)){nodeOps.setAttribute(vnode.elm,i,'');}else{var ancestor=vnode;while(ancestor){if(isDef(i=ancestor.context)&&isDef(i=i.$options._scopeId)){nodeOps.setAttribute(vnode.elm,i,'');}ancestor=ancestor.parent;}}// for slot content they should also get the scopeId from the host instance.\nif(isDef(i=activeInstance)&&i!==vnode.context&&i!==vnode.fnContext&&isDef(i=i.$options._scopeId)){nodeOps.setAttribute(vnode.elm,i,'');}}", "initialize(){super.initialize();this.constructor._getUniqueStyles();this.renderRoot=this.createRenderRoot();// Note, if renderRoot is not a shadowRoot, styles would/could apply to the\n// element's getRootNode(). While this could be done, we're choosing not to\n// support this now since it would require different logic around de-duping.\nif(window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot){this.adoptStyles();}}", "_nodeStateChange(type) {\n if (this._renderData) {\n this.markForUpdateRenderData();\n }\n\n for (const child of this.node.children) {\n const renderComp = child.getComponent(UIRenderable);\n\n if (renderComp) {\n renderComp.markForUpdateRenderData();\n }\n }\n }", "applyRenderAttributes() {\n let me = this,\n container = Neo.getComponent(me.containerId),\n cls = container && container.cls;\n\n if (!container) {\n Neo.logError('layout.Card: applyRenderAttributes -> container not yet created', me.containerId);\n }\n\n _util_Array_mjs__WEBPACK_IMPORTED_MODULE_1__[\"default\"].add(cls || [], 'neo-layout-card');\n\n container.cls = cls;\n }", "function registerDeepBindings(data) {\n if (isObject(data.style)) {\n traverse(data.style);\n }\n if (isObject(data.class)) {\n traverse(data.class);\n }\n }", "function ViewChildDecorator() {}", "function ViewChildDecorator() {}", "function ViewChildDecorator() {}", "applyRenderAttributes() {\n let me = this,\n container = Neo.getComponent(me.containerId),\n cls = container && container.cls;\n\n if (!container) {\n Neo.logError('layout.Card: applyRenderAttributes -> container not yet created', me.containerId);\n }\n\n _util_Array_mjs__WEBPACK_IMPORTED_MODULE_1__.default.add(cls || [], 'neo-layout-card');\n\n container.cls = cls;\n }", "_onStyleChange() {\n this.dirty = true;\n }", "connectedCallback(){\n\n //Though here DOM is inserted, but not rendered, so you can change the attribute \n //but you cannot manipulate the DOM \n\n //You can not programatically add or remove the element \n console.log(\"Child's Component's Connected Callback is Called!\");\n }", "_afterRender () {\n this.adjust();\n }", "render() {\n let anchorAttributes = {\n class: {\n [this.activeClass]: this.match !== null,\n },\n onClick: this.handleClick.bind(this)\n };\n if (this.anchorClass) {\n anchorAttributes.class[this.anchorClass] = true;\n }\n if (this.custom === 'a') {\n anchorAttributes = Object.assign(Object.assign({}, anchorAttributes), { href: this.url, title: this.anchorTitle, role: this.anchorRole, tabindex: this.anchorTabIndex, 'aria-haspopup': this.ariaHaspopup, id: this.anchorId, 'aria-posinset': this.ariaPosinset, 'aria-setsize': this.ariaSetsize, 'aria-label': this.ariaLabel });\n }\n return (index.h(this.custom, Object.assign({}, anchorAttributes), index.h(\"slot\", null)));\n }", "getStyle(vnode) {}", "initialize(){super.initialize();this.renderRoot=this.createRenderRoot();// Note, if renderRoot is not a shadowRoot, styles would/could apply to the\n// element's getRootNode(). While this could be done, we're choosing not to\n// support this now since it would require different logic around de-duping.\nif(window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot){this.adoptStyles()}}", "_addProps(vNode) {\n // for Intact reusing the dom\n this.vdt = {vNode};\n\n const props = vNode.props;\n // react vNode has been frozen, so we must clone it to change\n let cloneVNode;\n let _props;\n for (let key in props) {\n if (key === 'reactVNode' || key === '_parentRef') continue;\n // ignore _evClick _evMouseEnter property which add in some components temporarily\n if (ignorePropRegExp.test(key)) continue;\n if (!cloneVNode) {\n cloneVNode = {...props.reactVNode};\n _props = cloneVNode.props = {...cloneVNode.props};\n }\n const prop = props[key];\n // is event\n if (key.substr(0, 3) === 'ev-') {\n _props[eventsMap[key]] = prop;\n } else {\n _props[key] = prop;\n }\n }\n\n return cloneVNode || props.reactVNode;\n }", "function renderSlot(name,fallback,props,bindObject){var scopedSlotFn=this.$scopedSlots[name];var nodes;if(scopedSlotFn){// scoped slot\nprops=props||{};if(bindObject){if(\"development\"!=='production'&&!isObject(bindObject)){warn('slot v-bind without argument expects an Object',this);}props=extend(extend({},bindObject),props);}nodes=scopedSlotFn(props)||fallback;}else{var slotNodes=this.$slots[name];// warn duplicate slot usage\nif(slotNodes){if(\"development\"!=='production'&&slotNodes._rendered){warn(\"Duplicate presence of slot \\\"\"+name+\"\\\" found in the same render tree \"+\"- this will likely cause render errors.\",this);}slotNodes._rendered=true;}nodes=slotNodes||fallback;}var target=props&&props.slot;if(target){return this.$createElement('template',{slot:target},nodes);}else{return nodes;}}" ]
[ "0.6036943", "0.6036943", "0.59391546", "0.5817875", "0.57814604", "0.572591", "0.57103086", "0.560922", "0.56005704", "0.5576743", "0.5556157", "0.55253136", "0.5524546", "0.5522381", "0.5513708", "0.54611915", "0.5453313", "0.5452324", "0.5452324", "0.5452324", "0.5452324", "0.54270166", "0.542406", "0.542406", "0.541727", "0.5414136", "0.53994775", "0.53894836", "0.53828454", "0.5378159", "0.534812", "0.53432083", "0.53328335", "0.5329998", "0.53225476", "0.53148174", "0.53148174", "0.5313193", "0.53129685", "0.5306147", "0.5298187", "0.5294703", "0.5275715", "0.5275532", "0.52754015", "0.52736765", "0.52736765", "0.52736765", "0.5271395", "0.5264481", "0.52594334", "0.52548814", "0.52522326", "0.52507865", "0.52265763", "0.5226003", "0.52234143", "0.52109486", "0.5209581", "0.52092415", "0.5205797", "0.52045333", "0.52045333", "0.5197484", "0.51868373", "0.5185932", "0.5185932", "0.5184397", "0.5181649", "0.5180817", "0.5171971", "0.51704586", "0.5170076", "0.51670146", "0.51647085", "0.51592064", "0.5158465", "0.51530546", "0.5149693", "0.51432234", "0.5142243", "0.51371163", "0.51358765", "0.5135399", "0.51328844", "0.5129413", "0.5127462", "0.5126303", "0.5126033", "0.51181716", "0.51181716", "0.51181716", "0.5118092", "0.5116934", "0.51154196", "0.51124984", "0.5110951", "0.5110255", "0.5107322", "0.5104644", "0.50957996" ]
0.0
-1
Reset the scheduler's state.
function resetSchedulerState () { index = queue.length = activatedChildren.length = 0; has = {}; if (false) {} waiting = flushing = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "resetSchedule() {\n this._scheduler.resetSchedule();\n }", "function resetSchedulerState () {\n queue.length = 0;\n has$1 = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n queue.length = 0;\n has$1 = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n queue.length = 0;\n has$1 = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n\t queue.length = 0;\n\t has$1 = {};\n\t {\n\t circular = {};\n\t }\n\t waiting = flushing = false;\n\t}", "function resetSchedulerState () {\n queue.length = 0;\n has = {};\n if (false) {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n\t queue.length = 0;\n\t has$1 = {};\n\t if (process.env.NODE_ENV !== 'production') {\n\t circular = {};\n\t }\n\t waiting = flushing = false;\n\t}", "function resetSchedulerState () {\n\t queue.length = 0;\n\t has$1 = {};\n\t if (process.env.NODE_ENV !== 'production') {\n\t circular = {};\n\t }\n\t waiting = flushing = false;\n\t}", "function resetSchedulerState () {\n\t queue.length = 0;\n\t has = {};\n\t {\n\t circular = {};\n\t }\n\t waiting = flushing = false;\n\t}", "function resetSchedulerState () {\n\t queue.length = 0;\n\t has = {};\n\t {\n\t circular = {};\n\t }\n\t waiting = flushing = false;\n\t}", "function resetSchedulerState() {\n\t queue.length = 0;\n\t has$1 = {};\n\t if (process.env.NODE_ENV !== 'production') {\n\t circular = {};\n\t }\n\t waiting = flushing = false;\n\t}", "function resetSchedulerState () {\n queue.length = 0;\n has$1 = {};\n if (process.env.NODE_ENV !== 'production') {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n queue.length = 0;\n has$1 = {};\n if (process.env.NODE_ENV !== 'production') {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n\t queue.length = 0;\n\t has = {};\n\t if (true) {\n\t circular = {};\n\t }\n\t waiting = flushing = false;\n\t}", "function resetSchedulerState () {\n\t queue.length = 0\n\t has$1 = {}\n\t if (process.env.NODE_ENV !== 'production') {\n\t circular = {}\n\t }\n\t waiting = flushing = false\n\t}", "function resetSchedulerState () {\n queue.length = 0;\n has = {};\n if (process.env.NODE_ENV !== 'production') {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n queue.length = 0;\n has = {};\n if (process.env.NODE_ENV !== 'production') {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState() {\n queue.length = 0;\n has = {};\n if (process.env.NODE_ENV !== 'production') {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState() {\n\t\t queue.length = 0;\n\t\t userQueue.length = 0;\n\t\t has = {};\n\t\t if (false) {\n\t\t circular = {};\n\t\t }\n\t\t waiting = false;\n\t\t}", "function resetSchedulerState() {\n index = queue.length = activatedChildren.length = 0;\n has = {}; {\n circular = {};\n }\n waiting = flushing = false;\n }", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n if (true) {\n circular = {};\n }\n waiting = flushing = false;\n }", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n waiting = flushing = false;\n}", "function resetSchedulerState() {\n index = queue.length = 0;\n has = {};\n}", "function resetSchedulerState() {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n }", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n }", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n }", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n }", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n }", "function resetSchedulerState() {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n waiting = flushing = false;\n}", "function resetSchedulerState() {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n }", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n if (false) {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n if (false) {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n if (false) {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n if (false) {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n if (false) {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n if (false) {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n if (false) {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n if (false) {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n if (false) {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n if (false) {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n if (false) {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n if (false) {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n if (false) {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n if (false) {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n if (false) {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n if (false) {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n if (false) {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n if (false) {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n if (false) {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n if (false) {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n if (true) {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n if (true) {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n if (true) {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n if (true) {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n if (true) {\n circular = {};\n }\n waiting = flushing = false;\n}" ]
[ "0.8267329", "0.8216394", "0.8216394", "0.8216394", "0.8214579", "0.8156713", "0.813883", "0.813883", "0.8137888", "0.8137888", "0.81248444", "0.8112753", "0.8112753", "0.8109016", "0.8075108", "0.80690277", "0.80690277", "0.8026076", "0.80160606", "0.80009717", "0.7975701", "0.79446244", "0.7934279", "0.79267627", "0.79229665", "0.79229665", "0.79229665", "0.79229665", "0.7921581", "0.7893706", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7884913", "0.7872963", "0.7872963", "0.7872963", "0.7872963", "0.7872963", "0.7872963", "0.7872963", "0.7872963", "0.7872963", "0.7872963", "0.7872963", "0.7872963", "0.7872963", "0.7872963", "0.7872963", "0.7872963", "0.7872963", "0.7872963", "0.7872963", "0.7872963", "0.78686035", "0.78686035", "0.78686035", "0.78686035", "0.78686035" ]
0.0
-1
Flush both queues and run the watchers.
function flushSchedulerQueue () { currentFlushTimestamp = getNow(); flushing = true; var watcher, id; // Sort queue before flush. // This ensures that: // 1. Components are updated from parent to child. (because parent is always // created before the child) // 2. A component's user watchers are run before its render watcher (because // user watchers are created before the render watcher) // 3. If a component is destroyed during a parent component's watcher run, // its watchers can be skipped. queue.sort(function (a, b) { return a.id - b.id; }); // do not cache length because more watchers might be pushed // as we run existing watchers for (index = 0; index < queue.length; index++) { watcher = queue[index]; if (watcher.before) { watcher.before(); } id = watcher.id; has[id] = null; watcher.run(); // in dev build, check and stop circular updates. if (false) {} } // keep copies of post queues before resetting state var activatedQueue = activatedChildren.slice(); var updatedQueue = queue.slice(); resetSchedulerState(); // call component updated and activated hooks callActivatedHooks(activatedQueue); callUpdatedHooks(updatedQueue); // devtool hook /* istanbul ignore if */ if (devtools && config.devtools) { devtools.emit('flush'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function flushSchedulerQueue() {\n\t\t runSchedulerQueue(queue.sort(queueSorter));\n\t\t runSchedulerQueue(userQueue);\n\t\t // user watchers triggered more watchers,\n\t\t // keep flushing until it depletes\n\t\t if (queue.length) {\n\t\t return flushSchedulerQueue();\n\t\t }\n\t\t // devtool hook\n\t\t /* istanbul ignore if */\n\t\t if (devtools && config.devtools) {\n\t\t devtools.emit('flush');\n\t\t }\n\t\t resetSchedulerState();\n\t\t}", "function flushBatcherQueue() {\n var _again = true;\n\n _function: while (_again) {\n _again = false;\n\n runBatcherQueue(queue);\n runBatcherQueue(userQueue);\n // user watchers triggered more watchers,\n // keep flushing until it depletes\n if (queue.length) {\n _again = true;\n continue _function;\n }\n // dev tool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n resetBatcherState();\n }\n }", "function flushBatcherQueue() {\n var _again = true;\n\n _function: while (_again) {\n _again = false;\n\n runBatcherQueue(queue);\n runBatcherQueue(userQueue);\n // user watchers triggered more watchers,\n // keep flushing until it depletes\n if (queue.length) {\n _again = true;\n continue _function;\n }\n // dev tool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n resetBatcherState();\n }\n }", "function flushBatcherQueue() {\n var _again = true;\n\n _function: while (_again) {\n _again = false;\n\n runBatcherQueue(queue);\n runBatcherQueue(userQueue);\n // user watchers triggered more watchers,\n // keep flushing until it depletes\n if (queue.length) {\n _again = true;\n continue _function;\n }\n // dev tool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n resetBatcherState();\n }\n }", "function flushBatcherQueue() {\n\t var _again = true;\n\n\t _function: while (_again) {\n\t _again = false;\n\n\t runBatcherQueue(queue);\n\t runBatcherQueue(userQueue);\n\t // user watchers triggered more watchers,\n\t // keep flushing until it depletes\n\t if (queue.length) {\n\t _again = true;\n\t continue _function;\n\t }\n\t // dev tool hook\n\t /* istanbul ignore if */\n\t if (devtools && config.devtools) {\n\t devtools.emit('flush');\n\t }\n\t resetBatcherState();\n\t }\n\t}", "function flush () {\n flushing = true\n run(queue)\n run(userQueue)\n reset()\n}", "function flush () {\n flushing = true\n run(queue)\n run(userQueue)\n reset()\n}", "function flush () {\n flushing = true\n run(queue)\n run(userQueue)\n reset()\n}", "function flushBatcherQueue() {\n var _again = true;\n\n _function: while (_again) {\n _again = false;\n\n runBatcherQueue(queue);\n runBatcherQueue(userQueue);\n // user watchers triggered more watchers,\n // keep flushing until it depletes\n if (queue.length) {\n _again = true;\n continue _function;\n }\n // dev tool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n resetBatcherState();\n }\n}", "function flushBatcherQueue() {\n var _again = true;\n\n _function: while (_again) {\n _again = false;\n\n runBatcherQueue(queue);\n runBatcherQueue(userQueue);\n // user watchers triggered more watchers,\n // keep flushing until it depletes\n if (queue.length) {\n _again = true;\n continue _function;\n }\n // dev tool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n resetBatcherState();\n }\n}", "function flushBatcherQueue() {\n var _again = true;\n\n _function: while (_again) {\n _again = false;\n\n runBatcherQueue(queue);\n runBatcherQueue(userQueue);\n // user watchers triggered more watchers,\n // keep flushing until it depletes\n if (queue.length) {\n _again = true;\n continue _function;\n }\n // dev tool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n resetBatcherState();\n }\n}", "function flushBatcherQueue() {\n var _again = true;\n\n _function: while (_again) {\n _again = false;\n\n runBatcherQueue(queue);\n runBatcherQueue(userQueue);\n // user watchers triggered more watchers,\n // keep flushing until it depletes\n if (queue.length) {\n _again = true;\n continue _function;\n }\n // dev tool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n resetBatcherState();\n }\n}", "function flushBatcherQueue() {\n var _again = true;\n\n _function: while (_again) {\n _again = false;\n\n runBatcherQueue(queue);\n runBatcherQueue(userQueue);\n // user watchers triggered more watchers,\n // keep flushing until it depletes\n if (queue.length) {\n _again = true;\n continue _function;\n }\n // dev tool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n resetBatcherState();\n }\n}", "function flushBatcherQueue() {\n\t var _again = true;\n\t\n\t _function: while (_again) {\n\t _again = false;\n\t\n\t runBatcherQueue(queue);\n\t runBatcherQueue(userQueue);\n\t // user watchers triggered more watchers,\n\t // keep flushing until it depletes\n\t if (queue.length) {\n\t _again = true;\n\t continue _function;\n\t }\n\t // dev tool hook\n\t /* istanbul ignore if */\n\t if (devtools && config.devtools) {\n\t devtools.emit('flush');\n\t }\n\t resetBatcherState();\n\t }\n\t}", "function flushBatcherQueue() {\n\t var _again = true;\n\t\n\t _function: while (_again) {\n\t _again = false;\n\t\n\t runBatcherQueue(queue);\n\t runBatcherQueue(userQueue);\n\t // user watchers triggered more watchers,\n\t // keep flushing until it depletes\n\t if (queue.length) {\n\t _again = true;\n\t continue _function;\n\t }\n\t // dev tool hook\n\t /* istanbul ignore if */\n\t if (devtools && config.devtools) {\n\t devtools.emit('flush');\n\t }\n\t resetBatcherState();\n\t }\n\t}", "function flushBatcherQueue() {\n\t var _again = true;\n\t\n\t _function: while (_again) {\n\t _again = false;\n\t\n\t runBatcherQueue(queue);\n\t runBatcherQueue(userQueue);\n\t // user watchers triggered more watchers,\n\t // keep flushing until it depletes\n\t if (queue.length) {\n\t _again = true;\n\t continue _function;\n\t }\n\t // dev tool hook\n\t /* istanbul ignore if */\n\t if (devtools && config.devtools) {\n\t devtools.emit('flush');\n\t }\n\t resetBatcherState();\n\t }\n\t}", "function flushBatcherQueue() {\n\t runBatcherQueue(queue);\n\t internalQueueDepleted = true;\n\t runBatcherQueue(userQueue);\n\t // dev tool hook\n\t /* istanbul ignore if */\n\t if (devtools && config.devtools) {\n\t devtools.emit('flush');\n\t }\n\t resetBatcherState();\n\t}", "function flush () {\n\t flushing = true\n\t run(queue)\n\t run(userQueue)\n\t reset()\n\t}", "function flushBatcherQueue() {\n runBatcherQueue(queue);\n internalQueueDepleted = true;\n runBatcherQueue(userQueue);\n // dev tool hook\n /* istanbul ignore if */\n if (devtools) {\n devtools.emit('flush');\n }\n resetBatcherState();\n}", "function flushBatcherQueue() {\n\t runBatcherQueue(queue);\n\t internalQueueDepleted = true;\n\t runBatcherQueue(userQueue);\n\t // dev tool hook\n\t /* istanbul ignore if */\n\t if (devtools) {\n\t devtools.emit('flush');\n\t }\n\t resetBatcherState();\n\t}", "function flushBatcherQueue() {\n\t runBatcherQueue(queue);\n\t internalQueueDepleted = true;\n\t runBatcherQueue(userQueue);\n\t // dev tool hook\n\t /* istanbul ignore if */\n\t if (process.env.NODE_ENV !== 'production') {\n\t if (inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__) {\n\t window.__VUE_DEVTOOLS_GLOBAL_HOOK__.emit('flush');\n\t }\n\t }\n\t resetBatcherState();\n\t}", "function flushBatcherQueue() {\n runBatcherQueue(queue);\n internalQueueDepleted = true;\n runBatcherQueue(userQueue);\n // dev tool hook\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production') {\n if (inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__) {\n window.__VUE_DEVTOOLS_GLOBAL_HOOK__.emit('flush');\n }\n }\n resetBatcherState();\n}", "function flushWatcherQueue () {\n flushing = true\n let watcher\n let id\n\n queue.sort((a, b) => a.id - b.id)\n\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index]\n id = watcher.id\n has[id] = null\n watcher.run()\n // in dev build, check and stop circular updates.\n if (process.env.NODE_ENV !== 'production') {\n circular[id] = (circular[id] || 0) + 1\n if (circular[id] > MAX_UPDATE_COUNT) {\n console.error(\n `[MIP warn]:You may have an infinite update loop in watcher with expression \"${watcher.exp}\"`\n )\n break\n }\n }\n }\n\n resetState()\n}", "function flushBatcherQueue () {\n\t\t runBatcherQueue(queue)\n\t\t internalQueueDepleted = true\n\t\t runBatcherQueue(userQueue)\n\t\t // dev tool hook\n\t\t /* istanbul ignore if */\n\t\t if (true) {\n\t\t if (_.inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__) {\n\t\t window.__VUE_DEVTOOLS_GLOBAL_HOOK__.emit('flush')\n\t\t }\n\t\t }\n\t\t resetBatcherState()\n\t\t}", "function flushSchedulerQueue() {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id; // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n\n queue.sort(function (a, b) {\n return a.id - b.id;\n }); // do not cache length because more watchers might be pushed\n // as we run existing watchers\n\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n\n if (watcher.before) {\n watcher.before();\n }\n\n id = watcher.id;\n has[id] = null;\n watcher.run(); // in dev build, check and stop circular updates.\n\n if (false) {}\n } // keep copies of post queues before resetting state\n\n\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n resetSchedulerState(); // call component updated and activated hooks\n\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue); // devtool hook\n\n /* istanbul ignore if */\n\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue() {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id; // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n\n queue.sort(function (a, b) {\n return a.id - b.id;\n }); // do not cache length because more watchers might be pushed\n // as we run existing watchers\n\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n\n if (watcher.before) {\n watcher.before();\n }\n\n id = watcher.id;\n has[id] = null;\n watcher.run(); // in dev build, check and stop circular updates.\n\n if (false) {}\n } // keep copies of post queues before resetting state\n\n\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n resetSchedulerState(); // call component updated and activated hooks\n\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue); // devtool hook\n\n /* istanbul ignore if */\n\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue() {\n flushing = true;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) {\n return a.id - b.id;\n });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n var watcher = queue[index];\n var id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (process.env.NODE_ENV !== 'production' && has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > config._maxUpdateCount) {\n warn('You may have an infinite update loop ' + (watcher.user ? 'in watcher with expression \"' + watcher.expression + '\"' : 'in a component render function.'), watcher.vm);\n break;\n }\n }\n }\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n\n resetSchedulerState();\n}", "function flushSchedulerQueue () {\n flushing = true;\n var watcher, id, vm;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (process.env.NODE_ENV !== 'production' && has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > config._maxUpdateCount) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // call updated hooks\n index = queue.length;\n while (index--) {\n watcher = queue[index];\n vm = watcher.vm;\n if (vm._watcher === watcher && vm._isMounted) {\n callHook(vm, 'updated');\n }\n }\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n\n resetSchedulerState();\n}", "function flushSchedulerQueue () {\n flushing = true;\n var watcher, id, vm;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (process.env.NODE_ENV !== 'production' && has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > config._maxUpdateCount) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // call updated hooks\n index = queue.length;\n while (index--) {\n watcher = queue[index];\n vm = watcher.vm;\n if (vm._watcher === watcher && vm._isMounted) {\n callHook(vm, 'updated');\n }\n }\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n\n resetSchedulerState();\n}", "function flushSchedulerQueue() {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id; // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n\n queue.sort(function (a, b) {\n return a.id - b.id;\n }); // do not cache length because more watchers might be pushed\n // as we run existing watchers\n\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n\n if (watcher.before) {\n watcher.before();\n }\n\n id = watcher.id;\n has[id] = null;\n watcher.run(); // in dev build, check and stop circular updates.\n\n if (has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn('You may have an infinite update loop ' + (watcher.user ? \"in watcher with expression \\\"\" + watcher.expression + \"\\\"\" : \"in a component render function.\"), watcher.vm);\n break;\n }\n }\n } // keep copies of post queues before resetting state\n\n\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n resetSchedulerState(); // call component updated and activated hooks\n\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue); // devtool hook\n\n /* istanbul ignore if */\n\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n }", "function flushSchedulerQueue () {\n\t flushing = true;\n\t var watcher, id, vm;\n\t\n\t // Sort queue before flush.\n\t // This ensures that:\n\t // 1. Components are updated from parent to child. (because parent is always\n\t // created before the child)\n\t // 2. A component's user watchers are run before its render watcher (because\n\t // user watchers are created before the render watcher)\n\t // 3. If a component is destroyed during a parent component's watcher run,\n\t // its watchers can be skipped.\n\t queue.sort(function (a, b) { return a.id - b.id; });\n\t\n\t // do not cache length because more watchers might be pushed\n\t // as we run existing watchers\n\t for (index = 0; index < queue.length; index++) {\n\t watcher = queue[index];\n\t id = watcher.id;\n\t has[id] = null;\n\t watcher.run();\n\t // in dev build, check and stop circular updates.\n\t if (\"development\" !== 'production' && has[id] != null) {\n\t circular[id] = (circular[id] || 0) + 1;\n\t if (circular[id] > config._maxUpdateCount) {\n\t warn(\n\t 'You may have an infinite update loop ' + (\n\t watcher.user\n\t ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n\t : \"in a component render function.\"\n\t ),\n\t watcher.vm\n\t );\n\t break\n\t }\n\t }\n\t }\n\t\n\t // call updated hooks\n\t index = queue.length;\n\t while (index--) {\n\t watcher = queue[index];\n\t vm = watcher.vm;\n\t if (vm._watcher === watcher && vm._isMounted) {\n\t callHook(vm, 'updated');\n\t }\n\t }\n\t\n\t // devtool hook\n\t /* istanbul ignore if */\n\t if (devtools && config.devtools) {\n\t devtools.emit('flush');\n\t }\n\t\n\t resetSchedulerState();\n\t}", "function flushSchedulerQueue () {\n\t flushing = true;\n\t var watcher, id, vm;\n\t\n\t // Sort queue before flush.\n\t // This ensures that:\n\t // 1. Components are updated from parent to child. (because parent is always\n\t // created before the child)\n\t // 2. A component's user watchers are run before its render watcher (because\n\t // user watchers are created before the render watcher)\n\t // 3. If a component is destroyed during a parent component's watcher run,\n\t // its watchers can be skipped.\n\t queue.sort(function (a, b) { return a.id - b.id; });\n\t\n\t // do not cache length because more watchers might be pushed\n\t // as we run existing watchers\n\t for (index = 0; index < queue.length; index++) {\n\t watcher = queue[index];\n\t id = watcher.id;\n\t has[id] = null;\n\t watcher.run();\n\t // in dev build, check and stop circular updates.\n\t if (\"development\" !== 'production' && has[id] != null) {\n\t circular[id] = (circular[id] || 0) + 1;\n\t if (circular[id] > config._maxUpdateCount) {\n\t warn(\n\t 'You may have an infinite update loop ' + (\n\t watcher.user\n\t ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n\t : \"in a component render function.\"\n\t ),\n\t watcher.vm\n\t );\n\t break\n\t }\n\t }\n\t }\n\t\n\t // call updated hooks\n\t index = queue.length;\n\t while (index--) {\n\t watcher = queue[index];\n\t vm = watcher.vm;\n\t if (vm._watcher === watcher && vm._isMounted) {\n\t callHook(vm, 'updated');\n\t }\n\t }\n\t\n\t // devtool hook\n\t /* istanbul ignore if */\n\t if (devtools && config.devtools) {\n\t devtools.emit('flush');\n\t }\n\t\n\t resetSchedulerState();\n\t}", "function flushSchedulerQueue () {\n flushing = true;\n var watcher, id, vm;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n id = watcher.id;\n has$1[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (\"development\" !== 'production' && has$1[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > config._maxUpdateCount) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // call updated hooks\n index = queue.length;\n while (index--) {\n watcher = queue[index];\n vm = watcher.vm;\n if (vm._watcher === watcher && vm._isMounted) {\n callHook(vm, 'updated');\n }\n }\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n\n resetSchedulerState();\n}", "function flushSchedulerQueue () {\n flushing = true;\n var watcher, id, vm;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n id = watcher.id;\n has$1[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (\"development\" !== 'production' && has$1[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > config._maxUpdateCount) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // call updated hooks\n index = queue.length;\n while (index--) {\n watcher = queue[index];\n vm = watcher.vm;\n if (vm._watcher === watcher && vm._isMounted) {\n callHook(vm, 'updated');\n }\n }\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n\n resetSchedulerState();\n}", "function flushSchedulerQueue () {\n flushing = true;\n var watcher, id, vm;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n id = watcher.id;\n has$1[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (process.env.NODE_ENV !== 'production' && has$1[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > config._maxUpdateCount) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // call updated hooks\n index = queue.length;\n while (index--) {\n watcher = queue[index];\n vm = watcher.vm;\n if (vm._watcher === watcher && vm._isMounted) {\n callHook(vm, 'updated');\n }\n }\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n\n resetSchedulerState();\n}", "function flushSchedulerQueue () {\n\t flushing = true;\n\t var watcher, id, vm;\n\t\n\t // Sort queue before flush.\n\t // This ensures that:\n\t // 1. Components are updated from parent to child. (because parent is always\n\t // created before the child)\n\t // 2. A component's user watchers are run before its render watcher (because\n\t // user watchers are created before the render watcher)\n\t // 3. If a component is destroyed during a parent component's watcher run,\n\t // its watchers can be skipped.\n\t queue.sort(function (a, b) { return a.id - b.id; });\n\t\n\t // do not cache length because more watchers might be pushed\n\t // as we run existing watchers\n\t for (index = 0; index < queue.length; index++) {\n\t watcher = queue[index];\n\t id = watcher.id;\n\t has[id] = null;\n\t watcher.run();\n\t // in dev build, check and stop circular updates.\n\t if ((\"development\") !== 'production' && has[id] != null) {\n\t circular[id] = (circular[id] || 0) + 1;\n\t if (circular[id] > config._maxUpdateCount) {\n\t warn(\n\t 'You may have an infinite update loop ' + (\n\t watcher.user\n\t ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n\t : \"in a component render function.\"\n\t ),\n\t watcher.vm\n\t );\n\t break\n\t }\n\t }\n\t }\n\t\n\t // call updated hooks\n\t index = queue.length;\n\t while (index--) {\n\t watcher = queue[index];\n\t vm = watcher.vm;\n\t if (vm._watcher === watcher && vm._isMounted) {\n\t callHook(vm, 'updated');\n\t }\n\t }\n\t\n\t // devtool hook\n\t /* istanbul ignore if */\n\t if (devtools && config.devtools) {\n\t devtools.emit('flush');\n\t }\n\t\n\t resetSchedulerState();\n\t}", "function flushSchedulerQueue () {\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (false) {}\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (false) {}\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n\t flushing = true;\n\t var watcher, id, vm;\n\n\t // Sort queue before flush.\n\t // This ensures that:\n\t // 1. Components are updated from parent to child. (because parent is always\n\t // created before the child)\n\t // 2. A component's user watchers are run before its render watcher (because\n\t // user watchers are created before the render watcher)\n\t // 3. If a component is destroyed during a parent component's watcher run,\n\t // its watchers can be skipped.\n\t queue.sort(function (a, b) { return a.id - b.id; });\n\n\t // do not cache length because more watchers might be pushed\n\t // as we run existing watchers\n\t for (index = 0; index < queue.length; index++) {\n\t watcher = queue[index];\n\t id = watcher.id;\n\t has$1[id] = null;\n\t watcher.run();\n\t // in dev build, check and stop circular updates.\n\t if (process.env.NODE_ENV !== 'production' && has$1[id] != null) {\n\t circular[id] = (circular[id] || 0) + 1;\n\t if (circular[id] > config._maxUpdateCount) {\n\t warn(\n\t 'You may have an infinite update loop ' + (\n\t watcher.user\n\t ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n\t : \"in a component render function.\"\n\t ),\n\t watcher.vm\n\t );\n\t break\n\t }\n\t }\n\t }\n\n\t // call updated hooks\n\t index = queue.length;\n\t while (index--) {\n\t watcher = queue[index];\n\t vm = watcher.vm;\n\t if (vm._watcher === watcher && vm._isMounted) {\n\t callHook(vm, 'updated');\n\t }\n\t }\n\n\t // devtool hook\n\t /* istanbul ignore if */\n\t if (devtools && config.devtools) {\n\t devtools.emit('flush');\n\t }\n\n\t resetSchedulerState();\n\t}", "function flushSchedulerQueue() {\n\t flushing = true;\n\n\t // Sort queue before flush.\n\t // This ensures that:\n\t // 1. Components are updated from parent to child. (because parent is always\n\t // created before the child)\n\t // 2. A component's user watchers are run before its render watcher (because\n\t // user watchers are created before the render watcher)\n\t // 3. If a component is destroyed during a parent component's watcher run,\n\t // its watchers can be skipped.\n\t queue.sort(function (a, b) {\n\t return a.id - b.id;\n\t });\n\n\t // do not cache length because more watchers might be pushed\n\t // as we run existing watchers\n\t for (index = 0; index < queue.length; index++) {\n\t var watcher = queue[index];\n\t var id = watcher.id;\n\t has$1[id] = null;\n\t watcher.run();\n\t // in dev build, check and stop circular updates.\n\t if (process.env.NODE_ENV !== 'production' && has$1[id] != null) {\n\t circular[id] = (circular[id] || 0) + 1;\n\t if (circular[id] > config._maxUpdateCount) {\n\t warn('You may have an infinite update loop ' + (watcher.user ? \"in watcher with expression \\\"\" + watcher.expression + \"\\\"\" : \"in a component render function.\"), watcher.vm);\n\t break;\n\t }\n\t }\n\t }\n\n\t // devtool hook\n\t /* istanbul ignore if */\n\t if (devtools && config.devtools) {\n\t devtools.emit('flush');\n\t }\n\n\t resetSchedulerState();\n\t}", "function flushSchedulerQueue() {\n var watcher, id;\n flushing = true;\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if ( has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn('You may have an infinite update loop ' + (watcher.user\n ? \"in watcher with expression \\\"\" + watcher.expression + \"\\\"\"\n : \"in a component render function.\"), watcher.vm);\n break;\n }\n }\n }\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n resetSchedulerState();\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n }", "function flushSchedulerQueue () {\n flushing = true;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n var watcher = queue[index];\n var id = watcher.id;\n has$1[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (\"development\" !== 'production' && has$1[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > config._maxUpdateCount) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n\n resetSchedulerState();\n}", "function flushSchedulerQueue() {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id; // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n\n queue.sort(function (a, b) {\n return a.id - b.id;\n }); // do not cache length because more watchers might be pushed\n // as we run existing watchers\n\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n\n if (watcher.before) {\n watcher.before();\n }\n\n id = watcher.id;\n has[id] = null;\n watcher.run(); // in dev build, check and stop circular updates.\n\n if (\"development\" !== 'production' && has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn('You may have an infinite update loop ' + (watcher.user ? \"in watcher with expression \\\"\" + watcher.expression + \"\\\"\" : \"in a component render function.\"), watcher.vm);\n break;\n }\n }\n } // keep copies of post queues before resetting state\n\n\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n resetSchedulerState(); // call component updated and activated hooks\n\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue); // devtool hook\n\n /* istanbul ignore if */\n\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n flushing = true;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n var watcher = queue[index];\n var id = watcher.id;\n has$1[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (process.env.NODE_ENV !== 'production' && has$1[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > config._maxUpdateCount) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n\n resetSchedulerState();\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n \n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n \n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (\"debug\" !== 'production' && has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n \n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n \n resetSchedulerState();\n \n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n \n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n }", "function flushSchedulerQueue() {\n flushing = true;\n var watcher, id; // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n\n queue.sort(function (a, b) {\n return a.id - b.id;\n }); // do not cache length because more watchers might be pushed\n // as we run existing watchers\n\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n\n if (watcher.before) {\n watcher.before();\n }\n\n id = watcher.id;\n has[id] = null;\n watcher.run();\n } // keep copies of post queues before resetting state\n\n\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n resetSchedulerState(); // call component updated and activated hooks\n\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue); // devtool hook\n\n /* istanbul ignore if */\n\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if ( has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n }", "function flushSchedulerQueue() {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id; // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n\n queue.sort(function (a, b) {\n return a.id - b.id;\n }); // do not cache length because more watchers might be pushed\n // as we run existing watchers\n\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n\n if (watcher.before) {\n watcher.before();\n }\n\n id = watcher.id;\n has[id] = null;\n watcher.run(); // in dev build, check and stop circular updates.\n\n if ( true && has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn('You may have an infinite update loop ' + (watcher.user ? \"in watcher with expression \\\"\" + watcher.expression + \"\\\"\" : \"in a component render function.\"), watcher.vm);\n break;\n }\n }\n } // keep copies of post queues before resetting state\n\n\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n resetSchedulerState(); // call component updated and activated hooks\n\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue); // devtool hook\n\n /* istanbul ignore if */\n\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n }", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n }", "function flushSchedulerQueue () {\n\t flushing = true;\n\n\t // Sort queue before flush.\n\t // This ensures that:\n\t // 1. Components are updated from parent to child. (because parent is always\n\t // created before the child)\n\t // 2. A component's user watchers are run before its render watcher (because\n\t // user watchers are created before the render watcher)\n\t // 3. If a component is destroyed during a parent component's watcher run,\n\t // its watchers can be skipped.\n\t queue.sort(function (a, b) { return a.id - b.id; });\n\n\t // do not cache length because more watchers might be pushed\n\t // as we run existing watchers\n\t for (index = 0; index < queue.length; index++) {\n\t var watcher = queue[index];\n\t var id = watcher.id;\n\t has$1[id] = null;\n\t watcher.run();\n\t // in dev build, check and stop circular updates.\n\t if (process.env.NODE_ENV !== 'production' && has$1[id] != null) {\n\t circular[id] = (circular[id] || 0) + 1;\n\t if (circular[id] > config._maxUpdateCount) {\n\t warn(\n\t 'You may have an infinite update loop ' + (\n\t watcher.user\n\t ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n\t : \"in a component render function.\"\n\t ),\n\t watcher.vm\n\t );\n\t break\n\t }\n\t }\n\t }\n\n\t // devtool hook\n\t /* istanbul ignore if */\n\t if (devtools && config.devtools) {\n\t devtools.emit('flush');\n\t }\n\n\t resetSchedulerState();\n\t}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (process.env.NODE_ENV !== 'production' && has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (process.env.NODE_ENV !== 'production' && has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n\t flushing = true;\n\t\n\t // Sort queue before flush.\n\t // This ensures that:\n\t // 1. Components are updated from parent to child. (because parent is always\n\t // created before the child)\n\t // 2. A component's user watchers are run before its render watcher (because\n\t // user watchers are created before the render watcher)\n\t // 3. If a component is destroyed during a parent component's watcher run,\n\t // its watchers can be skipped.\n\t queue.sort(function (a, b) { return a.id - b.id; });\n\t\n\t // do not cache length because more watchers might be pushed\n\t // as we run existing watchers\n\t for (index = 0; index < queue.length; index++) {\n\t var watcher = queue[index];\n\t var id = watcher.id;\n\t has$1[id] = null;\n\t watcher.run();\n\t // in dev build, check and stop circular updates.\n\t if (\"development\" !== 'production' && has$1[id] != null) {\n\t circular[id] = (circular[id] || 0) + 1;\n\t if (circular[id] > config._maxUpdateCount) {\n\t warn(\n\t 'You may have an infinite update loop ' + (\n\t watcher.user\n\t ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n\t : \"in a component render function.\"\n\t ),\n\t watcher.vm\n\t );\n\t break\n\t }\n\t }\n\t }\n\t\n\t // devtool hook\n\t /* istanbul ignore if */\n\t if (devtools && config.devtools) {\n\t devtools.emit('flush');\n\t }\n\t\n\t resetSchedulerState();\n\t}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (false) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (false) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (false) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (false) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (false) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (false) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}", "function flushSchedulerQueue () {\n currentFlushTimestamp = getNow();\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n if (watcher.before) {\n watcher.before();\n }\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if ( true && has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}" ]
[ "0.7189843", "0.7172169", "0.7172169", "0.7172169", "0.70486706", "0.70444006", "0.70444006", "0.70444006", "0.7044293", "0.7044293", "0.7044293", "0.7044293", "0.7044293", "0.7037875", "0.7037875", "0.7037875", "0.6825811", "0.6820496", "0.6792773", "0.67876095", "0.6771715", "0.67325556", "0.6671352", "0.6640777", "0.66234326", "0.66234326", "0.6580893", "0.6569868", "0.6569868", "0.6547856", "0.654699", "0.654699", "0.65415555", "0.65415555", "0.65405554", "0.6539245", "0.65379906", "0.65379906", "0.65355873", "0.6530499", "0.64916164", "0.64871746", "0.64853054", "0.64847124", "0.64835423", "0.6474298", "0.64667815", "0.6466047", "0.6465281", "0.6465281", "0.646398", "0.6461519", "0.6461519", "0.6461349", "0.6449188", "0.6449188", "0.6449188", "0.6449188", "0.6449188", "0.6449188", "0.6449188", "0.6449188", "0.6449188", "0.6449188", "0.6449188", "0.6449188", "0.6449188", "0.6449188", "0.6449188", "0.6449188", "0.6449188", "0.6449188", "0.6449188", "0.6449188", "0.6449188", "0.6449188", "0.6449188", "0.6449188", "0.6449188", "0.6449188", "0.6449188", "0.6449188", "0.6449188", "0.6449188", "0.6449188", "0.6449188", "0.6449188", "0.6449188", "0.6449188", "0.6449188", "0.6443579", "0.6443579", "0.6443579", "0.6443579", "0.6443579", "0.6443579", "0.644269" ]
0.6656157
26
Queue a keptalive component that was activated during patch. The queue will be processed after the entire tree has been patched.
function queueActivatedComponent (vm) { // setting _inactive to false here so that a render function can // rely on checking whether it's in an inactive tree (e.g. router-view) vm._inactive = false; activatedChildren.push(vm); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function queueActivatedComponent(gm) {\n // setting _inactive to false here so that a render function can\n // rely on checking whether it's in an inactive tree (e.g. router-view)\n gm._inactive = false;\n activatedChildren.push(gm);\n}", "function queueActivatedComponent (vm) {\n\t // setting _inactive to false here so that a render function can\n\t // rely on checking whether it's in an inactive tree (e.g. router-view)\n\t vm._inactive = false;\n\t activatedChildren.push(vm);\n\t}", "function queueActivatedComponent (vm) {\n\t // setting _inactive to false here so that a render function can\n\t // rely on checking whether it's in an inactive tree (e.g. router-view)\n\t vm._inactive = false;\n\t activatedChildren.push(vm);\n\t}", "function queueActivatedComponent (vm) {\n // setting _inactive to false here so that a render function can\n // rely on checking whether it's in an inactive tree (e.g. router-view)\n vm._inactive = false;\n activatedChildren.push(vm);\n }", "function queueActivatedComponent (vm) {\n // setting _inactive to false here so that a render function can\n // rely on checking whether it's in an inactive tree (e.g. router-view)\n vm._inactive = false;\n activatedChildren.push(vm);\n }", "function queueActivatedComponent (vm) {\n // setting _inactive to false here so that a render function can\n // rely on checking whether it's in an inactive tree (e.g. router-view)\n vm._inactive = false;\n activatedChildren.push(vm);\n }", "function queueActivatedComponent (vm) {\n // setting _inactive to false here so that a render function can\n // rely on checking whether it's in an inactive tree (e.g. router-view)\n vm._inactive = false;\n activatedChildren.push(vm);\n }", "function queueActivatedComponent (vm) {\n // setting _inactive to false here so that a render function can\n // rely on checking whether it's in an inactive tree (e.g. router-view)\n vm._inactive = false;\n activatedChildren.push(vm);\n }", "function queueActivatedComponent(vm) {\n // setting _inactive to false here so that a render function can\n // rely on checking whether it's in an inactive tree (e.g. router-view)\n vm._inactive = false;\n activatedChildren.push(vm);\n }", "function queueActivatedComponent(vm) {\n // setting _inactive to false here so that a render function can\n // rely on checking whether it's in an inactive tree (e.g. router-view)\n vm._inactive = false;\n activatedChildren.push(vm);\n }", "function queueActivatedComponent(vm) {\n\t // setting _inactive to false here so that a render function can\n\t // rely on checking whether it's in an inactive tree (e.g. router-view)\n\t vm._inactive = false;\n\t activatedChildren.push(vm);\n\t}", "function queueActivatedComponent(vm) {\n\t // setting _inactive to false here so that a render function can\n\t // rely on checking whether it's in an inactive tree (e.g. router-view)\n\t vm._inactive = false;\n\t activatedChildren.push(vm);\n\t}" ]
[ "0.67577285", "0.6707664", "0.6707664", "0.6704469", "0.6704469", "0.6704469", "0.6704469", "0.6699409", "0.6698489", "0.6698489", "0.6695783", "0.6695783" ]
0.0
-1
Push a watcher into the watcher queue. Jobs with duplicate IDs will be skipped unless it's pushed when the queue is being flushed.
function queueWatcher (watcher) { var id = watcher.id; if (has[id] == null) { has[id] = true; if (!flushing) { queue.push(watcher); } else { // if already flushing, splice the watcher based on its id // if already past its id, it will be run next immediately. var i = queue.length - 1; while (i > index && queue[i].id > watcher.id) { i--; } queue.splice(i + 1, 0, watcher); } // queue the flush if (!waiting) { waiting = true; if (false) {} nextTick(flushSchedulerQueue); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has$1[id] == null) {\n has$1[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i >= 0 && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(Math.max(i, index) + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has$1[id] == null) {\n has$1[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i >= 0 && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(Math.max(i, index) + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has$1[id] == null) {\n has$1[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i >= 0 && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(Math.max(i, index) + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has$1[id] == null) {\n has$1[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i >= 0 && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(Math.max(i, index) + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has$1[id] == null) {\n has$1[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i >= 0 && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(Math.max(i, index) + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n \n if (\"debug\" !== 'production' && !config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n }", "function queueWatcher (watcher) {\n\t var id = watcher.id;\n\t if (has$1[id] == null) {\n\t has$1[id] = true;\n\t if (!flushing) {\n\t queue.push(watcher);\n\t } else {\n\t // if already flushing, splice the watcher based on its id\n\t // if already past its id, it will be run next immediately.\n\t var i = queue.length - 1;\n\t while (i >= 0 && queue[i].id > watcher.id) {\n\t i--;\n\t }\n\t queue.splice(Math.max(i, index) + 1, 0, watcher);\n\t }\n\t // queue the flush\n\t if (!waiting) {\n\t waiting = true;\n\t nextTick(flushSchedulerQueue);\n\t }\n\t }\n\t}", "function queueWatcher (watcher) {\n\t var id = watcher.id;\n\t if (has$1[id] == null) {\n\t has$1[id] = true;\n\t if (!flushing) {\n\t queue.push(watcher);\n\t } else {\n\t // if already flushing, splice the watcher based on its id\n\t // if already past its id, it will be run next immediately.\n\t var i = queue.length - 1;\n\t while (i >= 0 && queue[i].id > watcher.id) {\n\t i--;\n\t }\n\t queue.splice(Math.max(i, index) + 1, 0, watcher);\n\t }\n\t // queue the flush\n\t if (!waiting) {\n\t waiting = true;\n\t nextTick(flushSchedulerQueue);\n\t }\n\t }\n\t}", "function queueWatcher (watcher) {\n\t var id = watcher.id;\n\t if (has$1[id] == null) {\n\t has$1[id] = true;\n\t if (!flushing) {\n\t queue.push(watcher);\n\t } else {\n\t // if already flushing, splice the watcher based on its id\n\t // if already past its id, it will be run next immediately.\n\t var i = queue.length - 1;\n\t while (i >= 0 && queue[i].id > watcher.id) {\n\t i--;\n\t }\n\t queue.splice(Math.max(i, index) + 1, 0, watcher);\n\t }\n\t // queue the flush\n\t if (!waiting) {\n\t waiting = true;\n\t nextTick(flushSchedulerQueue);\n\t }\n\t }\n\t}", "function queueWatcher (watcher) {\n\t var id = watcher.id\n\t if (has$1[id] == null) {\n\t has$1[id] = true\n\t if (!flushing) {\n\t queue.push(watcher)\n\t } else {\n\t // if already flushing, splice the watcher based on its id\n\t // if already past its id, it will be run next immediately.\n\t var i = queue.length - 1\n\t while (i >= 0 && queue[i].id > watcher.id) {\n\t i--\n\t }\n\t queue.splice(Math.max(i, index) + 1, 0, watcher)\n\t }\n\t // queue the flush\n\t if (!waiting) {\n\t waiting = true\n\t nextTick(flushSchedulerQueue)\n\t }\n\t }\n\t}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i >= 0 && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(Math.max(i, index) + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i >= 0 && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(Math.max(i, index) + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i >= 0 && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(Math.max(i, index) + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i >= 0 && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(Math.max(i, index) + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i >= 0 && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(Math.max(i, index) + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher(watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n }", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (\"development\" !== 'production' && !config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (\"development\" !== 'production' && !config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n }", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n }", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n }", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if ( !config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n }", "function queueWatcher(watcher) {\n\t var id = watcher.id;\n\t if (has$1[id] == null) {\n\t has$1[id] = true;\n\t if (!flushing) {\n\t queue.push(watcher);\n\t } else {\n\t // if already flushing, splice the watcher based on its id\n\t // if already past its id, it will be run next immediately.\n\t var i = queue.length - 1;\n\t while (i >= 0 && queue[i].id > watcher.id) {\n\t i--;\n\t }\n\t queue.splice(Math.max(i, index) + 1, 0, watcher);\n\t }\n\t // queue the flush\n\t if (!waiting) {\n\t waiting = true;\n\t nextTick(flushSchedulerQueue);\n\t }\n\t }\n\t}", "function queueWatcher(watcher) {\n var id = watcher.id;\n\n if (has[id] == null) {\n has[id] = true;\n\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n\n queue.splice(i + 1, 0, watcher);\n } // queue the flush\n\n\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher(watcher) {\n var id = watcher.id;\n\n if (has[id] == null) {\n has[id] = true;\n\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n\n queue.splice(i + 1, 0, watcher);\n } // queue the flush\n\n\n if (!waiting) {\n waiting = true;\n\n if (\"development\" !== 'production' && !config.async) {\n flushSchedulerQueue();\n return;\n }\n\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher(watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i >= 0 && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(Math.max(i, index) + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher(watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n }\n else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n if ( !config.async) {\n flushSchedulerQueue();\n return;\n }\n nextTick(flushSchedulerQueue);\n }\n }\n }", "function queueWatcher (watcher) {\r\n var id = watcher.id;\r\n if (has[id] == null) {\r\n has[id] = true;\r\n if (!flushing) {\r\n queue.push(watcher);\r\n } else {\r\n // if already flushing, splice the watcher based on its id\r\n // if already past its id, it will be run next immediately.\r\n var i = queue.length - 1;\r\n while (i > index && queue[i].id > watcher.id) {\r\n i--;\r\n }\r\n queue.splice(i + 1, 0, watcher);\r\n }\r\n // queue the flush\r\n if (!waiting) {\r\n waiting = true;\r\n nextTick(flushSchedulerQueue);\r\n }\r\n }\r\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}" ]
[ "0.77372956", "0.77372956", "0.77372956", "0.77372956", "0.77372956", "0.772855", "0.7705405", "0.7705405", "0.7705405", "0.7700171", "0.7689657", "0.7689657", "0.7689657", "0.7689657", "0.7689657", "0.7683655", "0.7683433", "0.7683433", "0.7683069", "0.7683069", "0.7683069", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.7679538", "0.76758385", "0.76748323", "0.76685566", "0.76629835", "0.76599574", "0.7659562", "0.7659503", "0.76523286", "0.76523286", "0.76523286", "0.76523286", "0.76523286", "0.76523286", "0.76523286", "0.76523286", "0.76523286", "0.76523286", "0.76523286", "0.76523286", "0.76523286", "0.76523286", "0.76523286", "0.76523286", "0.76523286" ]
0.0
-1
Query an element selector if it's not an element already.
function query (el) { if (typeof el === 'string') { var selected = document.querySelector(el); if (!selected) { false && false; return document.createElement('div') } return selected } else { return el } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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}", "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 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\t if (typeof el === 'string') {\n\t var selector = el;\n\t el = document.querySelector(el);\n\t if (!el) {\n\t \"development\" !== '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 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}", "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 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 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 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 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 el(query) {\n return document.getElementById(query) || document.querySelector(query);\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}", "function query (el) {\n\t if (typeof el === 'string') {\n\t var selected = document.querySelector(el);\n\t if (!selected) {\n\t (\"development\") !== 'production' && warn(\n\t 'Cannot find element: ' + el\n\t );\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) {\r\n if (typeof el === 'string') {\r\n var selected = document.querySelector(el);\r\n if (!selected) {\r\n \"development\" !== 'production' && warn(\r\n 'Cannot find element: ' + el\r\n );\r\n return document.createElement('div')\r\n }\r\n return selected\r\n } else {\r\n return el\r\n }\r\n}", "function query (el) {\n\t if (typeof el === 'string') {\n\t var selected = document.querySelector(el);\n\t if (!selected) {\n\t \"development\" !== 'production' && warn(\n\t 'Cannot find element: ' + el\n\t );\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 \"development\" !== 'production' && warn(\n\t 'Cannot find element: ' + el\n\t );\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 \"development\" !== 'production' && warn(\n\t 'Cannot find element: ' + el\n\t );\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){if(typeof el==='string'){var selector=el;el=document.querySelector(el);if(!el){\"development\"!=='production'&&warn('Cannot find element: '+selector);return document.createElement('div');}}return el;}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n \"development\" !== '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 \"development\" !== '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 \"development\" !== '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 \"development\" !== '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 \"development\" !== '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 \"development\" !== '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 \"development\" !== '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 \"development\" !== '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 \"development\" !== '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 \"development\" !== '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 \"development\" !== '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 \"development\" !== '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 \"development\" !== '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 \"development\" !== '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 \"development\" !== '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 \"development\" !== '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 \"development\" !== '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 \"development\" !== '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 \"development\" !== '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 \"development\" !== '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 \"development\" !== '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 \"development\" !== '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 \"development\" !== '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 \"development\" !== '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 \"development\" !== '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 \"development\" !== '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 \"development\" !== '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 \"development\" !== '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\t if (typeof el === 'string') {\n\t\t var selector = el;\n\t\t el = document.querySelector(el);\n\t\t if (!el) {\n\t\t (\"production\") !== 'production' && warn('Cannot find element: ' + selector);\n\t\t return document.createElement('div');\n\t\t }\n\t\t }\n\t\t return el;\n\t\t}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n true && 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 true && 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 true && 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 true && 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 true && 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 true && 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 true && 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 true && 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 true && 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 true && 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 true && 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 true && 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 true && 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 true && 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 true && 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 true && 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 true && 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 true && 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 true && 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 true && 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 true && 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 true && 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 true && 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 true && 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 true && 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 \"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}", "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}", "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}", "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}" ]
[ "0.6955811", "0.6931722", "0.6931722", "0.6875168", "0.6875168", "0.6865981", "0.6857312", "0.6857312", "0.6857312", "0.6856364", "0.6819468", "0.67957026", "0.67957026", "0.67957026", "0.67957026", "0.67957026", "0.67957026", "0.67957026", "0.67957026", "0.67957026", "0.67957026", "0.67957026", "0.67957026", "0.67957026", "0.67957026", "0.67957026", "0.67957026", "0.67957026", "0.6792462", "0.6792462", "0.67590046", "0.67590046", "0.67590046", "0.67590046", "0.67590046", "0.6747235", "0.67433625", "0.6724328", "0.6722603", "0.6714802", "0.6714802", "0.6714802", "0.67094964", "0.67001015", "0.67001015", "0.67001015", "0.67001015", "0.67001015", "0.67001015", "0.67001015", "0.67001015", "0.67001015", "0.67001015", "0.67001015", "0.67001015", "0.67001015", "0.67001015", "0.67001015", "0.67001015", "0.67001015", "0.67001015", "0.67001015", "0.67001015", "0.67001015", "0.67001015", "0.67001015", "0.67001015", "0.67001015", "0.67001015", "0.67001015", "0.67001015", "0.66996104", "0.66962147", "0.66962147", "0.66962147", "0.66962147", "0.66962147", "0.66962147", "0.66962147", "0.66962147", "0.66962147", "0.66962147", "0.66962147", "0.66962147", "0.66962147", "0.66962147", "0.66962147", "0.66962147", "0.66962147", "0.66962147", "0.66962147", "0.66962147", "0.66962147", "0.66962147", "0.66962147", "0.66962147", "0.66962147", "0.6695711", "0.6695711", "0.6695711", "0.6695711" ]
0.0
-1
set scope id attribute for scoped CSS. this is implemented as a special case to avoid the overhead of going through the normal attribute patching process.
function setScope (vnode) { var i; if (isDef(i = vnode.fnScopeId)) { nodeOps.setStyleScope(vnode.elm, i); } else { var ancestor = vnode; while (ancestor) { if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) { nodeOps.setStyleScope(vnode.elm, i); } ancestor = ancestor.parent; } } // for slot content they should also get the scopeId from the host instance. if (isDef(i = activeInstance) && i !== vnode.context && i !== vnode.fnContext && isDef(i = i.$options._scopeId) ) { nodeOps.setStyleScope(vnode.elm, i); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pushScopeId(id) {\r\n currentScopeId = id;\r\n}", "function pushScopeId(id) {\r\n currentScopeId = id;\r\n}", "function setScope(vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setAttribute(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.setAttribute(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.setAttribute(vnode.elm, i, '');\n }\n }", "function pushScopeId(id) {\n currentScopeId = id;\n}", "function pushScopeId(id) {\n currentScopeId = id;\n}", "function pushScopeId(id) {\n currentScopeId = id;\n}", "function pushScopeId(id) {\n currentScopeId = id;\n}", "function pushScopeId(id) {\n currentScopeId = id;\n}", "function pushScopeId(id) {\n currentScopeId = id;\n}", "function pushScopeId(id) {\n currentScopeId = id;\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.6507561", "0.6507561", "0.645189", "0.6445727", "0.6445727", "0.6445727", "0.6445727", "0.6445727", "0.6445727", "0.6445727", "0.64229226", "0.64229226", "0.64229226", "0.64229226", "0.64210314" ]
0.0
-1
Note: this is a browseronly function so we can assume elms are DOM nodes.
function hydrate (elm, vnode, insertedVnodeQueue, inVPre) { var i; var tag = vnode.tag; var data = vnode.data; var children = vnode.children; inVPre = inVPre || (data && data.pre); vnode.elm = elm; if (isTrue(vnode.isComment) && isDef(vnode.asyncFactory)) { vnode.isAsyncPlaceholder = true; return true } // assert node match if (false) {} if (isDef(data)) { if (isDef(i = data.hook) && isDef(i = i.init)) { i(vnode, true /* hydrating */); } if (isDef(i = vnode.componentInstance)) { // child component. it should have hydrated its own tree. initComponent(vnode, insertedVnodeQueue); return true } } if (isDef(tag)) { if (isDef(children)) { // empty element, allow client to pick up and populate children if (!elm.hasChildNodes()) { createChildren(vnode, children, insertedVnodeQueue); } else { // v-html and domProps: innerHTML if (isDef(i = data) && isDef(i = i.domProps) && isDef(i = i.innerHTML)) { if (i !== elm.innerHTML) { /* istanbul ignore if */ if (false ) {} return false } } else { // iterate and compare children lists var childrenMatch = true; var childNode = elm.firstChild; for (var i$1 = 0; i$1 < children.length; i$1++) { if (!childNode || !hydrate(childNode, children[i$1], insertedVnodeQueue, inVPre)) { childrenMatch = false; break } childNode = childNode.nextSibling; } // if childNode is not null, it means the actual childNodes list is // longer than the virtual children list. if (!childrenMatch || childNode) { /* istanbul ignore if */ if (false ) {} return false } } } } if (isDef(data)) { var fullInvoke = false; for (var key in data) { if (!isRenderedModule(key)) { fullInvoke = true; invokeCreateHooks(vnode, insertedVnodeQueue); break } } if (!fullInvoke && data['class']) { // ensure collecting deps for deep class bindings for future updates traverse(data['class']); } } } else if (elm.data !== vnode.text) { elm.data = vnode.text; } return true }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "checkNodeEl(el) {\n return el.nodeType === 1;\n }", "domRemoveChildren(el) {\n if (!el) return;\n while (el.firstChild) {\n el.firstChild.remove();\n };\n }", "function getOuterHTML(el){if(el.outerHTML){return el.outerHTML;}else{var container=document.createElement('div');container.appendChild(el.cloneNode(true));return container.innerHTML;}}", "function getOuterHTML(el){if(el.outerHTML){return el.outerHTML;}else{var container=document.createElement('div');container.appendChild(el.cloneNode(true));return container.innerHTML;}}", "function getOuterHTML(el){if(el.outerHTML){return el.outerHTML;}else{var container=document.createElement('div');container.appendChild(el.cloneNode(true));return container.innerHTML;}}", "function DOMImplementation() {}", "function DOMImplementation() {}", "function DOMImplementation() {}", "function DOMImplementation() {}", "function _default(els) {\n if (typeof els === 'string') {\n return (0, _qa[\"default\"])(els);\n } // If single dom node\n\n\n if (_typeof(els) == 'object' && typeof els.tagName != 'undefined') {\n return [els];\n }\n\n return els;\n}", "static _isDomElement(el) {\n try {\n return el instanceof HTMLElement;\n } catch(e) {\n //Older browser unsupported?\n throw new Error('Browser is unsupported');\n }\n }", "function n(e){var n=e?e.ownerDocument||e:document,t=n.defaultView||window;return!(!e||!(\"function\"==typeof t.Node?e instanceof t.Node:\"object\"==typeof e&&\"number\"==typeof e.nodeType&&\"string\"==typeof e.nodeName))}", "function __(elm) { return document.querySelectorAll(elm) }", "function getDOMNode(node) {\n return node.__e;\n}", "function DOMImplementation() {\n}", "function DOMImplementation() {\n}", "function __( el )\n{\n return document.querySelectorAll( el );\n}", "function isElement(el) {\n return el instanceof Object && el && el.nodeType === 1;\n}", "function listDomElements() {\n\t var children = document.body.childNodes;\n\t var i;\n\n\t for (i = 0; i < children.length; i = i + 1) {\n\t console.log(children[i]);\n\t }\n\t}", "function getDomElement() {\n return getElement();\n } // ========================== Motion End ==========================", "function lisha_get_innerText(el)\r\n{\r\n\t\r\n\ttry {\r\n\t\treturn document.getElementById(el).innerText;\r\n\t} catch (e) {\r\n\t\talert('cath error E110 : '+el+' not found in DOM');\r\n\t}\r\n\t\r\n}", "function lisha_get_innerHTML(el)\r\n{\r\n\t\r\n\ttry {\r\n\t\treturn document.getElementById(el).innerHTML;\r\n\t} catch (e) {\r\n\t\talert('cath error E100 : '+el+' not found in DOM');\r\n\t}\r\n\t\r\n}", "asElement() {\n return null;\n }", "static _justText(el) {\nvar i, len, nd, ref, res;\nres = \"\";\nref = el.childNodes;\nfor (i = 0, len = ref.length; i < len; i++) {\nnd = ref[i];\nif (nd.nodeType === Node.ELEMENT_NODE) {\nres += Access._justText(nd);\n} else if (nd.nodeType === Node.TEXT_NODE) {\nres += nd.nodeValue;\n}\n}\nreturn res;\n}", "function getOuterHTML(el) {\n if (el.outerHTML) {\n return el.outerHTML;\n }\n else {\n var container = document.createElement('div');\n container.appendChild(el.cloneNode(true));\n return container.innerHTML;\n }\n }", "function getElementsByTagName(el, tagName) {\n if (hwc.isWindowsMobile()) {\n var elsToReturn = [];\n var count = 0;\n var els = document.getElementsByTagName(tagName);\n var i;\n for (i = 0; i < els.length; i++) {\n if (hwc.isSomeFormOfParent(el, els[i])) {\n elsToReturn[count] = els[i];\n count++;\n }\n }\n return elsToReturn;\n }\n else {\n return el.getElementsByTagName(tagName);\n }\n return \"\";\n}", "buildDomElementInner() {\n // given that our tree is fully populated, build a new dom element.\n // this only happens once in the life of a cell, and we expect that we'll call it\n // for each child once also.\n\n // this function returns a DOM element, or null if it doesn't have a dom representation.\n throw new Error('buildDomElement not defined for ' + this);\n }", "function getHtml(el) {\n return el.innerHTML;\n }", "function isElement(obj) {\n return obj instanceof selection || typeof HTMLElement === 'object'\n ? obj instanceof HTMLElement // DOM2\n : obj && typeof obj === 'object' && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === 'string';\n }", "function ElementNodes(nodelist) {\n\tvar eNodes = []; // return array is defined\n\n\tfor (var i=0, j=nodelist.length; i < j; i++) {\n\t\tif (nodelist[i].nodeType == 1) { // if nodelist is real element\n\t\t\teNodes.push(nodelist[i]); // push the nodelist into our eNodes array\n\t\t}\n\t}\n\n\treturn eNodes;\n}", "function getOuterHTML(el) {\n\t if (el.outerHTML) {\n\t return el.outerHTML;\n\t } else {\n\t var container = document.createElement('div');\n\t container.appendChild(el.cloneNode(true));\n\t return container.innerHTML;\n\t }\n\t}", "function getOuterHTML(el) {\n\t if (el.outerHTML) {\n\t return el.outerHTML;\n\t } else {\n\t var container = document.createElement('div');\n\t container.appendChild(el.cloneNode(true));\n\t return container.innerHTML;\n\t }\n\t}", "function isElement(o){\n return (\n typeof HTMLElement === \"object\" ? o instanceof HTMLElement : //DOM2\n o && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName===\"string\"\n );\n }", "function getOuterHTML(el) {\n if (el.outerHTML) {\n return el.outerHTML;\n } else {\n var container = document.createElement('div');\n container.appendChild(el.cloneNode(true));\n return container.innerHTML;\n }\n }", "function getOuterHTML(el) {\n if (el.outerHTML) {\n return el.outerHTML;\n } else {\n var container = document.createElement('div');\n container.appendChild(el.cloneNode(true));\n return container.innerHTML;\n }\n }", "get nativeElement() {\n return this.nativeNode.nodeType == Node.ELEMENT_NODE ? this.nativeNode : null;\n }", "function isSupportedInlineEl( e ) {\n\n return $.inArray( getTN( e ), inlineEls ) !== -1;\n\n }", "function isElement(o){\n\t\t\treturn (typeof HTMLElement === \"object\" ? o instanceof HTMLElement : //DOM2\n\t\t\t\to && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName===\"string\")\n\t\t}", "static getNativeElement(el) {\n if (el instanceof UnitTestElement) {\n return el.element;\n }\n throw Error('This TestElement was not created by the TestbedHarnessEnvironment');\n }", "function getOuterHTML (el) {\n\t if (el.outerHTML) {\n\t return el.outerHTML\n\t } else {\n\t var container = document.createElement('div');\n\t container.appendChild(el.cloneNode(true));\n\t return container.innerHTML\n\t }\n\t}", "function getOuterHTML (el) {\n\t if (el.outerHTML) {\n\t return el.outerHTML\n\t } else {\n\t var container = document.createElement('div');\n\t container.appendChild(el.cloneNode(true));\n\t return container.innerHTML\n\t }\n\t}", "function getOuterHTML (el) {\n\t if (el.outerHTML) {\n\t return el.outerHTML\n\t } else {\n\t var container = document.createElement('div');\n\t container.appendChild(el.cloneNode(true));\n\t return container.innerHTML\n\t }\n\t}", "function getOuterHTML (el) {\n\t if (el.outerHTML) {\n\t return el.outerHTML\n\t } else {\n\t var container = document.createElement('div');\n\t container.appendChild(el.cloneNode(true));\n\t return container.innerHTML\n\t }\n\t}", "function getOuterHTML (el) {\n\t if (el.outerHTML) {\n\t return el.outerHTML\n\t } else {\n\t var container = document.createElement('div');\n\t container.appendChild(el.cloneNode(true));\n\t return container.innerHTML\n\t }\n\t}", "function isElement(domNode) {\n return domNode.nodeType !== undefined;\n}", "function getOuterHTML(el) {\n if (el.outerHTML) {\n return el.outerHTML\n } else {\n var container = document.createElement('div');\n container.appendChild(el.cloneNode(true));\n return container.innerHTML\n }\n }", "getContentElement() {\n return this.contentEl;\n }", "function isElement(o) {\n return !!o && o.nodeType === 1;\n}", "getContentElement() {\n return this.contentEl;\n }", "onEnterDOM() {}", "function getOuterHTML (el) {\n if (el.outerHTML) {\n return el.outerHTML\n } else {\n var container = document.createElement('div');\n container.appendChild(el.cloneNode(true));\n return container.innerHTML\n }\n }", "function getOuterHTML (el) {\n if (el.outerHTML) {\n return el.outerHTML\n } else {\n var container = document.createElement('div');\n container.appendChild(el.cloneNode(true));\n return container.innerHTML\n }\n }", "function getOuterHTML (el) {\n if (el.outerHTML) {\n return el.outerHTML\n } else {\n var container = document.createElement('div');\n container.appendChild(el.cloneNode(true));\n return container.innerHTML\n }\n }", "function RenderableDOMElement() {\n }", "function selectElementContents(el) {\n var body = document.body, range, sel;\n if (document.createRange && window.getSelection) {\n range = document.createRange();\n sel = window.getSelection();\n sel.removeAllRanges();\n try {\n range.selectNodeContents(el);\n sel.addRange(range);\n } catch (e) {\n range.selectNode(el);\n sel.addRange(range);\n }\n } else if (body.createTextRange) {\n range = body.createTextRange();\n range.moveToElementText(el);\n range.select();\n }\n}", "function getOuterHTML (el) {\r\n if (el.outerHTML) {\r\n return el.outerHTML\r\n } else {\r\n var container = document.createElement('div');\r\n container.appendChild(el.cloneNode(true));\r\n return container.innerHTML\r\n }\r\n}", "function M(t,e){var n=A.createElement(\"div\");return e&&c(n,e),t.appendChild(n),n}", "function isSupportedEl( e ) {\n\n return isSupportedBlockEl( e ) || isSupportedInlineEl( e );\n\n }", "function getDom(el) {\n return document.querySelector(el)\n}", "function isElement(o){\n return (\n typeof HTMLElement === \"object\" ? o instanceof HTMLElement : //DOM2\n o && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName===\"string\"\n);\n}", "function isElement(o){\n\t\t\treturn (\n\t\t\t\ttypeof HTMLElement === \"object\" ? o instanceof HTMLElement : //DOM2\n\t\t\t\to && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName===\"string\"\n\t\t\t);\n\t\t}", "function emptyElement(e)\n{\n if (typeof e != 'undefined')\n\tif (e.firstChild)\n\t while (e.firstChild)\n\t\te.removeChild(e.firstChild);\n}", "function isElement(o){\n return (\n typeof HTMLElement === \"function\" ? o instanceof HTMLElement : //DOM2\n o && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName===\"string\"\n );\n }", "function isElement(o) {\n return (typeof HTMLElement === \"object\" ? o instanceof HTMLElement : //DOM2\n o && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName === \"string\");\n }", "_getDomFromElement(element) {\n if (element.dom) {\n return element.dom;\n }\n\n if (element.element) {\n // console.log('Legacy ui.Element passed to pcui.Container', this.class, element.class);\n return element.element;\n }\n\n return element;\n }", "function isElement(obj) {\n\treturn obj && obj.nodeType == 1;\n}", "static getElements(els) {\r\n if (typeof els === 'string') {\r\n let list = document.querySelectorAll(els);\r\n if (!list.length && els[0] !== '.' && els[0] !== '#') {\r\n list = document.querySelectorAll('.' + els);\r\n if (!list.length) {\r\n list = document.querySelectorAll('#' + els);\r\n }\r\n }\r\n return Array.from(list);\r\n }\r\n return [els];\r\n }", "function isElement(o) {\n return typeof HTMLElement === 'object'\n ? o instanceof HTMLElement //DOM2\n : o &&\n typeof o === 'object' &&\n o !== null &&\n o.nodeType === 1 &&\n typeof o.nodeName === 'string';\n}", "function ts_getInnerText(el) {\n //Thanks to http://www.kryogenix.org/code/browser/sorttable/ for this function\n\tif (typeof el == \"string\") return el;\n\tif (typeof el == \"undefined\") { return el; };\n\tif (el.innerText) return el.innerText;\t//Not needed but it is faster\n\tvar str = \"\";\n\n\tvar cs = el.childNodes;\n\tvar l = cs.length;\n\tfor (var i = 0; i < l; i++) {\n\t\tswitch (cs[i].nodeType) {\n\t\tcase 1: //ELEMENT_NODE\n\t\t\tstr += ts_getInnerText(cs[i]);\n\t\t\tbreak;\n\t\tcase 3:\t//TEXT_NODE\n\t\t\tstr += cs[i].nodeValue;\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn str;\n}", "function getAllChildren(e) {\n\t // Returns all children of element. Workaround required for IE5/Windows. Ugh.\n\t return e.all ? e.all : e.getElementsByTagName('*');\n\t }", "function findContentNode(el) {\n var oldCebContentId = el.getAttribute('ceb-old-content-id');\n if (oldCebContentId) {\n return findContentNode(el.querySelector('[' + oldCebContentId + ']'));\n }\n return el;\n }", "rootEl(inner) {\nthis.doc.documentElement.appendChild(inner);\nreturn this.doc;\n}", "function isElement(value) { return Boolean(value) && value.nodeType === 1; }", "function el(e) {\n return function(body) {\n return \"<\"+e+\">\"+body+\"</\"+e+\">\"\n }\n }", "function n(e){if(void 0===(e=e||(\"undefined\"!=typeof document?document:undefined)))return null;try{return e.activeElement||e.body}catch(n){return e.body}}", "getEl(event) {\n return this.facade(event).el();\n }", "function isElement( o ) {\n return (\n typeof HTMLElement === \"object\" ? o instanceof HTMLElement : //DOM2\n o && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName === \"string\"\n );\n }", "function getOuterHTML(el) {\n if (el.outerHTML) {\n return el.outerHTML;\n } else {\n var container = document.createElement('div');\n container.appendChild(el.cloneNode(true));\n return container.innerHTML;\n }\n}", "function getOuterHTML(el) {\n if (el.outerHTML) {\n return el.outerHTML;\n } else {\n var container = document.createElement('div');\n container.appendChild(el.cloneNode(true));\n return container.innerHTML;\n }\n}", "function getOuterHTML(el) {\n if (el.outerHTML) {\n return el.outerHTML;\n } else {\n var container = document.createElement('div');\n container.appendChild(el.cloneNode(true));\n return container.innerHTML;\n }\n}", "function getOuterHTML(el) {\n if (el.outerHTML) {\n return el.outerHTML;\n } else {\n var container = document.createElement('div');\n container.appendChild(el.cloneNode(true));\n return container.innerHTML;\n }\n}", "function getOuterHTML(el) {\n if (el.outerHTML) {\n return el.outerHTML;\n } else {\n var container = document.createElement('div');\n container.appendChild(el.cloneNode(true));\n return container.innerHTML;\n }\n}", "function getOuterHTML(el) {\n if (el.outerHTML) {\n return el.outerHTML;\n } else {\n var container = document.createElement('div');\n container.appendChild(el.cloneNode(true));\n return container.innerHTML;\n }\n}", "function isElement(o) {\n return (\n typeof HTMLElement === 'object' ? o instanceof HTMLElement : //DOM2\n o && typeof o === 'object' && o !== null && o.nodeType === 1 && typeof o.nodeName === 'string'\n );\n }", "function is_dom_element(obj) {\n return !!(obj && obj.nodeType === 1);\n}", "get e() {\n\t\treturn this._htmlElement;\n\t}", "get e() {\n\t\treturn this._htmlElement;\n\t}", "function getAllChildren(e) {\r\n\t // Returns all children of element. Workaround required for IE5/Windows. Ugh.\r\n\t return e.all ? e.all : e.getElementsByTagName('*');\r\n\t}", "function getAllChildren(e) {\n // Returns all children of element. Workaround required for IE5/Windows. Ugh.\n return e.all ? e.all : e.getElementsByTagName('*');\n }", "isDOM(a) {\n if (typeof a === 'object' && a.nodeType !== undefined) {\n return true;\n }\n\n return false;\n }", "function s(e, t) {\n if (!(e._flags & m.hasCachedChildNodes)) {\n var n = e._renderedChildren, a = t.firstChild;\n e: for (var s in n) if (n.hasOwnProperty(s)) {\n var u = n[s], l = o(u)._domID;\n if (0 !== l) {\n // We assume the child nodes are in the same order as the child instances.\n for (;null !== a; a = a.nextSibling) if (r(a, l)) {\n i(u, a);\n continue e;\n }\n f(!1, \"Unable to find element with ID %s.\", l);\n }\n }\n e._flags |= m.hasCachedChildNodes;\n }\n }", "function isElement(o) {\n return (typeof HTMLElement === \"object\" ? o instanceof HTMLElement : o && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName === \"string\");\n}", "function isElement(obj) {\n return !!((typeof HTMLElement === 'undefined' ? 'undefined' : _typeof(HTMLElement)) === 'object' ? obj instanceof HTMLElement : obj && (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === 'string');\n }", "function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n }", "function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n }", "function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n }", "function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n }", "function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n }", "function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n }", "function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n }", "function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n }" ]
[ "0.63703173", "0.6075972", "0.603426", "0.603426", "0.603426", "0.59734106", "0.59734106", "0.59734106", "0.59734106", "0.5931207", "0.59173113", "0.58157057", "0.58110684", "0.58097315", "0.57934564", "0.57934564", "0.5774249", "0.57502735", "0.5745852", "0.573527", "0.57082236", "0.56820923", "0.5681591", "0.5672227", "0.56582695", "0.56542563", "0.5640735", "0.5634223", "0.5627515", "0.56255394", "0.56241584", "0.56241584", "0.5610814", "0.5606993", "0.5606993", "0.5596251", "0.55957615", "0.5592603", "0.55893487", "0.55881006", "0.55881006", "0.55881006", "0.55881006", "0.55881006", "0.5584496", "0.5581769", "0.5570017", "0.5568157", "0.5565958", "0.5565642", "0.55625814", "0.55625814", "0.55625814", "0.5548457", "0.55292356", "0.55219704", "0.5521424", "0.5520679", "0.5511457", "0.5507686", "0.55043626", "0.5503554", "0.55024177", "0.5499254", "0.54958695", "0.54939723", "0.54938567", "0.54933405", "0.5491276", "0.54784673", "0.54678875", "0.5459601", "0.54463154", "0.5445787", "0.5437712", "0.5436879", "0.5432594", "0.5430635", "0.5430635", "0.5430635", "0.5430635", "0.5430635", "0.5430635", "0.54276496", "0.5427226", "0.54267645", "0.54267645", "0.542624", "0.5423228", "0.5421794", "0.54196024", "0.5415093", "0.5404317", "0.54033643", "0.54033643", "0.54033643", "0.54033643", "0.54033643", "0.54033643", "0.54033643", "0.54033643" ]
0.0
-1
normalize vmodel event tokens that can only be determined at runtime. it's important to place the event as the first in the array because the whole point is ensuring the vmodel callback gets called before userattached handlers.
function normalizeEvents (on) { /* istanbul ignore if */ if (isDef(on[RANGE_TOKEN])) { // IE input[type=range] only supports `change` event var event = isIE ? 'change' : 'input'; on[event] = [].concat(on[RANGE_TOKEN], on[event] || []); delete on[RANGE_TOKEN]; } // This was originally intended to fix #4521 but no longer necessary // after 2.5. Keeping it for backwards compat with generated code from < 2.4 /* istanbul ignore if */ if (isDef(on[CHECKBOX_RADIO_TOKEN])) { on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []); delete on[CHECKBOX_RADIO_TOKEN]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function normalizeEvents (on) {\n\t var event;\n\t /* istanbul ignore if */\n\t if (on[RANGE_TOKEN]) {\n\t // IE input[type=range] only supports `change` event\n\t event = isIE ? 'change' : 'input';\n\t on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n\t delete on[RANGE_TOKEN];\n\t }\n\t if (on[CHECKBOX_RADIO_TOKEN]) {\n\t // Chrome fires microtasks in between click/change, leads to #4521\n\t event = isChrome ? 'click' : 'change';\n\t on[event] = [].concat(on[CHECKBOX_RADIO_TOKEN], on[event] || []);\n\t delete on[CHECKBOX_RADIO_TOKEN];\n\t }\n\t}", "function normalizeEvents (on) {\n\t var event;\n\t /* istanbul ignore if */\n\t if (on[RANGE_TOKEN]) {\n\t // IE input[type=range] only supports `change` event\n\t event = isIE ? 'change' : 'input';\n\t on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n\t delete on[RANGE_TOKEN];\n\t }\n\t if (on[CHECKBOX_RADIO_TOKEN]) {\n\t // Chrome fires microtasks in between click/change, leads to #4521\n\t event = isChrome ? 'click' : 'change';\n\t on[event] = [].concat(on[CHECKBOX_RADIO_TOKEN], on[event] || []);\n\t delete on[CHECKBOX_RADIO_TOKEN];\n\t }\n\t}", "function normalizeEvents (on) {\n\t var event;\n\t /* istanbul ignore if */\n\t if (on[RANGE_TOKEN]) {\n\t // IE input[type=range] only supports `change` event\n\t event = isIE ? 'change' : 'input';\n\t on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n\t delete on[RANGE_TOKEN];\n\t }\n\t if (on[CHECKBOX_RADIO_TOKEN]) {\n\t // Chrome fires microtasks in between click/change, leads to #4521\n\t event = isChrome ? 'click' : 'change';\n\t on[event] = [].concat(on[CHECKBOX_RADIO_TOKEN], on[event] || []);\n\t delete on[CHECKBOX_RADIO_TOKEN];\n\t }\n\t}", "function normalizeEvents (on) {\n\t var event;\n\t /* istanbul ignore if */\n\t if (isDef(on[RANGE_TOKEN])) {\n\t // IE input[type=range] only supports `change` event\n\t event = isIE ? 'change' : 'input';\n\t on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n\t delete on[RANGE_TOKEN];\n\t }\n\t if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n\t // Chrome fires microtasks in between click/change, leads to #4521\n\t event = isChrome ? 'click' : 'change';\n\t on[event] = [].concat(on[CHECKBOX_RADIO_TOKEN], on[event] || []);\n\t delete on[CHECKBOX_RADIO_TOKEN];\n\t }\n\t}", "function normalizeEvents(on) {\n\t var event;\n\t /* istanbul ignore if */\n\t if (isDef(on[RANGE_TOKEN])) {\n\t // IE input[type=range] only supports `change` event\n\t event = isIE ? 'change' : 'input';\n\t on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n\t delete on[RANGE_TOKEN];\n\t }\n\t if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n\t // Chrome fires microtasks in between click/change, leads to #4521\n\t event = isChrome ? 'click' : 'change';\n\t on[event] = [].concat(on[CHECKBOX_RADIO_TOKEN], on[event] || []);\n\t delete on[CHECKBOX_RADIO_TOKEN];\n\t }\n\t}", "function normalizeEvents(on) {\n\t var event;\n\t /* istanbul ignore if */\n\t if (isDef(on[RANGE_TOKEN])) {\n\t // IE input[type=range] only supports `change` event\n\t event = isIE ? 'change' : 'input';\n\t on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n\t delete on[RANGE_TOKEN];\n\t }\n\t if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n\t // Chrome fires microtasks in between click/change, leads to #4521\n\t event = isChrome ? 'click' : 'change';\n\t on[event] = [].concat(on[CHECKBOX_RADIO_TOKEN], on[event] || []);\n\t delete on[CHECKBOX_RADIO_TOKEN];\n\t }\n\t}", "function normalizeEvents (on) {\n var event;\n /* istanbul ignore if */\n if (on[RANGE_TOKEN]) {\n // IE input[type=range] only supports `change` event\n event = isIE ? 'change' : 'input';\n on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n delete on[RANGE_TOKEN];\n }\n if (on[CHECKBOX_RADIO_TOKEN]) {\n // Chrome fires microtasks in between click/change, leads to #4521\n event = isChrome ? 'click' : 'change';\n on[event] = [].concat(on[CHECKBOX_RADIO_TOKEN], on[event] || []);\n delete on[CHECKBOX_RADIO_TOKEN];\n }\n}", "function normalizeEvents (on) {\n var event;\n /* istanbul ignore if */\n if (on[RANGE_TOKEN]) {\n // IE input[type=range] only supports `change` event\n event = isIE ? 'change' : 'input';\n on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n delete on[RANGE_TOKEN];\n }\n if (on[CHECKBOX_RADIO_TOKEN]) {\n // Chrome fires microtasks in between click/change, leads to #4521\n event = isChrome ? 'click' : 'change';\n on[event] = [].concat(on[CHECKBOX_RADIO_TOKEN], on[event] || []);\n delete on[CHECKBOX_RADIO_TOKEN];\n }\n}", "function normalizeEvents (on) {\n var event;\n /* istanbul ignore if */\n if (on[RANGE_TOKEN]) {\n // IE input[type=range] only supports `change` event\n event = isIE ? 'change' : 'input';\n on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n delete on[RANGE_TOKEN];\n }\n if (on[CHECKBOX_RADIO_TOKEN]) {\n // Chrome fires microtasks in between click/change, leads to #4521\n event = isChrome ? 'click' : 'change';\n on[event] = [].concat(on[CHECKBOX_RADIO_TOKEN], on[event] || []);\n delete on[CHECKBOX_RADIO_TOKEN];\n }\n}", "function normalizeEvents (on) {\n\t /* istanbul ignore if */\n\t if (isDef(on[RANGE_TOKEN])) {\n\t // IE input[type=range] only supports `change` event\n\t var event = isIE ? 'change' : 'input';\n\t on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n\t delete on[RANGE_TOKEN];\n\t }\n\t // This was originally intended to fix #4521 but no longer necessary\n\t // after 2.5. Keeping it for backwards compat with generated code from < 2.4\n\t /* istanbul ignore if */\n\t if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n\t on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []);\n\t delete on[CHECKBOX_RADIO_TOKEN];\n\t }\n\t}", "function normalizeEvents (on) {\n /* istanbul ignore if */\n if (isDef(on[RANGE_TOKEN])) {\n // IE input[type=range] only supports `change` event\n var event = isIE ? 'change' : 'input';\n on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n delete on[RANGE_TOKEN];\n }\n // This was originally intended to fix #4521 but no longer necessary\n // after 2.5. Keeping it for backwards compat with generated code from < 2.4\n /* istanbul ignore if */\n if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []);\n delete on[CHECKBOX_RADIO_TOKEN];\n }\n }", "function normalizeEvents(on) {\n /* istanbul ignore if */\n if (isDef(on[RANGE_TOKEN])) {\n // IE input[type=range] only supports `change` event\n var event_1 = isIE ? 'change' : 'input';\n on[event_1] = [].concat(on[RANGE_TOKEN], on[event_1] || []);\n delete on[RANGE_TOKEN];\n }\n // This was originally intended to fix #4521 but no longer necessary\n // after 2.5. Keeping it for backwards compat with generated code from < 2.4\n /* istanbul ignore if */\n if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []);\n delete on[CHECKBOX_RADIO_TOKEN];\n }\n }", "function normalizeEvents (on) {\n /* istanbul ignore if */\n if (isDef(on[RANGE_TOKEN])) {\n // IE input[type=range] only supports `change` event\n var event = isIE ? 'change' : 'input';\n on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n delete on[RANGE_TOKEN];\n }\n // This was originally intended to fix #4521 but no longer necessary\n // after 2.5. Keeping it for backwards compat with generated code from < 2.4\n /* istanbul ignore if */\n if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []);\n delete on[CHECKBOX_RADIO_TOKEN];\n }\n }", "function normalizeEvents (on) {\n /* istanbul ignore if */\n if (isDef(on[RANGE_TOKEN])) {\n // IE input[type=range] only supports `change` event\n var event = isIE ? 'change' : 'input';\n on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n delete on[RANGE_TOKEN];\n }\n // This was originally intended to fix #4521 but no longer necessary\n // after 2.5. Keeping it for backwards compat with generated code from < 2.4\n /* istanbul ignore if */\n if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []);\n delete on[CHECKBOX_RADIO_TOKEN];\n }\n }", "function normalizeEvents (on) {\n /* istanbul ignore if */\n if (isDef(on[RANGE_TOKEN])) {\n // IE input[type=range] only supports `change` event\n var event = isIE ? 'change' : 'input';\n on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n delete on[RANGE_TOKEN];\n }\n // This was originally intended to fix #4521 but no longer necessary\n // after 2.5. Keeping it for backwards compat with generated code from < 2.4\n /* istanbul ignore if */\n if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []);\n delete on[CHECKBOX_RADIO_TOKEN];\n }\n }", "function normalizeEvents (on) {\n /* istanbul ignore if */\n if (isDef(on[RANGE_TOKEN])) {\n // IE input[type=range] only supports `change` event\n var event = isIE ? 'change' : 'input';\n on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n delete on[RANGE_TOKEN];\n }\n // This was originally intended to fix #4521 but no longer necessary\n // after 2.5. Keeping it for backwards compat with generated code from < 2.4\n /* istanbul ignore if */\n if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []);\n delete on[CHECKBOX_RADIO_TOKEN];\n }\n }", "function normalizeEvents(on) {\n /* istanbul ignore if */\n if (isDef(on[RANGE_TOKEN])) {\n // IE input[type=range] only supports `change` event\n var event = isIE ? 'change' : 'input';\n on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n delete on[RANGE_TOKEN];\n }\n // This was originally intended to fix #4521 but no longer necessary\n // after 2.5. Keeping it for backwards compat with generated code from < 2.4\n /* istanbul ignore if */\n if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []);\n delete on[CHECKBOX_RADIO_TOKEN];\n }\n }", "function normalizeEvents(on) {\n /* istanbul ignore if */\n if (isDef(on[RANGE_TOKEN])) {\n // IE input[type=range] only supports `change` event\n var event = isIE ? 'change' : 'input';\n on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n delete on[RANGE_TOKEN];\n }\n // This was originally intended to fix #4521 but no longer necessary\n // after 2.5. Keeping it for backwards compat with generated code from < 2.4\n /* istanbul ignore if */\n if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []);\n delete on[CHECKBOX_RADIO_TOKEN];\n }\n }", "function normalizeEvents (on) {\n var event;\n /* istanbul ignore if */\n if (isDef(on[RANGE_TOKEN])) {\n // IE input[type=range] only supports `change` event\n event = isIE ? 'change' : 'input';\n on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n delete on[RANGE_TOKEN];\n }\n if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n // Chrome fires microtasks in between click/change, leads to #4521\n event = isChrome ? 'click' : 'change';\n on[event] = [].concat(on[CHECKBOX_RADIO_TOKEN], on[event] || []);\n delete on[CHECKBOX_RADIO_TOKEN];\n }\n}", "function normalizeEvents (on) {\n var event;\n /* istanbul ignore if */\n if (isDef(on[RANGE_TOKEN])) {\n // IE input[type=range] only supports `change` event\n event = isIE ? 'change' : 'input';\n on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n delete on[RANGE_TOKEN];\n }\n if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n // Chrome fires microtasks in between click/change, leads to #4521\n event = isChrome ? 'click' : 'change';\n on[event] = [].concat(on[CHECKBOX_RADIO_TOKEN], on[event] || []);\n delete on[CHECKBOX_RADIO_TOKEN];\n }\n}", "function normalizeEvents (on) {\n var event;\n /* istanbul ignore if */\n if (isDef(on[RANGE_TOKEN])) {\n // IE input[type=range] only supports `change` event\n event = isIE ? 'change' : 'input';\n on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n delete on[RANGE_TOKEN];\n }\n if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n // Chrome fires microtasks in between click/change, leads to #4521\n event = isChrome ? 'click' : 'change';\n on[event] = [].concat(on[CHECKBOX_RADIO_TOKEN], on[event] || []);\n delete on[CHECKBOX_RADIO_TOKEN];\n }\n}", "function normalizeEvents (on) {\n var event;\n /* istanbul ignore if */\n if (isDef(on[RANGE_TOKEN])) {\n // IE input[type=range] only supports `change` event\n event = isIE ? 'change' : 'input';\n on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n delete on[RANGE_TOKEN];\n }\n if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n // Chrome fires microtasks in between click/change, leads to #4521\n event = isChrome ? 'click' : 'change';\n on[event] = [].concat(on[CHECKBOX_RADIO_TOKEN], on[event] || []);\n delete on[CHECKBOX_RADIO_TOKEN];\n }\n}", "function normalizeEvents (on) {\n var event;\n /* istanbul ignore if */\n if (isDef(on[RANGE_TOKEN])) {\n // IE input[type=range] only supports `change` event\n event = isIE ? 'change' : 'input';\n on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n delete on[RANGE_TOKEN];\n }\n if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n // Chrome fires microtasks in between click/change, leads to #4521\n event = isChrome ? 'click' : 'change';\n on[event] = [].concat(on[CHECKBOX_RADIO_TOKEN], on[event] || []);\n delete on[CHECKBOX_RADIO_TOKEN];\n }\n}", "function normalizeEvents (on) {\n var event;\n /* istanbul ignore if */\n if (isDef(on[RANGE_TOKEN])) {\n // IE input[type=range] only supports `change` event\n event = isIE ? 'change' : 'input';\n on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n delete on[RANGE_TOKEN];\n }\n if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n // Chrome fires microtasks in between click/change, leads to #4521\n event = isChrome ? 'click' : 'change';\n on[event] = [].concat(on[CHECKBOX_RADIO_TOKEN], on[event] || []);\n delete on[CHECKBOX_RADIO_TOKEN];\n }\n}", "function normalizeEvents (on) {\n var event;\n /* istanbul ignore if */\n if (isDef(on[RANGE_TOKEN])) {\n // IE input[type=range] only supports `change` event\n event = isIE ? 'change' : 'input';\n on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n delete on[RANGE_TOKEN];\n }\n if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n // Chrome fires microtasks in between click/change, leads to #4521\n event = isChrome ? 'click' : 'change';\n on[event] = [].concat(on[CHECKBOX_RADIO_TOKEN], on[event] || []);\n delete on[CHECKBOX_RADIO_TOKEN];\n }\n}", "function normalizeEvents (on) {\n var event;\n /* istanbul ignore if */\n if (isDef(on[RANGE_TOKEN])) {\n // IE input[type=range] only supports `change` event\n event = isIE ? 'change' : 'input';\n on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n delete on[RANGE_TOKEN];\n }\n if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n // Chrome fires microtasks in between click/change, leads to #4521\n event = isChrome ? 'click' : 'change';\n on[event] = [].concat(on[CHECKBOX_RADIO_TOKEN], on[event] || []);\n delete on[CHECKBOX_RADIO_TOKEN];\n }\n}", "function normalizeEvents (on) {\n var event;\n /* istanbul ignore if */\n if (isDef(on[RANGE_TOKEN])) {\n // IE input[type=range] only supports `change` event\n event = isIE ? 'change' : 'input';\n on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n delete on[RANGE_TOKEN];\n }\n if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n // Chrome fires microtasks in between click/change, leads to #4521\n event = isChrome ? 'click' : 'change';\n on[event] = [].concat(on[CHECKBOX_RADIO_TOKEN], on[event] || []);\n delete on[CHECKBOX_RADIO_TOKEN];\n }\n}", "function normalizeEvents (on) {\n var event;\n /* istanbul ignore if */\n if (isDef(on[RANGE_TOKEN])) {\n // IE input[type=range] only supports `change` event\n event = isIE ? 'change' : 'input';\n on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n delete on[RANGE_TOKEN];\n }\n if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n // Chrome fires microtasks in between click/change, leads to #4521\n event = isChrome ? 'click' : 'change';\n on[event] = [].concat(on[CHECKBOX_RADIO_TOKEN], on[event] || []);\n delete on[CHECKBOX_RADIO_TOKEN];\n }\n}", "function normalizeEvents (on) {\n var event;\n /* istanbul ignore if */\n if (isDef(on[RANGE_TOKEN])) {\n // IE input[type=range] only supports `change` event\n event = isIE ? 'change' : 'input';\n on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n delete on[RANGE_TOKEN];\n }\n if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n // Chrome fires microtasks in between click/change, leads to #4521\n event = isChrome ? 'click' : 'change';\n on[event] = [].concat(on[CHECKBOX_RADIO_TOKEN], on[event] || []);\n delete on[CHECKBOX_RADIO_TOKEN];\n }\n}", "function normalizeEvents (on) {\n var event;\n /* istanbul ignore if */\n if (isDef(on[RANGE_TOKEN])) {\n // IE input[type=range] only supports `change` event\n event = isIE ? 'change' : 'input';\n on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n delete on[RANGE_TOKEN];\n }\n if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n // Chrome fires microtasks in between click/change, leads to #4521\n event = isChrome ? 'click' : 'change';\n on[event] = [].concat(on[CHECKBOX_RADIO_TOKEN], on[event] || []);\n delete on[CHECKBOX_RADIO_TOKEN];\n }\n}", "function normalizeEvents (on) {\n var event;\n /* istanbul ignore if */\n if (isDef(on[RANGE_TOKEN])) {\n // IE input[type=range] only supports `change` event\n event = isIE ? 'change' : 'input';\n on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n delete on[RANGE_TOKEN];\n }\n if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n // Chrome fires microtasks in between click/change, leads to #4521\n event = isChrome ? 'click' : 'change';\n on[event] = [].concat(on[CHECKBOX_RADIO_TOKEN], on[event] || []);\n delete on[CHECKBOX_RADIO_TOKEN];\n }\n}", "function normalizeEvents (on) {\n var event;\n /* istanbul ignore if */\n if (isDef(on[RANGE_TOKEN])) {\n // IE input[type=range] only supports `change` event\n event = isIE ? 'change' : 'input';\n on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n delete on[RANGE_TOKEN];\n }\n if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n // Chrome fires microtasks in between click/change, leads to #4521\n event = isChrome ? 'click' : 'change';\n on[event] = [].concat(on[CHECKBOX_RADIO_TOKEN], on[event] || []);\n delete on[CHECKBOX_RADIO_TOKEN];\n }\n}", "function normalizeEvents (on) {\n var event;\n /* istanbul ignore if */\n if (isDef(on[RANGE_TOKEN])) {\n // IE input[type=range] only supports `change` event\n event = isIE ? 'change' : 'input';\n on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n delete on[RANGE_TOKEN];\n }\n if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n // Chrome fires microtasks in between click/change, leads to #4521\n event = isChrome ? 'click' : 'change';\n on[event] = [].concat(on[CHECKBOX_RADIO_TOKEN], on[event] || []);\n delete on[CHECKBOX_RADIO_TOKEN];\n }\n}", "function normalizeEvents (on) {\n var event;\n /* istanbul ignore if */\n if (isDef(on[RANGE_TOKEN])) {\n // IE input[type=range] only supports `change` event\n event = isIE ? 'change' : 'input';\n on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n delete on[RANGE_TOKEN];\n }\n if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n // Chrome fires microtasks in between click/change, leads to #4521\n event = isChrome ? 'click' : 'change';\n on[event] = [].concat(on[CHECKBOX_RADIO_TOKEN], on[event] || []);\n delete on[CHECKBOX_RADIO_TOKEN];\n }\n}", "function normalizeEvents(on) {\n /* istanbul ignore if */\n if (isDef(on[RANGE_TOKEN])) {\n // IE input[type=range] only supports `change` event\n var event = isIE ? 'change' : 'input';\n on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n delete on[RANGE_TOKEN];\n } // This was originally intended to fix #4521 but no longer necessary\n // after 2.5. Keeping it for backwards compat with generated code from < 2.4\n\n /* istanbul ignore if */\n\n\n if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []);\n delete on[CHECKBOX_RADIO_TOKEN];\n }\n }", "function normalizeEvents(on) {\n var event;\n /* istanbul ignore if */\n if (isDef(on[RANGE_TOKEN])) {\n // IE input[type=range] only supports `change` event\n event = isIE ? 'change' : 'input';\n on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n delete on[RANGE_TOKEN];\n }\n if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n // Chrome fires microtasks in between click/change, leads to #4521\n event = isChrome ? 'click' : 'change';\n on[event] = [].concat(on[CHECKBOX_RADIO_TOKEN], on[event] || []);\n delete on[CHECKBOX_RADIO_TOKEN];\n }\n}", "function normalizeEvents(on) {\n var event;\n /* istanbul ignore if */\n if (isDef(on[RANGE_TOKEN])) {\n // IE input[type=range] only supports `change` event\n event = isIE ? 'change' : 'input';\n on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n delete on[RANGE_TOKEN];\n }\n if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n // Chrome fires microtasks in between click/change, leads to #4521\n event = isChrome ? 'click' : 'change';\n on[event] = [].concat(on[CHECKBOX_RADIO_TOKEN], on[event] || []);\n delete on[CHECKBOX_RADIO_TOKEN];\n }\n}", "normalize(events) {\n if (events.length == 0) {\n return events;\n }\n\n return events.map((e) => e.split('.').shift());\n }" ]
[ "0.61190027", "0.61190027", "0.61190027", "0.6032805", "0.6014792", "0.6014792", "0.60098845", "0.60098845", "0.60098845", "0.60092515", "0.600608", "0.6004231", "0.5989151", "0.5989151", "0.5989151", "0.5989151", "0.59634006", "0.59447026", "0.5942347", "0.5942347", "0.5942347", "0.5942347", "0.5942347", "0.5942347", "0.5942347", "0.5942347", "0.5942347", "0.5942347", "0.5942347", "0.5942347", "0.5942347", "0.5942347", "0.5942347", "0.5942347", "0.5928537", "0.5919872", "0.5919872", "0.5896778" ]
0.0
-1
merge static and dynamic style data on the same vnode
function normalizeStyleData (data) { var style = normalizeStyleBinding(data.style); // static style is pre-processed into an object during compilation // and is always a fresh object, so it's safe to merge into it return data.staticStyle ? extend(data.staticStyle, style) : style }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function normalizeStyleData (data) {\n var style = normalizeStyleBinding(data.style);\n // static style is pre-processed into an object during compilation\n // and is always a fresh object, so it's safe to merge into it\n return data.staticStyle\n ? extend(data.staticStyle, style)\n : style\n }", "function normalizeStyleData(data) {\n var style = normalizeStyleBinding(data.style);\n // static style is pre-processed into an object during compilation\n // and is always a fresh object, so it's safe to merge into it\n return data.staticStyle\n ? extend(data.staticStyle, style)\n : style;\n }", "function normalizeStyleData(data) {\n var style = normalizeStyleBinding(data.style);\n // static style is pre-processed into an object during compilation\n // and is always a fresh object, so it's safe to merge into it\n return data.staticStyle ?\n extend(data.staticStyle, style) :\n style\n }", "function normalizeStyleData (data) {\n var style = normalizeStyleBinding(data.style);\n // static style is pre-processed into an object during compilation\n // and is always a fresh object, so it's safe to merge into it\n return data.staticStyle\n ? extend(data.staticStyle, style)\n : style\n }", "function normalizeStyleData (data) {\n var style = normalizeStyleBinding(data.style);\n // static style is pre-processed into an object during compilation\n // and is always a fresh object, so it's safe to merge into it\n return data.staticStyle\n ? extend(data.staticStyle, style)\n : style\n }", "function normalizeStyleData (data) {\n var style = normalizeStyleBinding(data.style);\n // static style is pre-processed into an object during compilation\n // and is always a fresh object, so it's safe to merge into it\n return data.staticStyle\n ? extend(data.staticStyle, style)\n : style\n }", "function normalizeStyleData (data) {\n var style = normalizeStyleBinding(data.style);\n // static style is pre-processed into an object during compilation\n // and is always a fresh object, so it's safe to merge into it\n return data.staticStyle\n ? extend(data.staticStyle, style)\n : style\n }", "function normalizeStyleData(data) {\n var style = normalizeStyleBinding(data.style);\n // static style is pre-processed into an object during compilation\n // and is always a fresh object, so it's safe to merge into it\n return data.staticStyle ? extend(data.staticStyle, style) : style;\n }", "function normalizeStyleData(data) {\n var style = normalizeStyleBinding(data.style);\n // static style is pre-processed into an object during compilation\n // and is always a fresh object, so it's safe to merge into it\n return data.staticStyle ? extend(data.staticStyle, style) : style;\n }", "function normalizeStyleData(data) {\n\t var style = normalizeStyleBinding(data.style);\n\t // static style is pre-processed into an object during compilation\n\t // and is always a fresh object, so it's safe to merge into it\n\t return data.staticStyle ? extend(data.staticStyle, style) : style;\n\t}", "function normalizeStyleData(data) {\n\t var style = normalizeStyleBinding(data.style);\n\t // static style is pre-processed into an object during compilation\n\t // and is always a fresh object, so it's safe to merge into it\n\t return data.staticStyle ? extend(data.staticStyle, style) : style;\n\t}", "function normalizeStyleData(data) {\n\t var style = normalizeStyleBinding(data.style);\n\t // static style is pre-processed into an object during compilation\n\t // and is always a fresh object, so it's safe to merge into it\n\t return data.staticStyle ? extend(data.staticStyle, style) : style;\n\t}", "function normalizeStyleData (data) {\n\t var style = normalizeStyleBinding(data.style);\n\t // static style is pre-processed into an object during compilation\n\t // and is always a fresh object, so it's safe to merge into it\n\t return data.staticStyle\n\t ? extend(data.staticStyle, style)\n\t : style\n\t}", "function normalizeStyleData (data) {\n\t var style = normalizeStyleBinding(data.style);\n\t // static style is pre-processed into an object during compilation\n\t // and is always a fresh object, so it's safe to merge into it\n\t return data.staticStyle\n\t ? extend(data.staticStyle, style)\n\t : style\n\t}", "function normalizeStyleData (data) {\n\t var style = normalizeStyleBinding(data.style);\n\t // static style is pre-processed into an object during compilation\n\t // and is always a fresh object, so it's safe to merge into it\n\t return data.staticStyle\n\t ? extend(data.staticStyle, style)\n\t : style\n\t}", "function normalizeStyleData (data) {\n\t var style = normalizeStyleBinding(data.style);\n\t // static style is pre-processed into an object during compilation\n\t // and is always a fresh object, so it's safe to merge into it\n\t return data.staticStyle\n\t ? extend(data.staticStyle, style)\n\t : style\n\t}", "function normalizeStyleData (data) {\n\t var style = normalizeStyleBinding(data.style);\n\t // static style is pre-processed into an object during compilation\n\t // and is always a fresh object, so it's safe to merge into it\n\t return data.staticStyle\n\t ? extend(data.staticStyle, style)\n\t : style\n\t}", "function normalizeStyleData (data) {\n\t var style = normalizeStyleBinding(data.style);\n\t // static style is pre-processed into an object during compilation\n\t // and is always a fresh object, so it's safe to merge into it\n\t return data.staticStyle\n\t ? extend(data.staticStyle, style)\n\t : style\n\t}", "function normalizeStyleData (data) {\r\n var style = normalizeStyleBinding(data.style);\r\n // static style is pre-processed into an object during compilation\r\n // and is always a fresh object, so it's safe to merge into it\r\n return data.staticStyle\r\n ? extend(data.staticStyle, style)\r\n : style\r\n}" ]
[ "0.6218191", "0.62023467", "0.619667", "0.61707824", "0.61707824", "0.61707824", "0.61707824", "0.6123679", "0.6123679", "0.61214113", "0.61214113", "0.61214113", "0.61205626", "0.61205626", "0.61205626", "0.61205626", "0.61205626", "0.61205626", "0.6106735" ]
0.0
-1
normalize possible array / string values into Object
function normalizeStyleBinding (bindingStyle) { if (Array.isArray(bindingStyle)) { return toObject(bindingStyle) } if (typeof bindingStyle === 'string') { return parseStyleText(bindingStyle) } return bindingStyle }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function normalizeIdentificationValues(ids) {\n const normalized = {};\n Object.entries(ids).forEach(([marker, value]) => {\n if (value === null) {\n normalized[marker] = null;\n }\n else if (Array.isArray(value)) {\n normalized[marker] = value.map((v) => v.toString());\n }\n else {\n normalized[marker] = value.toString();\n }\n });\n return normalized;\n}", "toObject(arr) {\n let newObj = {};\n\n // for (let val of arr) {\n // newObj[val[0]] = val[1];\n // }\n // This is array destructuring assignment\n // syntax. It allows to assign values of array\n // by their position to multiple variables at a time.\n for (let [key, val] of arr) {\n newObj[key] = val;\n }\n\n return newObj;\n }", "__convert_2D_to_1D(data) {\n let new_data = []\n data.map(val => {\n if (this.__is_object(val)) {\n new_data.push(JSON.stringify(val))\n } else {\n new_data.push(`${val}`)\n\n }\n })\n return new_data\n }", "function toObject(arr){var res={};for(var i=0;i<arr.length;i++){if(arr[i]){extend(res,arr[i]);}}return res;}", "function toObject(arr){var res={};for(var i=0;i<arr.length;i++){if(arr[i]){extend(res,arr[i]);}}return res;}", "function toObject(arr){var res={};for(var i=0;i<arr.length;i++){if(arr[i]){extend(res,arr[i]);}}return res;}", "function normalizeStyleData(data){var style=normalizeStyleBinding(data.style);// static style is pre-processed into an object during compilation\n// and is always a fresh object, so it's safe to merge into it\nreturn data.staticStyle?extend(data.staticStyle,style):style;}// normalize possible array / string values into Object", "function normalizeStyleData(data){var style=normalizeStyleBinding(data.style);// static style is pre-processed into an object during compilation\n// and is always a fresh object, so it's safe to merge into it\nreturn data.staticStyle?extend(data.staticStyle,style):style;}// normalize possible array / string values into Object", "function normalize(obj) {\n return likeArray(obj) ? obj :\n isNodeLike(obj) ? [obj] :\n htmlRegex.exec(obj) ? htmlify(obj) :\n [];\n }", "convertStrings(array) {\n array.forEach((entry) => {\n entry.total = parseInt(entry.total);\n entry.drove_alone = parseInt(entry.drove_alone);\n entry.taxi = parseInt(entry.taxi);\n entry.total_carpool = parseInt(entry._2_person_carpool)\n + parseInt(entry._3_person_carpool) + parseInt(entry._4_person_carpool)\n + parseInt(entry._5_or_6_person_carpool)\n + parseInt(entry._7_or_more_person_carpool);\n entry.car_total = entry.drove_alone + entry.taxi + entry.total_carpool;\n entry.total_public_transit = parseInt(entry.bus) + parseInt(entry.streetcar_or_trolley)\n + parseInt(entry.subway) + parseInt(entry.railroad);\n entry.bicycle = parseInt(entry.bicycle);\n entry.motorcycle = parseInt(entry.motorcycle);\n entry.worked_at_home = parseInt(entry.worked_at_home);\n });\n }", "function clean(input) {\n return Array.isArray(input) ? cleanArray(input) : cleanObject(input);\n}", "function clean(input) {\n return Array.isArray(input) ? cleanArray(input) : cleanObject(input);\n}", "function clean(input) {\n return Array.isArray(input) ? cleanArray(input) : cleanObject(input);\n}", "function clean(input) {\n return Array.isArray(input) ? cleanArray(input) : cleanObject(input);\n}", "function clean(input) {\n return Array.isArray(input) ? cleanArray(input) : cleanObject(input);\n}", "function clean(input) {\n return Array.isArray(input) ? cleanArray(input) : cleanObject(input);\n}", "function clean(input) {\n return Array.isArray(input) ? cleanArray(input) : cleanObject(input);\n}", "function arrayToObject(option) {\n if (typeOf(option) == \"array\") {\n option = {\n \"value\": option[0],\n \"text\": option[1] || option[0],\n };\n }\n return option;\n }", "function fromListToObject(arr) {\r\n\tobj={}\r\n\t//obj=Object.fromEntries(arr) we can use this as well\r\n\tfor(var i of arr)\r\n\t{\r\n\t\tobj[i[0]]=i[1]\r\n\t}\r\n\treturn obj\r\n}", "function normalize(term) {\n var arr = [];\n for(var i in term) {\n // normalize everything!\n var value = term[i];\n if(value instanceof Object) {\n // it's an object, loop through these values as well\n var a = normalize(value);\n a.forEach(function(el) {\n arr.push(el);\n });\n }\n value = \"\"+value; // JS string\n // ok for each value we must trim() it and lowercase() it\n value = value.trim().toLowerCase();\n // then we must split it by space, comma and other things\n var words = splitter(value);\n\n for(var x=0; x<words.length; x++) {\n // add each word to our main array\n arr.push(words[x]);\n }\n }\n return arr;\n }", "static fromPairs() {\n let array = [['fred', 30], ['barney', 40]];\n console.log(_.fromPairs(array)); // Object {fred: 30, barney: 40}\n array = [[23, 43], ['ab', 'ewriouwe'], [54]];\n console.log(_.fromPairs(array)); // Object {23: 43, 54: undefined, ab: \"ewriouwe\"}\n }", "function objectizeData(arg){\n \n var data = arg.split(\"&\");\n // console.log(data);\n var obj={};\n\n for(var key in data)\n {\n // console.log(data[key]);\n obj[data[key].split(\"=\")[0]] = data[key].split(\"=\")[1];\n }\n\n console.log(obj);\n return obj;\n}", "function stringifier (input) {\n\n // 1 - Converting basic types \n\n if (typeof input == \"number\") {\n\n var convert_num = input.toString();\n return convert_num;\n }\n\n if (typeof input == \"function\" ) {\n return undefined;\n\n }\n\n if (typeof input == \"string\" && typeof input !== \"function\") {\n var test = \"\\\"\" + input.toString()+ \"\\\"\";\n return test;\n }\n\n // unnecessary??\n if (input == null && typeof input !== \"undefined\") {\n var conv_null = \"null\";\n return conv_null;\n\n }\n\n\n\n // 2 - Converting plain collections\n\n // ARRAYS\n \n\n if (Array.isArray (input)) {\n var temp_arr = [];\n var dimensions = input.length;\n \n //add [ and ] ?\n var final_str = \"\";\n\n \n\n for (var i=0; i<input.length; i++) {\n\n if (typeof input[i] == \"number\") {\n var final_str = input[i].toString();\n temp_arr.push (final_str);\n \n }\n\n if (typeof input[i] == \"string\") {\n var final_str = \"\\\"\" + input[i].toString()+ \"\\\"\";\n temp_arr.push (final_str);\n \n }\n\n if (typeof input[i] == \"function\") {\n final_str = \"null\";\n temp_arr.push (final_str);\n\n }\n\n if (input[i] == undefined) {\n final_str = \"null\";\n temp_arr.push (final_str);\n\n } \n /*\n if (input[i] == null && typeof input[i] !== \"undefined\") { \n final_str = final_str + \"null\";\n */\n\n }\n\n //create other tests\n var res = \"[\" + temp_arr.join() + \"]\";\n\n return res;\n \n }\n\n\n // OBJECTS\n\n//TO DO: remove undefined:undefined from result!\n if (input instanceof Object) {\n\n var arr_val = [];\n\n for (var key in input) {\n\n\n if (key == \"foo\") {\n continue;\n }\n\n if (typeof input[key] == \"number\") {\n var key_val = \"\\\"\"+key+\"\\\"\" + \":\" + input[key];\n var final_str = key_val.toString();\n arr_val.push (final_str);\n \n }\n\n if (typeof input[key] == \"string\") {\n \n var key_val = \"\\\"\"+key+\"\\\"\" + \":\" + \"\\\"\"+input[key]+\"\\\"\";\n var final_str = key_val.toString();\n arr_val.push (final_str);\n \n }\n\n //POURQUOI FAUT-IL ENLEVER FCT?\n \n/*\n if (typeof input[key] == \"function\") {\n var key_val = \"\\\"\"+key+\"\\\"\" + \":\" + input[key];\n var final_str = key_val.toString();\n arr_val.push (final_str);\n\n }*/\n\n if (input[key] == undefined) {\n if (typeof input[key] == \"object\") {\n var key_val = \"\\\"\"+key+\"\\\"\" + \":\" + input[key];\n var final_str = key_val.toString();\n arr_val.push (final_str);\n }\n\n }\n\n }\n\n //create other tests\n var res = \"{\"+ arr_val.join() + \"}\"\n\n return res;\n\n }\n\n\n\n // 3- Converting nested collections\n\n // nested array -> Will be identified as array\n \n}", "function normalizeStyleData(data){var style=normalizeStyleBinding(data.style);// static style is pre-processed into an object during compilation\n\t// and is always a fresh object, so it's safe to merge into it\n\treturn data.staticStyle?extend(data.staticStyle,style):style;}// normalize possible array / string values into Object", "function normalize(a) {\n if (!(a instanceof Array)) {\n a = [a, a];\n }\n\n return a;\n}", "function normalize(a) {\n if (!(a instanceof Array)) {\n a = [a, a];\n }\n\n return a;\n}", "function normalize(a) {\n if (!(a instanceof Array)) {\n a = [a, a];\n }\n\n return a;\n}", "function normalize(a) {\n if (!(a instanceof Array)) {\n a = [a, a];\n }\n\n return a;\n}", "function normalize(a) {\n if (!(a instanceof Array)) {\n a = [a, a];\n }\n\n return a;\n}", "function normalize(a) {\n if (!(a instanceof Array)) {\n a = [a, a];\n }\n\n return a;\n}", "function toObject(arr) {\n\t\t var res = arr[0] || {};\n\t\t for (var i = 1; i < arr.length; i++) {\n\t\t if (arr[i]) {\n\t\t extend(res, arr[i]);\n\t\t }\n\t\t }\n\t\t return res;\n\t\t}", "function normalize$3(a) {\n\t if (!(a instanceof Array)) {\n\t a = [a, a];\n\t }\n\t\n\t return a;\n\t }", "function arrayToObject(array, extractor) {\n return array.reduce(function (result, item, i) {\n var nameAndValue = extractor(item, i);\n if (nameAndValue) result[nameAndValue[0]] = nameAndValue[1];\n return result;\n }, {});\n}", "function _prepareForGun(obj) {\n\tconsole.log('converting Arrays to Objects')\n let _iterate = function(o,s) {\n\n\t\tfor(var p in o) {\n\t \tif(o.hasOwnProperty(p)) {\n\t \t\tif( Gun.list.is(o[p]) ){\n\t \t\t\tconvertBack[s + '.' + p] = true;\n\t \t\t\tconsole.log('...',s + '.' + p)\n\t \t\t\to[p] = _arrToObj(o[p]);\n\t \t\t} else if( Gun.obj.is(o[p]) ) {\n\t \t\ts ? _iterate(o[p], s + '.' + p) : _iterate(o[p],p);\n\t } \n\t } \n\t } \n\t return o\n\t}\n // Start the iteration\n return _iterate(obj);\n}", "function toInputMapping(value) {\n if (value.isString()) {\n return value.getString();\n }\n var values = value.getArray().map(function (innerValue) { return innerValue.getString(); });\n if (values.length !== 2) {\n throw new fatal_linker_error_1.FatalLinkerError(value.expression, 'Unsupported input, expected a string or an array containing exactly two strings');\n }\n return values;\n }", "function normalizeData(value) {\n if (value === 'true') {\n return true;\n }\n if (value === 'false') {\n return false;\n }\n if (value === Number(value).toString()) {\n return Number(value);\n }\n if (value === '' || value === 'null') {\n return null;\n }\n if (typeof value !== 'string') {\n return value;\n }\n try {\n return JSON.parse(decodeURIComponent(value));\n } catch (_unused) {\n return value;\n }\n }", "function toObject(arr) {\r\n\tvar rv = {};\r\n \tfor (var i = 0; i < arr.length; ++i) {\r\n \t\trv[arr[i].name] = arr[i].value;\r\n \t}\r\n\treturn rv;\r\n}", "function changeArrayToObject(array) {\n\n}", "function ParseArray(array, encoding, obj) {\n for (var n = 0; n < encoding.length; ++n) {\n var value = array[n];\n if (!value)\n continue;\n var field = encoding[n];\n var fieldAlpha = field.replace(NON_ALPHA_CHARS, \"\");\n if (field != fieldAlpha)\n value = new RegExp(field.replace(fieldAlpha, value));\n obj[fieldAlpha] = value;\n }\n return obj;\n }", "function steamroller(arr) {\n return arr.toString()\n .replace(',,', ',') // \"1,2,,3\" => \"1,2,3\"\n .split(',') // ['1','2','3']\n .map(function(v) {\n if (v == '[object Object]') { // bring back empty objects\n return {};\n } else if (isNaN(v)) { // if not a number (string)\n return v;\n } else {\n return parseInt(v); // if a number in a string, convert it\n }\n });\n}", "transform(value) {\n if (Array.isArray(value)) {\n return 'array';\n }\n return typeof value;\n }", "function setObjValues(objPlusArrVal) {\n\tif (!Array.isArray) {\n\t Array.isArray = function(obj) {\n\t return Object.prototype.toString.call(obj) == '[object Array]';\n\t }\n\t}\n var obj = objPlusArrVal[0];\n var arrVal = objPlusArrVal[1];\n \n log(\"ObjType:\" + typeof(obj));\n log(\"arrVal:\" + arrVal);\n \n if (Array.isArray(obj))\n for(var i=0; i < obj.length; i++) {\n var objPlusVals = setObjValues([obj[i], arrVal]);\n obj[i] = objPlusVals[0];\n arrVal = objPlusVals[1];\n }\n else if (typeof(obj) == \"object\") \n for(var key in obj) {\n var objPlusVals = setObjValues([obj[key], arrVal]);\n obj[key] = objPlusVals[0];\n arrVal = objPlusVals[1];\n }\n else {\n var objType = typeof(obj);\n var val = arrVal.shift();\n switch (objType) {\n case \"string\": \n obj = val;\n break;\n \n case \"number\":\n obj = parseFloat(val);\n break;\n \n case \"boolean\":\n obj = (val == \"true\") ? true : false;\n break;\n \n default:\n log( \"Unexpected data type!!!\");\n throw \"Unexpected data type!!!\";\n break;\n }\n }\n \n return [obj, arrVal];\n}", "function mixedDataCleaner (arrayOfObjects) {\n function parseCurrency(aString){\n var monk = aString.replace(/\\$/g, ''),\n kungfu = monk.replace(/\\,/g, ''),\n master = Number(kungfu);\n return master;\n }\n \n\n for(var i = 0; i < arrayOfObjects.length; i++) {\n //For an Array containing arrays (custom data)\n if(Array.isArray(arrayOfObjects[i])) {\n for(var q = 0; q < arrayOfObjects[i].length; q++){\n if(arrayOfObjects[i][q]){\n arrayOfObjects[i][q] = parseCurrency(arrayOfObjects[i][q]); \n }\n } \n } else {\n //For an Array containing Objects (JSON)\n for(var j in arrayOfObjects[i]){\n if( arrayOfObjects[i][j][0] === '$' || arrayOfObjects[i][j][0] === '-' ) {\n arrayOfObjects[i][j] = parseCurrency(arrayOfObjects[i][j]);\n // console.log(arrayOfObjects[i][j])\n }\n }\n }\n }\n return arrayOfObjects;\n}", "function flattern(obj){\n var x = {};\n _.each(obj, function(a,b) {\n x[(_.isArray(obj)) ? a : b] = true;\n });\n return x;\n }", "function doCollectStringValues(data, _, val) {\n if (Array.isArray(val)) return;\n if ('string' === typeof val) {\n data.push(val);\n } else if ('object' === typeof val) {\n data.push(...collectStringValues(val));\n }\n}", "function convert(data) {\n if (!Array.isArray(data))\n return data;\n\n let c;\n if (header && !headers) {\n headers = data;\n }\n else {\n // convert array to object\n c = {};\n for (let i = 0; i < headers.length; i++) {\n if (i >= data.length)\n break;\n c[ headers[ i ] ] = data[ i ];\n }\n }\n\n return c;\n }", "function array2object(arr){\n var obj = {};\n Gun.list.map(arr, function(v,f,t){\n if(Gun.list.is(v) || Gun.obj.is(v)){\n obj[f] = array2object(v);\n return;\n }\n obj[f] = v;\n });\n obj.uuid = uuid; // TODO always at leaf level? needed there??\n return obj;\n }", "function normalize(data) {\n \"use strict\";\n var ret = {};\n data.forEach(function (item, idx) {\n if(item.id) {\n ret[item.id] = pluck(item); \n }\n });\n return ret;\n }", "function processArrays(obj){\n for (var k in obj) {\n if (!obj.hasOwnProperty(k)) {\n continue;\n } else if (obj[k] instanceof Array){\n if ((obj[k].length == 2) && (typeof(obj[k][0]) == 'object') && ((typeof(obj[k][1])!='undefined') && (typeof(obj[k][1])!='object'))){\n obj[k][0][(k == 'audio' || k == 'image' || k == 'video') ? 'url' : 'value'] = obj[k][1];\n obj[k] = obj[k][0];\n }\n } else if (typeof obj[k] == \"object\"){\n processArrays(obj[k]);\n }\n }\n }", "normalizeSortByValue(a, multi) {\n if (_.isString(a)) {\n return multi ? [a, \"asc\"] : [[a, \"asc\"]];\n }\n if (_.isArray(a)) {\n if (_.isArray(a[0]))\n return a; // Hej, here we can expect the user of the function is passing a proper parameter.\n return _.map(a, c => { return this.normalizeSortByValue(c, true); });\n }\n if (_.isPlainObject(a)) {\n var x, b = [];\n for (x in a) {\n b.push([x, a[x]]);\n }\n return b;\n }\n TypeException(\"sort\", \"string | [] | {}\")\n }", "function normalizeValue(val, ind) {\n var i;\n\n if (typeof val === 'function') {\n return Array.isArray(ind) ? ind.map(val) : val(ind);\n }\n if (!Array.isArray(val)) { return utils.singleMissing(val); }\n for (i = 0; i < val.length; i += 1) { val[i] = utils.singleMissing(val[i]); }\n return val;\n }", "function makeArray(values){\n\t\tif(typeof values !== 'undefined'){\n\t\t\tif (!(values instanceof Array)){\n\t\t\t\tif(typeof values === 'string'){\n\t\t\t\t\tif(values.indexOf(' ') >= 0){\n\t\t\t\t\t\tif(((typeof opts !== 'undefined') && (typeof opts.breakIntoLetters !== 'undefined') && opts.breakIntoLetters)){\n\t\t\t\t\t\t\tvalues = values.replace(/([\\s]+)/ig, \"\");\n\t\t\t\t\t\t\tvalues = values.split(\"\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tvalues = values.replace(/([!@#$%^&*()_+\\-=\\[\\]{};':\"\\\\|,.<>\\/?]+)([^\\s]+)/ig, '$1 $2'); //add space after special characters if there is no space \n\t\t\t\t\t\t\tvalues = values.replace(/([^\\s]+)([!@#$%^&*()_+\\-=\\[\\]{};':\"\\\\|,.<>\\/?]+)/ig, '$1 $2'); //add space before special characters if there is no space\n\t\t\t\t\t\t\tvalues = values.split(\" \");\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\tvalues = values.split(\"\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(isNumber(values)){\n\t\t\t\t\tvalues = ''+values+'';\n\t\t\t\t\tvalues = values.split(\"\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tvalues = opts.values.slice(0);\n\t\t}\n\t\t\n\t\treturn values;\n\t}", "function fromArray(as) {\n return as.reduce(build, {});\n }", "function toObject(arr) {\n var res = arr[0] || {};\n for (var i = 1; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res;\n}", "function dataArrayToObject(a, cb) {\n let o = {}\n a.forEach(e => {\n delete e._id;\n delete e.__v;\n o[e.title] = e;\n cb && cb(o, e); // cb can include additional reformatting operations\n // delete o[e.title].title;\n });\n return o;\n }", "function toObject(arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res;\n }", "function objectify(array){\n\toutobject = {}\n\tfor(var i = 0; i < array.length; i++){\n\t\toutobject[array[i][0]] = array[i][1]\n\t}\n\treturn outobject;\n}", "function normalize(obj) {\n if (obj === null || typeof obj !== 'object') {\n return JSON.stringify(obj);\n }\n if (obj instanceof Array) {\n return '[' + obj.map(normalize).join(', ') + ']';\n }\n let answer = '{';\n for (const key of Object.keys(obj).sort()) {\n answer += key + ': ';\n answer += normalize(obj[key]);\n answer += ', ';\n }\n answer += '}';\n return answer;\n}", "function createObject(array){\n var object = {};\n array.forEach(function(val){\n if(val.name === \"age\" || val.name === \"weight\" || val.name === \"feet\" || val.name ===\"inches\" || val.name ===\"cal\" || val.name ===\"fat\" || val.name ===\"sodium\" || val.name ===\"carbs\" || val.name ===\"protein\" || val.name ===\"serving\"){\n var numVal = Number(val.value);\n object[val.name] = numVal;\n }\n else {\n object[val.name] = val.value;\n }\n });\n return object;\n }", "function toObject(arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res;\n }", "function toObject(arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res;\n }", "function parse(a, o) {\n var n = {}; // examine all keys in altered\n\n for (var k in a) {\n if (k in o) {\n if (a[k] == null && o[k] != null) {\n n[k] = a[k];\n } else if (isPlainObject(a[k])) {\n if (isPlainObject(o[k])) {\n var nested = parse(a[k], o[k]);\n\n if (objectSize(nested)) {\n n[k] = nested;\n }\n } else {\n n[k] = a[k];\n }\n } else if (a[k] !== o[k]) {\n n[k] = a[k];\n }\n } else {\n n[k] = a[k];\n }\n } // mark any missing key as a null value\n\n\n for (var _k in o) {\n if (!(_k in a)) {\n n[_k] = null;\n }\n }\n\n return n;\n } // ingest inputs", "function toObject(arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res\n }", "function toObject(arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res\n }", "function entriesToObject(entries) {\r\n\t const o = {};\r\n\t for (let i = 0; i < entries.length; i += 1) {\r\n\t const key = entries[i][0];\r\n\t const values = entries[i][1];\r\n\t let value;\r\n\t if (values.length === 1) {\r\n\t value = values[0];\r\n\t } else {\r\n\t value = values;\r\n\t }\r\n\r\n\t if (o.hasOwnProperty(key) && !isNaN(o[key])) {\r\n\t throw new Error('Object ' + o + ' already has key ' + key);\r\n\t }\r\n\r\n\t o[key] = value;\r\n\t }\r\n\r\n\t return o;\r\n\t}", "function toObject(arr) {\n var res = {};\n\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n\n return res;\n }", "toObject (array) {\n const obj = {}\n for (const v of array) {\n obj[v.id] = v\n }\n return obj\n }", "function entriesToObject(entries) {\n var o = {};\n for (var i = 0; i < entries.length; i += 1) {\n var key = entries[i][0];\n var values = entries[i][1];\n var value = void 0;\n if (values.length === 1) {\n value = values[0];\n } else {\n value = values;\n }\n\n if (o.hasOwnProperty(key) && !isNaN(o[key])) {\n throw new Error('Object ' + o + ' already has key ' + key);\n }\n\n o[key] = value;\n }\n\n return o;\n }", "function sanitize(value, depth) {\n if (typeof value !== \"object\" || value === null) {\n return value;\n }\n if (Array.isArray(value)) {\n if (depth) {\n return value.map((item) => sanitize(item, depth - 1));\n }\n else {\n return [];\n }\n }\n if (depth) {\n let clone = {};\n for (let key of Object.keys(value)) {\n clone[key] = sanitize(value[key], depth - 1);\n }\n return clone;\n }\n else {\n return {};\n }\n}", "function toObject(arr) {\n\t var res = {};\n\t for (var i = 0; i < arr.length; i++) {\n\t if (arr[i]) {\n\t extend(res, arr[i]);\n\t }\n\t }\n\t return res;\n\t}", "function toObject(arr) {\n\t var res = {};\n\t for (var i = 0; i < arr.length; i++) {\n\t if (arr[i]) {\n\t extend(res, arr[i]);\n\t }\n\t }\n\t return res;\n\t}", "function toObject(arr) {\n\t var res = {};\n\t for (var i = 0; i < arr.length; i++) {\n\t if (arr[i]) {\n\t extend(res, arr[i]);\n\t }\n\t }\n\t return res;\n\t}", "function toObject (arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res\n }", "function toObject (arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res\n }", "function toObject (arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res\n }", "function toObject (arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res\n }", "function toObject (arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res\n }", "function arrayify(value) {\n if (value === undefined) return [];\n else if (_.isArray(value)) return value;\n else return [value];\n}", "constructor(word, args, isArrayKeyWord = false) {\n if (isArrayKeyWord) {\n this.parseArray(word, args[0]);\n } else {\n this.parseObject(word, args);\n }\n }", "function convertHookData(obj) {\n let hook = {};\n if (Array.isArray(obj)) {\n hook = { all: obj };\n }\n else if (typeof obj !== 'object') {\n hook = { all: [obj] };\n }\n else {\n each(obj, function (value, key) {\n hook[key] = !Array.isArray(value) ? [value] : value;\n });\n }\n return hook;\n}", "function parse(type) {\n\t\treturn isArray(type) ? asArray(type) : asObject(type);\n\t}", "function normalizeToArray(value) {\n return [].concat(value);\n}", "function entriesToObject(entries) {\n const o = {};\n for (let i = 0; i < entries.length; i += 1) {\n const key = entries[i][0];\n const values = entries[i][1];\n let value;\n if (values.length === 1) {\n value = values[0];\n } else {\n value = values;\n }\n\n if (o.hasOwnProperty(key) && !isNaN(o[key])) {\n throw new Error('Object ' + o + ' already has key ' + key);\n }\n\n o[key] = value;\n }\n\n return o;\n}", "function toObject (arr) {\n\t var res = {};\n\t for (var i = 0; i < arr.length; i++) {\n\t if (arr[i]) {\n\t extend(res, arr[i]);\n\t }\n\t }\n\t return res\n\t}", "function toObject (arr) {\n\t var res = {};\n\t for (var i = 0; i < arr.length; i++) {\n\t if (arr[i]) {\n\t extend(res, arr[i]);\n\t }\n\t }\n\t return res\n\t}", "function toObject (arr) {\n\t var res = {};\n\t for (var i = 0; i < arr.length; i++) {\n\t if (arr[i]) {\n\t extend(res, arr[i]);\n\t }\n\t }\n\t return res\n\t}", "function toObject (arr) {\n\t var res = {};\n\t for (var i = 0; i < arr.length; i++) {\n\t if (arr[i]) {\n\t extend(res, arr[i]);\n\t }\n\t }\n\t return res\n\t}", "function toObject (arr) {\n\t var res = {};\n\t for (var i = 0; i < arr.length; i++) {\n\t if (arr[i]) {\n\t extend(res, arr[i]);\n\t }\n\t }\n\t return res\n\t}", "function toObject (arr) {\n\t var res = {};\n\t for (var i = 0; i < arr.length; i++) {\n\t if (arr[i]) {\n\t extend(res, arr[i]);\n\t }\n\t }\n\t return res\n\t}", "function toObject (arr) {\n\t var res = {};\n\t for (var i = 0; i < arr.length; i++) {\n\t if (arr[i]) {\n\t extend(res, arr[i]);\n\t }\n\t }\n\t return res\n\t}", "function toObject (arr) {\n\t var res = {};\n\t for (var i = 0; i < arr.length; i++) {\n\t if (arr[i]) {\n\t extend(res, arr[i]);\n\t }\n\t }\n\t return res\n\t}", "function unitsToObject(units) {\n let list = {}\n\n if (Array.isArray(units)) {\n units.forEach((v) => {\n list[v] = true\n })\n } else if (units === Object(units)) {\n list = units\n } else if (typeof units === \"number\" || typeof units === \"string\") {\n list[units] = true\n } else {\n throw new Error(\"Provide an array, object, string or number when passing units!\")\n }\n\n return list\n}", "transformValue(value) {\n if (typeof value == 'string') {\n // Wrap the string in ' and escape them.\n return \"'\" + value.replace(/([^\\\\])'/g, \"$1\\\\'\") + \"'\";\n }\n\n if (typeof value != 'number' && typeof value != 'boolean') {\n const isArray = Array.isArray(value);\n let contents = '';\n\n let quoteKeys = false;\n if (!isArray) {\n for (let key in value) {\n if (key.indexOf('-') >= 0) {\n quoteKeys = true;\n break;\n }\n }\n }\n\n for (let key in value) {\n value[key] = this.transformValue(value[key]);\n\n const quotedKey = quoteKeys ? \"'\" + key + \"'\" : key;\n contents += ' ' + (isArray ? '' : quotedKey + ': ') + value[key] + \",\\n\";\n }\n\n contents += (isArray ? ']' : '}');\n\n return (isArray ? '[' : '{') + \"\\n\" + contents.replace(/^/gm, ' ');\n }\n\n return value;\n }", "function toObject (arr) {\n\t var res = {}\n\t for (var i = 0; i < arr.length; i++) {\n\t if (arr[i]) {\n\t extend(res, arr[i])\n\t }\n\t }\n\t return res\n\t}", "objectToDocument() {\n const data = {};\n\n const reducer = (acc, curr) => {\n const { key, type, optional, fields } = curr;\n\n let value = get(this.params, key);\n if (!this.hasData(value)) return acc;\n if (type === Number && typeof value === 'string') value = Number(value);\n\n this.validate({ value, key, type, optional });\n\n if (fields && fields.length > 0) {\n if (type === Object && isObject(value)) {\n fields.map((f) => ({ ...f, key: `${key}.${f.key}` })).reduce(reducer, data);\n } else if (type === Array && isArray(value)) {\n if (value.length === 0) {\n set(acc, key, []);\n } else {\n value.forEach((_, index) => {\n fields.map((f) => ({ ...f, key: `${key}[${index}].${f.key}` })).reduce(reducer, data);\n });\n }\n }\n } else {\n set(acc, key, value);\n }\n return acc;\n };\n\n return camelToSnake(this.validators.reduce(reducer, data));\n }", "function toObject(arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res;\n}", "function toObject(arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res;\n}", "function toObject(arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res;\n}", "function toObject(arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res;\n}", "function toObject(arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res;\n}", "function toObject(arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res;\n}" ]
[ "0.61348504", "0.60356313", "0.58325696", "0.58279186", "0.58279186", "0.58279186", "0.568786", "0.568786", "0.5687816", "0.56414163", "0.5611286", "0.5611286", "0.5611286", "0.5611286", "0.5611286", "0.5611286", "0.5611286", "0.55655813", "0.55638725", "0.5559283", "0.5558982", "0.5551937", "0.55512816", "0.5542693", "0.55336314", "0.55336314", "0.55336314", "0.55336314", "0.55336314", "0.55336314", "0.55180836", "0.551036", "0.55041665", "0.5503216", "0.54854083", "0.54799956", "0.54736674", "0.5469327", "0.54603916", "0.5455686", "0.54451835", "0.5424835", "0.54101974", "0.5381534", "0.5376282", "0.53661495", "0.5351162", "0.5344545", "0.5343025", "0.5335368", "0.53309184", "0.5322868", "0.53199744", "0.5315686", "0.5305297", "0.5279473", "0.5275374", "0.52733564", "0.5266781", "0.52648705", "0.52648705", "0.52609456", "0.5260008", "0.5260008", "0.52418137", "0.5232158", "0.5226448", "0.52234757", "0.5218506", "0.52136886", "0.52136886", "0.52136886", "0.521193", "0.5203495", "0.5203495", "0.5203495", "0.5203495", "0.51936424", "0.5192683", "0.5179077", "0.51691836", "0.51604015", "0.51526034", "0.5142828", "0.5142828", "0.5142828", "0.5142828", "0.5142828", "0.5142828", "0.5142828", "0.5142828", "0.5142809", "0.5142016", "0.5125113", "0.5124937", "0.5124053", "0.5124053", "0.5124053", "0.5124053", "0.5124053", "0.5124053" ]
0.0
-1
parent component style should be after child's so that parent component's style could override it
function getStyle (vnode, checkChild) { var res = {}; var styleData; if (checkChild) { var childNode = vnode; while (childNode.componentInstance) { childNode = childNode.componentInstance._vnode; if ( childNode && childNode.data && (styleData = normalizeStyleData(childNode.data)) ) { extend(res, styleData); } } } if ((styleData = normalizeStyleData(vnode.data))) { extend(res, styleData); } var parentNode = vnode; while ((parentNode = parentNode.parent)) { if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) { extend(res, styleData); } } return res }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getChildStyle() {\n\t\treturn {\n\t\t\tposition: 'relative'\n\t\t};\n\t}", "function inheirtInlineStyles(parent, el){\n\t\tvar style = parent.getProperty('style');\n\t\t\n\t\t// Put parent styles before child styles.\n\t\tstyle && el.setProperty('style', style.replace(/([^;])$/, '$1;') + (el.getProperty('style') || ''));\n\t}", "static get styles() {\n return [...this.baseStyles, ...super.stickyStyles];\n }", "get style(){ return this.__baseStyle; }", "static get styles() {\n return [\n ...(super.styles || []),\n css`\n :host {\n display: flex;\n flex-wrap: wrap;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n .choice-field__graphic-container {\n display: none;\n }\n .choice-field__help-text {\n display: block;\n flex-basis: 100%;\n }\n `,\n ];\n }", "render(){\n return (\n <ChildComponent {...this.props}/>\n );\n }", "render() {\n\n return (\n <div className={this._style}>\n {this.props.children}\n </div>\n );\n }", "function getStyle(vnode,checkChild){var res={};var styleData;if(checkChild){var childNode=vnode;while(childNode.componentInstance){childNode=childNode.componentInstance._vnode;if(childNode.data&&(styleData=normalizeStyleData(childNode.data))){extend(res,styleData);}}}if(styleData=normalizeStyleData(vnode.data)){extend(res,styleData);}var parentNode=vnode;while(parentNode=parentNode.parent){if(parentNode.data&&(styleData=normalizeStyleData(parentNode.data))){extend(res,styleData);}}return res;}", "function getStyle(vnode,checkChild){var res={};var styleData;if(checkChild){var childNode=vnode;while(childNode.componentInstance){childNode=childNode.componentInstance._vnode;if(childNode.data&&(styleData=normalizeStyleData(childNode.data))){extend(res,styleData);}}}if(styleData=normalizeStyleData(vnode.data)){extend(res,styleData);}var parentNode=vnode;while(parentNode=parentNode.parent){if(parentNode.data&&(styleData=normalizeStyleData(parentNode.data))){extend(res,styleData);}}return res;}", "function getStyle(vnode,checkChild){var res={};var styleData;if(checkChild){var childNode=vnode;while(childNode.componentInstance){childNode=childNode.componentInstance._vnode;if(childNode.data&&(styleData=normalizeStyleData(childNode.data))){extend(res,styleData);}}}if(styleData=normalizeStyleData(vnode.data)){extend(res,styleData);}var parentNode=vnode;while(parentNode=parentNode.parent){if(parentNode.data&&(styleData=normalizeStyleData(parentNode.data))){extend(res,styleData);}}return res;}", "function ParentComponent(props) {\n\n return (\n <ChildComponent />\n )\n}", "constructor(props) {\n // Pass props back to parent\n super(props);\n }", "render() {\n return <ChildComponent {...this.props} />;\n }", "render() {\n return <ChildComponent {...this.props} />;\n }", "function PartogramBaseComponentStyle() {\n\tthis.initByNamespace(\"parto-base-wf\");\n}", "function App() {\n\n return (\n <div className=\"App\">\n <Child_B/>\n \n <Child_C/> \n </div>\n );\n}", "componentWillUpdate() {\n hotButtonStyle = notSelectedClass;\n newButtonStyle = notSelectedClass;\n risingButtonStyle = notSelectedClass;\n topButtonStyle = notSelectedClass;\n }", "render(){\n return(\n <>\n { console.log(\"child render that run whenever we change the state and props\") }\n {/* this will not give the husain bcs render func will run first after componentDidMount func */}\n state of child : {this.state.name}<br />\n (props of parent)child : {this.props.name}<br />\n {/* {this.state.innerWidth} */}<br />\n\n {/* in which we change the props by using onClick func and we see that only render func will run bcs it run whenever we change the state */}\n Child : {this.props.ChangState}<br />\n <button onClick= {this.props.onClick}>changePropsInChild</button>\n\n </>\n )\n }", "rotateCommon(child){\n const swapColor = this.color;\n this.color = child.color;\n child.color = swapColor;\n this.immediateUpdateLimits();\n if(child.minimumLow > this.minimumLow){\n child.minimumLow = this.minimumLow;\n }\n if(child.maximumLow < this.maximumLow){\n child.maximumLow = this.maximumLow;\n }\n if(child.minimumHigh > this.minimumHigh){\n child.minimumHigh = this.minimumHigh;\n }\n if(child.maximumHigh < this.maximumHigh){\n child.maximumHigh = this.maximumHigh;\n }\n }", "renderBubble(props) {\r\n return (\r\n <Bubble\r\n {...props}\r\n wrapperStyle={{\r\n right: {\r\n backgroundColor: '#000'\r\n }\r\n }}\r\n />\r\n )\r\n }", "updateStyle() {\n this._styling(this._elRef, this);\n }", "function McOptionParentComponent() { }", "renderBubble(props) {\n return (\n <Bubble\n {...props}\n wrapperStyle={{\n right: {\n backgroundColor: '#000'\n }\n }}\n />\n )\n }", "function MatOptionParentComponent() {}", "function Parent(){\n return (\n <div>\n <h1>Parent</h1>\n <Child/>\n </div>\n )\n}", "function addStyle () {\n // Wrapper style.\n createStyle(wrapper, {\n width: '50px',\n height: '50px',\n borderRadius: '50%',\n fontSize: '18px',\n fontFamily: '\"Trebuchet MS\", Helvetica, sans-serif',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n color: '#fff',\n backgroundColor: '#333',\n position: 'fixed',\n zIndex: '999',\n bottom: '100px',\n right: '50px',\n cursor: 'pointer',\n outline: 'none',\n });\n\n // Inner wrapper style\n createStyle(innerWrapper, {\n width: '200px',\n height: '50px',\n color: '#fff',\n display: 'none',\n position: 'absolute',\n top: '-120px',\n left: '-210px'\n });\n\n createStyle(relativeContainer, {\n position: 'relative',\n width: '0',\n height: '0'\n });\n\n createStyle(callUs, {\n backgroundColor: '#333',\n padding: '8px',\n borderRadius: '20px',\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n });\n\n createStyle(callUsText, {\n color: '#fff',\n fontSize: '20px',\n textAlign: 'center',\n margin: '4px 0'\n });\n\n\n createStyle(callButton, {\n backgroundColor: '#555',\n color: '#75fe75',\n fontSize: '16px',\n fontWeight: '500',\n padding: '6px 12px',\n borderRadius: '20px',\n margin: '8px 0',\n borderColor: 'transparent',\n outline: 'none'\n })\n }", "function App() {\n return (\n <div className=\"App\" style={{ padding: 150,backgroundColor: \"grey\"}}>\n <InputComp/> \n </div>\n );\n}", "render() {\n // eslint-disable-next-line no-unused-vars\n let baseStyle = {};\n // eslint-disable-next-line no-unused-vars\n let layoutFlowStyle = {};\n \n const style_background = {\n width: '100%',\n height: '100%',\n };\n const style_background_outer = {\n backgroundColor: '#f6f6f6',\n pointerEvents: 'none',\n };\n const style_image = {\n backgroundImage: 'url('+img_elImage+')',\n backgroundRepeat: 'no-repeat',\n backgroundPosition: '50% 50%',\n backgroundSize: 'cover',\n pointerEvents: 'none',\n };\n const style_image2 = {\n backgroundImage: 'url('+img_elImage2+')',\n backgroundRepeat: 'no-repeat',\n backgroundPosition: '50% 50%',\n backgroundSize: 'cover',\n };\n const style_image2_outer = {\n pointerEvents: 'none',\n };\n \n return (\n <div className=\"Component1\" style={baseStyle}>\n <div className=\"background\">\n <div className='appBg containerMinHeight elBackground' style={style_background_outer}>\n <div style={style_background} />\n \n </div>\n \n <div className='elImage' style={style_image} />\n </div>\n <div className=\"layoutFlow\">\n <div className='elImage2' style={style_image2_outer}>\n <div style={style_image2} />\n \n </div>\n \n </div>\n </div>\n )\n }", "update(changedProperties){super.update(changedProperties);const templateResult=this.render();if(templateResult instanceof TemplateResult){this.constructor.render(templateResult,this.renderRoot,{scopeName:this.localName,eventContext:this})}// When native Shadow DOM is used but adoptedStyles are not supported,\n// insert styling after rendering to ensure adoptedStyles have highest\n// priority.\nif(this._needsShimAdoptedStyleSheets){this._needsShimAdoptedStyleSheets=!1;this.constructor._styles.forEach(s=>{const style=document.createElement(\"style\");style.textContent=s.cssText;this.renderRoot.appendChild(style)})}}", "componentWillMount() {\n newButtonStyle = notSelectedClass;\n risingButtonStyle = notSelectedClass;\n topButtonStyle = notSelectedClass;\n }", "render() {\n return (\n <button style={{background: this.context.color}}>\n {this.props.children}\n </button>\n );\n }", "static get styles() {\n return [\n css`\n :host {\n display: block;\n overflow: auto;\n }\n .buttons {\n position: absolute;\n bottom: 0;\n z-index: 1000000;\n background-color: var(--simple-modal-titlebar-background, #000000);\n color: var(--simple-modal-titlebar-color, #ffffff);\n left: 0;\n right: 0;\n }\n .buttons button {\n color: black;\n background-color: white;\n }\n simple-icon {\n margin-right: 4px;\n }\n `,\n ];\n }", "static get styles() {\n return css `\n :host {\n display: block;\n }\n :host([vertical]) [part=seperator] {\n display: none;\n }\n :host([vertical]) [part=container] {\n align-items: inherit;\n }\n [part=container] {\n padding: 0;\n align-items: center;\n }\n [part=primary-bar],\n [part=secondary-bar] {\n width: 100%;\n }\n `;\n }", "static get baseStyles() {\n return [\n ...super.baseStyles,\n ...RichTextStyles,\n css`\n :host {\n border: var(--rich-text-editor-border-width, 1px) solid\n var(--rich-text-editor-border-color, #ddd);\n background-color: var(--rich-text-editor-bg, #ffffff);\n }\n #morebutton::part(button) {\n border-radius: var(\n --rich-text-editor-button-disabled-border-radius,\n 0px\n );\n }\n `,\n ];\n }", "function Button({children, primary, margin}) {\n return (\n <>\n {/* <Wrapper> */}\n <OutterWrapper>\n <StyledButton primary={primary} margin={margin}>\n {children}\n <p className='addClass'>Style class</p>\n </StyledButton>\n </OutterWrapper>\n {/* <SuperButton>{children}</SuperButton> */}\n {/* </Wrapper> */}\n </> \n )\n}", "constructor(parent) {\n\t\tthis._parent = parent;\n\t\tthis._count = -3 * this._parent.height;\n\t\twhile (this._count < this._parent.height) {\n\t\t\tthis._count += Math.floor(Math.random() * 100);\n\t\t\tthis._parent.addDecoration(new Decoration(this, Math.floor(Math.random() * (this._parent.width - 50)), -this._count, staticCache.decorations[Math.floor(Math.random() * staticCache.decorations.length)]));\n\t\t}\n\t}", "getChildProps(childFile) {\n const child = parseInt(childFile.slice(-3));\n let childProps;\n let childEvents;\n\n if (this.component.id !== WORKSPACE_ID){\n childProps = cloneDeep(this.component.props[child]);\n childProps = flattenStateProps(childProps, child, this.components, methodNames);\n childEvents = cloneDeep(this.component.events[child]);\n childEvents = flattenEvents(childEvents, child, this.components, methodNames);\n } else {\n childProps = flattenStateProps(this.components[child].props, String(child), this.components);\n childEvents = flattenEvents(this.components[child].events, String(child), this.components, methodNames);\n }\n childEvents = insertMethods(childEvents, methodNames);\n if(this.component.id === WORKSPACE_ID) {\n childEvents = insertThis(childEvents, methodNames);\n }\n\n childProps = Object.assign(childProps, childEvents);\n delete childProps.style;\n const className = this.getClass();\n\n return Object.keys(childProps).reduce((inline, prop) => {\n if (className === 'App') {\n if(childEvents.hasOwnProperty(prop)) {\n inline+= ` ${prop}={this.${prop}}\\n`;\n } else {\n inline+= ` ${prop}={this.state.${prop}}\\n`;\n }\n } else {\n inline+= ` ${prop}={${prop}}\\n`;\n }\n return inline;\n }, '');\n }", "update(e){super.update(e);const t=this.render();t instanceof TemplateResult&&this.constructor.render(t,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach(e=>{const t=document.createElement(\"style\");t.textContent=e.cssText,this.renderRoot.appendChild(t)}))}", "render(){\n return(\n <View style = {{flex: 1, backgroundColor: 'blue',}}>\n <View style = {{width: 400 , height: 400, backgroundColor: 'red'}}>\n \n </View>\n </View>\n );\n \n }", "sideColors() {\n return {\n position: \"absolute\",\n zIndex: -1,\n top: 0,\n bottom: 0,\n left: 0,\n width: 7,\n backgroundColor: this.props.color,\n };\n }", "render () {\n return (\n <SmallButton\n {...this.props}\n textStyle={Object.assign({}, styles.buttonText, this.props.textStyle)}\n style={[styles.button, this.props.style]} />\n )\n }", "function getStyle (vnode, checkChild) {\n var res = {};\n var styleData;\n \n if (checkChild) {\n var childNode = vnode;\n while (childNode.componentInstance) {\n childNode = childNode.componentInstance._vnode;\n if (\n childNode && childNode.data &&\n (styleData = normalizeStyleData(childNode.data))\n ) {\n extend(res, styleData);\n }\n }\n }\n \n if ((styleData = normalizeStyleData(vnode.data))) {\n extend(res, styleData);\n }\n \n var parentNode = vnode;\n while ((parentNode = parentNode.parent)) {\n if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\n extend(res, styleData);\n }\n }\n return res\n }", "initialize(){super.initialize(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}", "static get styles() {\n return css`\n .box {\n width: 100%;\n height: 100%;\n position: relative;\n // border-width: 5px;\n // border-color: red;\n border: 4px solid var(--button-color);\n }\n .title{\n font-size: 30px;\n }\n\n .description{\n font-size: 15;\n }\n\n .tags{\n font-size: 12;\n }\n .image{\n width: 100%;\n length: 100%;\n height: auto;\n }\n // .parentclass{\n // z-index: 3;\n // position: absolute;\n // }\n `; \n }", "static get styles() {\n return [\n ...super.styles,\n\n css`\n :host {\n display: block;\n }\n :host([disabled]) {\n pointer-events: none;\n }\n simple-icon-button-lite {\n color: var(--site-modal-icon-color);\n }\n simple-modal-template {\n --simple-modal-width: 50vw;\n --simple-modal-height: 50vh;\n --simple-modal-min-width: 50vw;\n --simple-modal-min-height: 50vh;\n }\n `,\n ];\n }", "initialize(){super.initialize();this.constructor._getUniqueStyles();this.renderRoot=this.createRenderRoot();// Note, if renderRoot is not a shadowRoot, styles would/could apply to the\n// element's getRootNode(). While this could be done, we're choosing not to\n// support this now since it would require different logic around de-duping.\nif(window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot){this.adoptStyles();}}", "renderState1() {\n // eslint-disable-next-line no-unused-vars\n let baseStyle = {};\n // eslint-disable-next-line no-unused-vars\n let layoutFlowStyle = {};\n \n const style_state1_elEmpathyicon = {\n backgroundImage: 'url('+img_state1_elEmpathyicon+')',\n backgroundSize: '100% 100%',\n };\n \n return (\n <div className=\"Empathy\" style={baseStyle}>\n <div className=\"foreground\">\n <div className='state1_elEmpathyicon' style={style_state1_elEmpathyicon} />\n </div>\n </div>\n )\n }", "function inherts(child , parent) {\n child.prototype = Object.create(parent.prototype);\n child.prototype.constructor = child;\n}", "function ParentComponent() {\n return (\n <div className =\"parent\">\n <CountVowels />\n <CountConsonants />\n </div>\n );\n}", "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n }", "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n }", "function updateParent(e) {\n var context = e.context;\n\n self.updateParent(context.shape || context.connection, context.oldParent);\n }", "function updateParent(e) {\n var context = e.context;\n\n self.updateParent(context.shape || context.connection, context.oldParent);\n }", "render(){\n this.sbh.reportRendering();\n const { init, end, itemsContainer_hg, ghostView_hg, viewport_hg } = this.sbh;\n\n const visibleItems = this.state.items.slice( init, end ).map( ( obj, index )=> {\n return this.props.renderFunc( obj, index );\n } );\n console.log( 'style', { position:'relative', ...this.props.style } );\n return (\n <Scrollbars2 onScrollFrame={this.onScrollFrame} thumbMinSize={30}>\n <div className=\"ghostViewTop\" ref=\"ghostViewTop\" style={{ ...this.ghostStyle }} />\n <div ref=\"itemsContainer\" style={{ position:'relative', ...this.props.style }}\n className={this.props.className} >\n {visibleItems}\n </div>\n <div className=\"ghostViewBottom\" ref=\"ghostViewBottom\" style={{ ...this.ghostStyle }} />\n </Scrollbars2>\n );\n }", "_changeChild(){\n this.refs.child.setState({\n child: 'now from parent',\n });\n }", "function ClassicGrid({ children }) {\n if (children.length !== 5) {\n console.log(children)\n throw 'There should be 5 child components.'\n }\n\n const children_ordering = [\n 'classic-grid-parent__header',\n 'classic-grid-parent__left-sidebar',\n 'classic-grid-parent__main-content',\n 'classic-grid-parent__right-sidebar',\n 'classic-grid-parent__footer'\n ]\n\n const newChildren = children.map((child, idx) => {\n return styleInjector(child, children_ordering[idx])\n })\n\n console.log(children, newChildren)\n\n return <div className='classic-grid-parent'>{newChildren}</div>\n}", "function DischargeOrdersComponentStyle()\r\n{\r\n\tthis.initByNamespace(\"dishord\");\r\n}", "componentWillReceiveProps(properties) {\n this.preventFocusStyleForTouchAndClick = has(properties, 'preventFocusStyleForTouchAndClick') ? properties.preventFocusStyleForTouchAndClick : config.preventFocusStyleForTouchAndClick;\n\n this.setState({\n childProps: sanitizeChildProps(properties)\n });\n removeStyle(this.styleId);\n updatePseudoClassStyle(this.styleId, properties, this.preventFocusStyleForTouchAndClick);\n }", "function getStyle(vnode, checkChild) {\n var res = {};\n var styleData;\n\n if (checkChild) {\n var childNode = vnode;\n while (childNode.componentInstance) {\n childNode = childNode.componentInstance._vnode;\n if (childNode.data && (styleData = normalizeStyleData(childNode.data))) {\n extend(res, styleData);\n }\n }\n }\n\n if (styleData = normalizeStyleData(vnode.data)) {\n extend(res, styleData);\n }\n\n var parentNode = vnode;\n while (parentNode = parentNode.parent) {\n if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\n extend(res, styleData);\n }\n }\n return res;\n }", "function addStyle(Component){for(var _len2=arguments.length,styleVariant=Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++){styleVariant[_key2-1]=arguments[_key2];}bsStyles(styleVariant,Component);}", "static get styles() {\n return [\n css`\n :host {\n display: block;\n min-width: 112px;\n min-height: 112px;\n transition: 0.6s all ease;\n background-color: transparent;\n }\n #replacementcontent {\n visibility: visible;\n opacity: 1;\n }\n :host([loading]) {\n text-align: center;\n }\n :host([loading]) #replacementcontent {\n opacity: 0;\n visibility: hidden;\n }\n `\n ];\n }", "function getStyle(vnode, checkChild) {\n var res = {};\n var styleData;\n\n if (checkChild) {\n var childNode = vnode;\n while (childNode.componentInstance) {\n childNode = childNode.componentInstance._vnode;\n if (\n childNode && childNode.data &&\n (styleData = normalizeStyleData(childNode.data))\n ) {\n extend(res, styleData);\n }\n }\n }\n\n if ((styleData = normalizeStyleData(vnode.data))) {\n extend(res, styleData);\n }\n\n var parentNode = vnode;\n while ((parentNode = parentNode.parent)) {\n if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\n extend(res, styleData);\n }\n }\n return res\n }", "function updateParent(e) {\n var context = e.context;\n self.updateParent(context.shape || context.connection, context.oldParent);\n }", "shouldComponentUpdate(){\n if(this.props.debug)console.log(\"Child - shouldComponentUpdate\");\n return false; // this ensures parent render wont render this component\n }", "render() {\n // eslint-disable-next-line no-unused-vars\n let baseStyle = {};\n // eslint-disable-next-line no-unused-vars\n let layoutFlowStyle = {};\n \n \n return (\n <div className=\"Headerstacks\" style={baseStyle}>\n <div className=\"compContent\">\n <div className='hasNestedComps elHeader'>\n <Header appActions={this.props.appActions} deviceInfo={this.props.deviceInfo} locStrings={this.props.locStrings} />\n </div>\n <div className='hasNestedComps elKeystackslogo'>\n <Keystackslogo appActions={this.props.appActions} deviceInfo={this.props.deviceInfo} locStrings={this.props.locStrings} />\n </div>\n </div>\n </div>\n )\n }", "renderState0() {\n // eslint-disable-next-line no-unused-vars\n let baseStyle = {};\n // eslint-disable-next-line no-unused-vars\n let layoutFlowStyle = {};\n \n const style_state0_elEmpathyicon = {\n backgroundImage: 'url('+img_state0_elEmpathyicon+')',\n backgroundSize: '100% 100%',\n };\n \n return (\n <div className=\"Empathy\" style={baseStyle}>\n <div className=\"foreground\">\n <div className='state0_elEmpathyicon' style={style_state0_elEmpathyicon} />\n </div>\n </div>\n )\n }", "initialize(){super.initialize();this.renderRoot=this.createRenderRoot();// Note, if renderRoot is not a shadowRoot, styles would/could apply to the\n// element's getRootNode(). While this could be done, we're choosing not to\n// support this now since it would require different logic around de-duping.\nif(window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot){this.adoptStyles()}}", "function useStyleApplicator(ref) {\n /* must pass in React.useRef object */\n const setStyles = (style) => {\n Object.keys(style).forEach((key) => {\n if (ref.current) ref.current.style[key] = style[key]\n })\n }\n return setStyles\n}", "function getStyle (vnode, checkChild) {\n var res = {};\n var styleData;\n\n if (checkChild) {\n var childNode = vnode;\n while (childNode.componentInstance) {\n childNode = childNode.componentInstance._vnode;\n if (\n childNode && childNode.data &&\n (styleData = normalizeStyleData(childNode.data))\n ) {\n extend(res, styleData);\n }\n }\n }\n\n if ((styleData = normalizeStyleData(vnode.data))) {\n extend(res, styleData);\n }\n\n var parentNode = vnode;\n while ((parentNode = parentNode.parent)) {\n if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\n extend(res, styleData);\n }\n }\n return res\n }", "function getStyle (vnode, checkChild) {\n var res = {};\n var styleData;\n\n if (checkChild) {\n var childNode = vnode;\n while (childNode.componentInstance) {\n childNode = childNode.componentInstance._vnode;\n if (\n childNode && childNode.data &&\n (styleData = normalizeStyleData(childNode.data))\n ) {\n extend(res, styleData);\n }\n }\n }\n\n if ((styleData = normalizeStyleData(vnode.data))) {\n extend(res, styleData);\n }\n\n var parentNode = vnode;\n while ((parentNode = parentNode.parent)) {\n if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\n extend(res, styleData);\n }\n }\n return res\n }", "function getStyle (vnode, checkChild) {\n var res = {};\n var styleData;\n\n if (checkChild) {\n var childNode = vnode;\n while (childNode.componentInstance) {\n childNode = childNode.componentInstance._vnode;\n if (\n childNode && childNode.data &&\n (styleData = normalizeStyleData(childNode.data))\n ) {\n extend(res, styleData);\n }\n }\n }\n\n if ((styleData = normalizeStyleData(vnode.data))) {\n extend(res, styleData);\n }\n\n var parentNode = vnode;\n while ((parentNode = parentNode.parent)) {\n if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\n extend(res, styleData);\n }\n }\n return res\n }", "function getStyle (vnode, checkChild) {\n var res = {};\n var styleData;\n\n if (checkChild) {\n var childNode = vnode;\n while (childNode.componentInstance) {\n childNode = childNode.componentInstance._vnode;\n if (\n childNode && childNode.data &&\n (styleData = normalizeStyleData(childNode.data))\n ) {\n extend(res, styleData);\n }\n }\n }\n\n if ((styleData = normalizeStyleData(vnode.data))) {\n extend(res, styleData);\n }\n\n var parentNode = vnode;\n while ((parentNode = parentNode.parent)) {\n if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\n extend(res, styleData);\n }\n }\n return res\n }", "function inherit(parent, child) {\n const obj = Object.create(child.prototype)\n child.prototype = Object.assign({}, parent.prototype, obj)\n parent.constructor = child\n}", "function getStyle(vnode, checkChild) {\n var res = {};\n var styleData;\n\n if (checkChild) {\n var childNode = vnode;\n\n while (childNode.componentInstance) {\n childNode = childNode.componentInstance._vnode;\n\n if (childNode && childNode.data && (styleData = normalizeStyleData(childNode.data))) {\n extend(res, styleData);\n }\n }\n }\n\n if (styleData = normalizeStyleData(vnode.data)) {\n extend(res, styleData);\n }\n\n var parentNode = vnode;\n\n while (parentNode = parentNode.parent) {\n if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\n extend(res, styleData);\n }\n }\n\n return res;\n }", "constructor(props){\n super(props);\n this.state = {\n\n };\n this.style={\n selfCom_Setting_: {\n width: '100%',\n height: '100%',\n position: 'absolute',\n top: '0%',\n left: '0%'\n },\n selfCom_Setting_email_: {\n width: '70%',\n height: '24%',\n position: 'absolute',\n top: '25%',\n left: '6%',\n boxSizing: 'border-box',\n },\n selfCom_Setting_pass: {\n position: 'absolute',\n top: '69%',\n left: '76%',\n boxSizing: 'border-box',\n }\n }\n }", "render() {\n //There are three styles of setting styles. One is inline with double curly braces and another is putting\n //the style in a variable with curly braces and then using the the variable in style = {varName}\n //The last one is that with the function which can have different style for different conditions\n\n //To create custom functions for event, if you're using the normal function you'll need to bind the this to \n //the function because since the function is not part of the component class it can't access the this\n\n const { title, id } = this.props.todo;\n\n return (\n <div style={this.getStyle()} > \n <p>\n <input type=\"checkbox\" onChange={ this.props.markComplete.bind(this, id) }/> {' '}\n { title }\n <button onClick={ this.props.delTodo.bind(this, id) } style ={btnStyle}>x</button>\n </p>\n </div>\n );\n }", "render() {\n return (\n <div>\n <p>子组件</p>\n <GrandSon />\n </div>\n )\n }", "function getStyle (vnode, checkChild) {\n\t var res = {};\n\t var styleData;\n\t\n\t if (checkChild) {\n\t var childNode = vnode;\n\t while (childNode.componentInstance) {\n\t childNode = childNode.componentInstance._vnode;\n\t if (childNode.data && (styleData = normalizeStyleData(childNode.data))) {\n\t extend(res, styleData);\n\t }\n\t }\n\t }\n\t\n\t if ((styleData = normalizeStyleData(vnode.data))) {\n\t extend(res, styleData);\n\t }\n\t\n\t var parentNode = vnode;\n\t while ((parentNode = parentNode.parent)) {\n\t if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\n\t extend(res, styleData);\n\t }\n\t }\n\t return res\n\t}", "function getStyle (vnode, checkChild) {\n\t var res = {};\n\t var styleData;\n\t\n\t if (checkChild) {\n\t var childNode = vnode;\n\t while (childNode.componentInstance) {\n\t childNode = childNode.componentInstance._vnode;\n\t if (childNode.data && (styleData = normalizeStyleData(childNode.data))) {\n\t extend(res, styleData);\n\t }\n\t }\n\t }\n\t\n\t if ((styleData = normalizeStyleData(vnode.data))) {\n\t extend(res, styleData);\n\t }\n\t\n\t var parentNode = vnode;\n\t while ((parentNode = parentNode.parent)) {\n\t if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\n\t extend(res, styleData);\n\t }\n\t }\n\t return res\n\t}", "function getStyle (vnode, checkChild) {\n\t var res = {};\n\t var styleData;\n\t\n\t if (checkChild) {\n\t var childNode = vnode;\n\t while (childNode.componentInstance) {\n\t childNode = childNode.componentInstance._vnode;\n\t if (childNode.data && (styleData = normalizeStyleData(childNode.data))) {\n\t extend(res, styleData);\n\t }\n\t }\n\t }\n\t\n\t if ((styleData = normalizeStyleData(vnode.data))) {\n\t extend(res, styleData);\n\t }\n\t\n\t var parentNode = vnode;\n\t while ((parentNode = parentNode.parent)) {\n\t if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\n\t extend(res, styleData);\n\t }\n\t }\n\t return res\n\t}", "function getStyle (vnode, checkChild) {\n\t var res = {};\n\t var styleData;\n\t\n\t if (checkChild) {\n\t var childNode = vnode;\n\t while (childNode.componentInstance) {\n\t childNode = childNode.componentInstance._vnode;\n\t if (childNode.data && (styleData = normalizeStyleData(childNode.data))) {\n\t extend(res, styleData);\n\t }\n\t }\n\t }\n\t\n\t if ((styleData = normalizeStyleData(vnode.data))) {\n\t extend(res, styleData);\n\t }\n\t\n\t var parentNode = vnode;\n\t while ((parentNode = parentNode.parent)) {\n\t if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\n\t extend(res, styleData);\n\t }\n\t }\n\t return res\n\t}", "constructor() {\n const {\n defaultStyle,\n globalStyle,\n fontStyle,\n formStyle,\n buttonStyle\n } = { ...getInitialStyles };\n\n this.initialStyles = {\n ...defaultStyle,\n ...globalStyle,\n ...fontStyle,\n ...formStyle,\n ...buttonStyle\n };\n }", "render() {\n // eslint-disable-next-line no-unused-vars\n let baseStyle = {};\n // eslint-disable-next-line no-unused-vars\n let layoutFlowStyle = {};\n \n const style_mask = {\n backgroundImage: 'url('+img_elMask+')',\n backgroundSize: '100% 100%',\n pointerEvents: 'none',\n };\n const style_oval = {\n backgroundImage: 'url('+img_elOval+')',\n backgroundSize: '100% 100%',\n pointerEvents: 'none',\n };\n const style_plus = {\n backgroundImage: 'url('+img_elPlus+')',\n backgroundSize: '100% 100%',\n pointerEvents: 'none',\n };\n \n return (\n <div className=\"Buttonnewkey\" style={baseStyle}>\n <div className=\"compContent\">\n <div className='elMask' style={style_mask} />\n <div className='elOval' style={style_oval} />\n <div className='elPlus' style={style_plus} />\n </div>\n </div>\n )\n }", "getStyle() {\n const DEFAULTS = RectObject.defaultProps.style;\n return Object.assign({}, DEFAULTS, this.props.style || {});\n }", "function getStyle (vnode, checkChild) {\r\n var res = {};\r\n var styleData;\r\n\r\n if (checkChild) {\r\n var childNode = vnode;\r\n while (childNode.componentInstance) {\r\n childNode = childNode.componentInstance._vnode;\r\n if (\r\n childNode && childNode.data &&\r\n (styleData = normalizeStyleData(childNode.data))\r\n ) {\r\n extend(res, styleData);\r\n }\r\n }\r\n }\r\n\r\n if ((styleData = normalizeStyleData(vnode.data))) {\r\n extend(res, styleData);\r\n }\r\n\r\n var parentNode = vnode;\r\n while ((parentNode = parentNode.parent)) {\r\n if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\r\n extend(res, styleData);\r\n }\r\n }\r\n return res\r\n}", "function apply_class_to_parent() {\n\tapex.jQuery(\"span[parent-class]\").each(\n\t\tfunction(){\n\t\t\tapex.jQuery(this).\n\t\t\t\tparent().attr( 'class', apex.jQuery(this).attr('parent-class'));\n }\n\t);\t\n\t\n\tapex.jQuery(\"a[parent-class]\").each(\n\t\tfunction(){\n\t\tapex.jQuery(this).\n\t\t\t\tparent().attr( 'class', apex.jQuery(this).attr('parent-class'));\n }\n\t);\t\n\t\n\t// no se utiliza \n\tapex.jQuery(\"span[parent-style]\").each(\n\t\tfunction(){\n\t\t\tapex.jQuery(this).\n\t\t\t\tparent().attr( 'style', apex.jQuery(this).attr('parent-style'));\n }\n\t);\t\n\n}", "resolveStyles(props = {}) {\n const styles = {\n animationDuration: props.duration,\n borderColor: props.secondaryColor,\n borderTopColor: props.color,\n borderWidth: props.borderWidth,\n height: props.size,\n width: props.size,\n }\n const overrides = props.style || {}\n\n return {...styles, ...overrides}\n }", "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n }", "function Row({ children, component: Component, styles, ...other }: Props) {\n const styleName: string = getClassNames(other);\n let { start, center, end, top, middle, bottom, around, between, first, last, ...rest } = other;\n\n return (\n <div styleName={styleName} {...rest}>\n {children}\n </div>\n );\n}", "render() {\n\n return (\n <div className=\"wrapperContent\" style={ { padding:\"16px 16px\" }}>\n { this.props.children }\n </div>\n );\n }", "UNSAFE_componentWillReceiveProps(parentProps) {\n if (this.state.visible !== parentProps.visible) {\n this.setState({\n visible: parentProps.visible,\n dataset: parentProps.dataset\n });\n }\n }", "function getStyle (vnode, checkChild) {\n\t var res = {};\n\t var styleData;\n\t\n\t if (checkChild) {\n\t var childNode = vnode;\n\t while (childNode.componentInstance) {\n\t childNode = childNode.componentInstance._vnode;\n\t if (\n\t childNode && childNode.data &&\n\t (styleData = normalizeStyleData(childNode.data))\n\t ) {\n\t extend(res, styleData);\n\t }\n\t }\n\t }\n\t\n\t if ((styleData = normalizeStyleData(vnode.data))) {\n\t extend(res, styleData);\n\t }\n\t\n\t var parentNode = vnode;\n\t while ((parentNode = parentNode.parent)) {\n\t if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\n\t extend(res, styleData);\n\t }\n\t }\n\t return res\n\t}", "render(){\n return(\n <div className={styles.container}>\n {this.props.children}\n </div>\n )\n }", "function getStyle (vnode, checkChild) {\n var res = {};\n var styleData;\n\n if (checkChild) {\n var childNode = vnode;\n while (childNode.componentInstance) {\n childNode = childNode.componentInstance._vnode;\n if (childNode.data && (styleData = normalizeStyleData(childNode.data))) {\n extend(res, styleData);\n }\n }\n }\n\n if ((styleData = normalizeStyleData(vnode.data))) {\n extend(res, styleData);\n }\n\n var parentNode = vnode;\n while ((parentNode = parentNode.parent)) {\n if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\n extend(res, styleData);\n }\n }\n return res\n}", "function getStyle (vnode, checkChild) {\n var res = {};\n var styleData;\n\n if (checkChild) {\n var childNode = vnode;\n while (childNode.componentInstance) {\n childNode = childNode.componentInstance._vnode;\n if (childNode.data && (styleData = normalizeStyleData(childNode.data))) {\n extend(res, styleData);\n }\n }\n }\n\n if ((styleData = normalizeStyleData(vnode.data))) {\n extend(res, styleData);\n }\n\n var parentNode = vnode;\n while ((parentNode = parentNode.parent)) {\n if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\n extend(res, styleData);\n }\n }\n return res\n}", "function getStyle (vnode, checkChild) {\n var res = {};\n var styleData;\n\n if (checkChild) {\n var childNode = vnode;\n while (childNode.componentInstance) {\n childNode = childNode.componentInstance._vnode;\n if (childNode.data && (styleData = normalizeStyleData(childNode.data))) {\n extend(res, styleData);\n }\n }\n }\n\n if ((styleData = normalizeStyleData(vnode.data))) {\n extend(res, styleData);\n }\n\n var parentNode = vnode;\n while ((parentNode = parentNode.parent)) {\n if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\n extend(res, styleData);\n }\n }\n return res\n}", "function getStyle (vnode, checkChild) {\n var res = {};\n var styleData;\n\n if (checkChild) {\n var childNode = vnode;\n while (childNode.componentInstance) {\n childNode = childNode.componentInstance._vnode;\n if (childNode.data && (styleData = normalizeStyleData(childNode.data))) {\n extend(res, styleData);\n }\n }\n }\n\n if ((styleData = normalizeStyleData(vnode.data))) {\n extend(res, styleData);\n }\n\n var parentNode = vnode;\n while ((parentNode = parentNode.parent)) {\n if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\n extend(res, styleData);\n }\n }\n return res\n}", "function getStyle (vnode, checkChild) {\n var res = {};\n var styleData;\n\n if (checkChild) {\n var childNode = vnode;\n while (childNode.componentInstance) {\n childNode = childNode.componentInstance._vnode;\n if (childNode.data && (styleData = normalizeStyleData(childNode.data))) {\n extend(res, styleData);\n }\n }\n }\n\n if ((styleData = normalizeStyleData(vnode.data))) {\n extend(res, styleData);\n }\n\n var parentNode = vnode;\n while ((parentNode = parentNode.parent)) {\n if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\n extend(res, styleData);\n }\n }\n return res\n}", "function getStyle (vnode, checkChild) {\n var res = {};\n var styleData;\n\n if (checkChild) {\n var childNode = vnode;\n while (childNode.componentInstance) {\n childNode = childNode.componentInstance._vnode;\n if (childNode.data && (styleData = normalizeStyleData(childNode.data))) {\n extend(res, styleData);\n }\n }\n }\n\n if ((styleData = normalizeStyleData(vnode.data))) {\n extend(res, styleData);\n }\n\n var parentNode = vnode;\n while ((parentNode = parentNode.parent)) {\n if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\n extend(res, styleData);\n }\n }\n return res\n}", "function getStyle (vnode, checkChild) {\n var res = {};\n var styleData;\n\n if (checkChild) {\n var childNode = vnode;\n while (childNode.componentInstance) {\n childNode = childNode.componentInstance._vnode;\n if (childNode.data && (styleData = normalizeStyleData(childNode.data))) {\n extend(res, styleData);\n }\n }\n }\n\n if ((styleData = normalizeStyleData(vnode.data))) {\n extend(res, styleData);\n }\n\n var parentNode = vnode;\n while ((parentNode = parentNode.parent)) {\n if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\n extend(res, styleData);\n }\n }\n return res\n}", "function getStyle (vnode, checkChild) {\n var res = {};\n var styleData;\n\n if (checkChild) {\n var childNode = vnode;\n while (childNode.componentInstance) {\n childNode = childNode.componentInstance._vnode;\n if (childNode.data && (styleData = normalizeStyleData(childNode.data))) {\n extend(res, styleData);\n }\n }\n }\n\n if ((styleData = normalizeStyleData(vnode.data))) {\n extend(res, styleData);\n }\n\n var parentNode = vnode;\n while ((parentNode = parentNode.parent)) {\n if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\n extend(res, styleData);\n }\n }\n return res\n}" ]
[ "0.65146637", "0.6496358", "0.61068493", "0.6060124", "0.58075565", "0.55838454", "0.5581019", "0.5567864", "0.5567864", "0.5567864", "0.55646735", "0.55375344", "0.55291593", "0.55291593", "0.5525414", "0.5505463", "0.5496729", "0.54747343", "0.546608", "0.5452551", "0.5391955", "0.53919244", "0.5391106", "0.53908163", "0.5388789", "0.5353977", "0.531318", "0.53024715", "0.5300495", "0.5293462", "0.5292877", "0.5278352", "0.5259789", "0.52455264", "0.52334213", "0.52238905", "0.520973", "0.5206492", "0.5193718", "0.5185263", "0.5178449", "0.5174067", "0.51732486", "0.51731074", "0.51701653", "0.5165466", "0.5163442", "0.51425594", "0.51284415", "0.5122732", "0.5122732", "0.51201075", "0.51201075", "0.51173276", "0.51131666", "0.51056045", "0.5104527", "0.509864", "0.5096171", "0.50947577", "0.50896955", "0.50891906", "0.50878656", "0.50831574", "0.50829995", "0.5078131", "0.50775373", "0.5075644", "0.5074719", "0.5074719", "0.5074719", "0.5074719", "0.5073589", "0.50730085", "0.5068167", "0.5067775", "0.5067769", "0.50667435", "0.50667435", "0.50667435", "0.50667435", "0.50665426", "0.5066052", "0.50653636", "0.5059734", "0.50586694", "0.50574046", "0.5055652", "0.5054738", "0.50504905", "0.5049051", "0.5048503", "0.5044245", "0.5041675", "0.5041675", "0.5041675", "0.5041675", "0.5041675", "0.5041675", "0.5041675", "0.5041675" ]
0.0
-1
Add class with compatibility for SVG since classList is not supported on SVG elements in IE
function addClass (el, cls) { /* istanbul ignore if */ if (!cls || !(cls = cls.trim())) { return } /* istanbul ignore else */ if (el.classList) { if (cls.indexOf(' ') > -1) { cls.split(whitespaceRE).forEach(function (c) { return el.classList.add(c); }); } else { el.classList.add(cls); } } else { var cur = " " + (el.getAttribute('class') || '') + " "; if (cur.indexOf(' ' + cls + ' ') < 0) { el.setAttribute('class', (cur + cls).trim()); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hackSVG() {\n\tif (SVGElement && SVGElement.prototype) {\n\n\t\tSVGElement.prototype.hasClass = function(className) {\n\t\t\treturn new RegExp('(\\\\s|^)' + className + '(\\\\s|$)').test(this\n\t\t\t\t\t.getAttribute('class'));\n\t\t};\n\n\t\tSVGElement.prototype.addClass = function(className) {\n\t\t\tif (!this.hasClass(className)) {\n\t\t\t\tthis.setAttribute('class', this.getAttribute('class') + ' '\n\t\t\t\t\t\t+ className);\n\t\t\t}\n\t\t};\n\n\t\tSVGElement.prototype.removeClass = function(className) {\n\t\t\tvar removedClass = this.getAttribute('class').replace(\n\t\t\t\t\tnew RegExp('(\\\\s|^)' + className + '(\\\\s|$)', 'g'), '$2');\n\t\t\tif (this.hasClass(className)) {\n\t\t\t\tthis.setAttribute('class', removedClass);\n\t\t\t}\n\t\t};\n\t\tSVGElement.prototype.toggleClass = function(className) {\n\t\t\tif (this.hasClass(className)) {\n\t\t\t\tthis.removeClass(className);\n\t\t\t} else {\n\t\t\t\tthis.addClass(className);\n\t\t\t}\n\t\t};\n\n\t}\n}", "function applyClass(svg, klass) {\n if (!klass) {\n return svg;\n }\n\n // now we have 2 problems...\n return svg.replace('<svg', '<svg class=\"' + klass + '\"');\n }", "function patchClass(el, value, isSVG) {\r\n if (value == null) {\r\n value = '';\r\n }\r\n if (isSVG) {\r\n el.setAttribute('class', value);\r\n }\r\n else {\r\n // directly setting className should be faster than setAttribute in theory\r\n // if this is an element during a transition, take the temporary transition\r\n // classes into account.\r\n const transitionClasses = el._vtc;\r\n if (transitionClasses) {\r\n value = (value\r\n ? [value, ...transitionClasses]\r\n : [...transitionClasses]).join(' ');\r\n }\r\n el.className = value;\r\n }\r\n}", "function patchClass(el, value, isSVG) {\r\n if (value == null) {\r\n value = '';\r\n }\r\n if (isSVG) {\r\n el.setAttribute('class', value);\r\n }\r\n else {\r\n // directly setting className should be faster than setAttribute in theory\r\n // if this is an element during a transition, take the temporary transition\r\n // classes into account.\r\n const transitionClasses = el._vtc;\r\n if (transitionClasses) {\r\n value = (value\r\n ? [value, ...transitionClasses]\r\n : [...transitionClasses]).join(' ');\r\n }\r\n el.className = value;\r\n }\r\n}", "function patchClass(el, value, isSVG) {\n if (value == null) {\n value = '';\n }\n if (isSVG) {\n el.setAttribute('class', value);\n }\n else {\n // directly setting className should be faster than setAttribute in theory\n // if this is an element during a transition, take the temporary transition\n // classes into account.\n const transitionClasses = el._vtc;\n if (transitionClasses) {\n value = (value\n ? [value, ...transitionClasses]\n : [...transitionClasses]).join(' ');\n }\n el.className = value;\n }\n}", "function patchClass(el, value, isSVG) {\n if (value == null) {\n value = '';\n }\n if (isSVG) {\n el.setAttribute('class', value);\n }\n else {\n // directly setting className should be faster than setAttribute in theory\n // if this is an element during a transition, take the temporary transition\n // classes into account.\n const transitionClasses = el._vtc;\n if (transitionClasses) {\n value = (value\n ? [value, ...transitionClasses]\n : [...transitionClasses]).join(' ');\n }\n el.className = value;\n }\n}", "function patchClass(el, value, isSVG) {\n if (value == null) {\n value = '';\n }\n\n if (isSVG) {\n el.setAttribute('class', value);\n } else {\n // directly setting className should be faster than setAttribute in theory\n // if this is an element during a transition, take the temporary transition\n // classes into account.\n const transitionClasses = el._vtc;\n\n if (transitionClasses) {\n value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(' ');\n }\n\n el.className = value;\n }\n}", "function patchClass(el, value, isSVG) {\n if (value == null) {\n value = '';\n }\n if (isSVG) {\n el.setAttribute('class', value);\n }\n else {\n // directly setting className should be faster than setAttribute in theory\n // if this is an element during a transition, take the temporary transition\n // classes into account.\n var transitionClasses = el._vtc;\n if (transitionClasses) {\n value = (value\n ? [value ].concat( transitionClasses)\n : [].concat( transitionClasses )).join(' ');\n }\n el.className = value;\n }\n }", "function patchClass(el, value, isSVG) {\n if (value == null) {\n value = '';\n }\n if (isSVG) {\n el.setAttribute('class', value);\n }\n else {\n // directly setting className should be faster than setAttribute in theory\n // if this is an element during a transition, take the temporary transition\n // classes into account.\n var transitionClasses = el._vtc;\n if (transitionClasses) {\n value = (value\n ? [value ].concat( transitionClasses)\n : [].concat( transitionClasses )).join(' ');\n }\n el.className = value;\n }\n }", "function svgChangeClass() {\n for (c of classes) {\n if (classesSelection.value == c) { \n classIcon.setAttribute(\"src\", `./img/classes/${c}.svg`);\n }\n }\n }", "function patchClass(el, value, isSVG) {\n // directly setting className should be faster than setAttribute in theory\n // if this is an element during a transition, take the temporary transition\n // classes into account.\n const transitionClasses = el._vtc;\n if (transitionClasses) value = (value ? [\n value,\n ...transitionClasses\n ] : [\n ...transitionClasses\n ]).join(' ');\n if (value == null) el.removeAttribute('class');\n else if (isSVG) el.setAttribute('class', value);\n else el.className = value;\n}", "function patchClass(el, value, isSVG) {\n // directly setting className should be faster than setAttribute in theory\n // if this is an element during a transition, take the temporary transition\n // classes into account.\n const transitionClasses = el._vtc;\n if (transitionClasses) {\n value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(' ');\n }\n if (value == null) {\n el.removeAttribute('class');\n }\n else if (isSVG) {\n el.setAttribute('class', value);\n }\n else {\n el.className = value;\n }\n}", "function patchClass(el, value, isSVG) {\n // directly setting className should be faster than setAttribute in theory\n // if this is an element during a transition, take the temporary transition\n // classes into account.\n const transitionClasses = el._vtc;\n if (transitionClasses) {\n value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(' ');\n }\n if (value == null) {\n el.removeAttribute('class');\n }\n else if (isSVG) {\n el.setAttribute('class', value);\n }\n else {\n el.className = value;\n }\n}", "function patchClass(el, value, isSVG) {\n // directly setting className should be faster than setAttribute in theory\n // if this is an element during a transition, take the temporary transition\n // classes into account.\n const transitionClasses = el._vtc;\n if (transitionClasses) {\n value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(' ');\n }\n if (value == null) {\n el.removeAttribute('class');\n }\n else if (isSVG) {\n el.setAttribute('class', value);\n }\n else {\n el.className = value;\n }\n}", "function patchClass(el, value, isSVG) {\n // directly setting className should be faster than setAttribute in theory\n // if this is an element during a transition, take the temporary transition\n // classes into account.\n const transitionClasses = el._vtc;\n if (transitionClasses) {\n value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(' ');\n }\n if (value == null) {\n el.removeAttribute('class');\n }\n else if (isSVG) {\n el.setAttribute('class', value);\n }\n else {\n el.className = value;\n }\n}", "function patchClass(el, value, isSVG) {\n // directly setting className should be faster than setAttribute in theory\n // if this is an element during a transition, take the temporary transition\n // classes into account.\n const transitionClasses = el._vtc;\n if (transitionClasses) {\n value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(' ');\n }\n if (value == null) {\n el.removeAttribute('class');\n }\n else if (isSVG) {\n el.setAttribute('class', value);\n }\n else {\n el.className = value;\n }\n}", "function patchClass(el, value, isSVG) {\n // directly setting className should be faster than setAttribute in theory\n // if this is an element during a transition, take the temporary transition\n // classes into account.\n const transitionClasses = el._vtc;\n if (transitionClasses) {\n value = (value\n ? [value, ...transitionClasses]\n : [...transitionClasses]).join(' ');\n }\n if (value == null) {\n el.removeAttribute('class');\n }\n else if (isSVG) {\n el.setAttribute('class', value);\n }\n else {\n el.className = value;\n }\n}", "function patchClass(el, value, isSVG) {\r\n // directly setting className should be faster than setAttribute in theory\r\n // if this is an element during a transition, take the temporary transition\r\n // classes into account.\r\n const transitionClasses = el._vtc;\r\n if (transitionClasses) {\r\n value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(' ');\r\n }\r\n if (value == null) {\r\n el.removeAttribute('class');\r\n }\r\n else if (isSVG) {\r\n el.setAttribute('class', value);\r\n }\r\n else {\r\n el.className = value;\r\n }\r\n}", "onClassChange() {\n for ( let i = 0; i < this.node.pdomClasses.length; i++ ) {\n const dataObject = this.node.pdomClasses[ i ];\n this.setClassToElement( dataObject.className, dataObject.options );\n }\n }", "function setClass(el, name) {\n if (el.className.baseVal === undefined) {\n el.className = name;\n } else {\n // in case of SVG element\n el.className.baseVal = name;\n }\n } // @function getClass(el: HTMLElement): String", "function svg(id = null, classList) {\n let svg = document.createElementNS(Svg.svgNS, \"svg\");\n if (id != null)\n svg.id = id;\n if (classList != undefined) {\n svg.classList.add(...classList);\n }\n return svg;\n }", "function svgchange(){\n var element = document.getElementById(\"svg-div\");\n element.classList.toggle(\"svgclass\");\n}", "function SVGElement() {}", "function SVGElement() {}", "function SVGElement() {}", "function SVGElement() {}", "function SVGElement() {}", "function SVGElement() {}", "function className(node, value) {\n\t var klass = node.className || '',\n\t svg = klass && klass.baseVal !== undefined;\n\n\t if (value === undefined) return svg ? klass.baseVal : klass;\n\t svg ? klass.baseVal = value : node.className = value;\n\t }", "function addClass(el,cls){/* istanbul ignore if */if(!cls||!(cls=cls.trim())){return;}/* istanbul ignore else */if(el.classList){if(cls.indexOf(' ')>-1){cls.split(/\\s+/).forEach(function(c){return el.classList.add(c);});}else{el.classList.add(cls);}}else{var cur=\" \"+(el.getAttribute('class')||'')+\" \";if(cur.indexOf(' '+cls+' ')<0){el.setAttribute('class',(cur+cls).trim());}}}", "function addClass(el,cls){/* istanbul ignore if */if(!cls||!(cls=cls.trim())){return;}/* istanbul ignore else */if(el.classList){if(cls.indexOf(' ')>-1){cls.split(/\\s+/).forEach(function(c){return el.classList.add(c);});}else{el.classList.add(cls);}}else{var cur=\" \"+(el.getAttribute('class')||'')+\" \";if(cur.indexOf(' '+cls+' ')<0){el.setAttribute('class',(cur+cls).trim());}}}", "function addClass(el,cls){/* istanbul ignore if */if(!cls||!cls.trim()){return;}/* istanbul ignore else */if(el.classList){if(cls.indexOf(' ')>-1){cls.split(/\\s+/).forEach(function(c){return el.classList.add(c);});}else{el.classList.add(cls);}}else{var cur=' '+el.getAttribute('class')+' ';if(cur.indexOf(' '+cls+' ')<0){el.setAttribute('class',(cur+cls).trim());}}}", "function exAddClass(node, name) {\n var list = node.classList;\n var parts = name.split(/\\s+/);\n for (var i = 0, n = parts.length; i < n; ++i) {\n if (parts[i])\n list.add(parts[i]);\n }\n}", "function element_setClass(e, cls, onoff) {\n var s = e.getAttribute(\"class\");\n if (!s) s = \"\";\n if (s.length == 0) {\n if (onoff) e.setAttribute(\"class\",cls);\n else e.setAttribute(\"class\",\"\");\n } else {\n var classes = s.split(/\\s+/);\n var hascls = false;\n var rcls = [];\n for (var i in classes) {\n if (cls == classes[i]) { hascls = true }\n else { rcls[rcls.length] = classes[i]; }\n }\n\n if (onoff) { rcls[rcls.length] = cls }\n\n e.setAttribute(\"class\",rcls.join(\" \"));\n }\n}", "function className(node, value){\r\n var klass = node.className || '',\r\n svg = klass && klass.baseVal !== undefined\r\n\r\n if (value === undefined) return svg ? klass.baseVal : klass\r\n svg ? (klass.baseVal = value) : (node.className = value)\r\n }", "function className(node, value){\r\n var klass = node.className || '',\r\n svg = klass && klass.baseVal !== undefined\r\n\r\n if (value === undefined) return svg ? klass.baseVal : klass\r\n svg ? (klass.baseVal = value) : (node.className = value)\r\n }", "function SVGElement(type, options) {\n this.create = function(type) {\n this.elem = document.createElementNS('http://www.w3.org/2000/svg', type);\n };\n this.get = function(key) {\n return this.elem.getAttributeNS(null, key);\n };\n this.set = function(key, val) {\n this.elem.setAttributeNS(null, key, val);\n };\n this.setBulk = function(options) {\n for (let key in options) {\n if (options.hasOwnProperty(key)) {\n this.set(key, options[key]);\n }\n }\n };\n this.addClass = function(cls) {\n this.elem.classList.add(cls);\n };\n this.removeClass = function(cls) {\n this.elem.classList.remove(cls);\n };\n this.addEventListener = function(type, func) {\n this.elem.addEventListener(type, func);\n };\n this.removeEventListener = function(type, func) {\n this.elem.removeEventListener(type, func);\n };\n this.appendChild = function(child) {\n this.elem.appendChild(child);\n };\n this.removeChild = function(child) {\n this.elem.removeChild(child);\n };\n this.element = function() {\n return this.elem;\n };\n\n this.create(type);\n if (options !== null) {\n this.setBulk(options);\n }\n}", "function className(node, value){\r\n var klass = node.className || '',\r\n svg = klass && klass.baseVal !== undefined\r\n\r\n if (value === undefined) return svg ? klass.baseVal : klass\r\n svg ? (klass.baseVal = value) : (node.className = value)\r\n }", "function addC(item, className) { item.classList.add(className) }", "function addC(item, className) { item.classList.add(className) }", "function setElementClass() {\n for (var i=0; i<setElementClass.arguments.length; i+=2) {\n\t\tif (isIE) { \n\t\t\teval('document.all.' + setElementClass.arguments[i] + '.className = \"' + setElementClass.arguments[i+1] + '\"'); \n\t\t} else if (isDOM) {\n\t\t\teval('document.getElementById(\\'' + setElementClass.arguments[i] + '\\').className = \"' + setElementClass.arguments[i+1] + '\"'); \n\t\t}\n\t}\n}", "function className(node, value) {\n var klass = node.className || '',\n svg = klass && klass.baseVal !== undefined;\n\n if (value === undefined) return svg ? klass.baseVal : klass;\n svg ? (klass.baseVal = value) : (node.className = value);\n }", "function className(node, value){\n var klass = node.className || '',\n svg = klass && klass.baseVal !== undefined\n\n if (value === undefined) return svg ? klass.baseVal : klass\n svg ? (klass.baseVal = value) : (node.className = value)\n }", "function className(node, value){\n var klass = node.className || '',\n svg = klass && klass.baseVal !== undefined\n\n if (value === undefined) return svg ? klass.baseVal : klass\n svg ? (klass.baseVal = value) : (node.className = value)\n }", "function className(node, value){\n var klass = node.className || '',\n svg = klass && klass.baseVal !== undefined\n\n if (value === undefined) return svg ? klass.baseVal : klass\n svg ? (klass.baseVal = value) : (node.className = value)\n }", "function className(node, value){\n var klass = node.className || '',\n svg = klass && klass.baseVal !== undefined\n\n if (value === undefined) return svg ? klass.baseVal : klass\n svg ? (klass.baseVal = value) : (node.className = value)\n }", "function className(node, value){\n var klass = node.className || '',\n svg = klass && klass.baseVal !== undefined\n\n if (value === undefined) return svg ? klass.baseVal : klass\n svg ? (klass.baseVal = value) : (node.className = value)\n }", "function className(node, value){\n var klass = node.className || '',\n svg = klass && klass.baseVal !== undefined\n\n if (value === undefined) return svg ? klass.baseVal : klass\n svg ? (klass.baseVal = value) : (node.className = value)\n }", "function className(node, value){\n var klass = node.className || '',\n svg = klass && klass.baseVal !== undefined\n\n if (value === undefined) return svg ? klass.baseVal : klass\n svg ? (klass.baseVal = value) : (node.className = value)\n }", "function className(node, value){\n var klass = node.className || '',\n svg = klass && klass.baseVal !== undefined\n\n if (value === undefined) return svg ? klass.baseVal : klass\n svg ? (klass.baseVal = value) : (node.className = value)\n }", "function className(node, value){\n var klass = node.className || '',\n svg = klass && klass.baseVal !== undefined\n\n if (value === undefined) return svg ? klass.baseVal : klass\n svg ? (klass.baseVal = value) : (node.className = value)\n }", "function className(node, value){\n var klass = node.className || '',\n svg = klass && klass.baseVal !== undefined\n\n if (value === undefined) return svg ? klass.baseVal : klass\n svg ? (klass.baseVal = value) : (node.className = value)\n }", "function className(node, value){\n var klass = node.className || '',\n svg = klass && klass.baseVal !== undefined\n\n if (value === undefined) return svg ? klass.baseVal : klass\n svg ? (klass.baseVal = value) : (node.className = value)\n }", "function className(node, value){\n var klass = node.className || '',\n svg = klass && klass.baseVal !== undefined\n\n if (value === undefined) return svg ? klass.baseVal : klass\n svg ? (klass.baseVal = value) : (node.className = value)\n }", "function className(node, value){\n var klass = node.className || '',\n svg = klass && klass.baseVal !== undefined\n\n if (value === undefined) return svg ? klass.baseVal : klass\n svg ? (klass.baseVal = value) : (node.className = value)\n }", "function className(node, value){\n var klass = node.className || '',\n svg = klass && klass.baseVal !== undefined\n\n if (value === undefined) return svg ? klass.baseVal : klass\n svg ? (klass.baseVal = value) : (node.className = value)\n }", "function addClassToElementByClassName(obj) {\n\n var newClass = obj.class;\n for (var index = 0; index < obj.classnames.length; index++) {\n\n classname = obj.classnames[index];\n\n var e = document.getElementsByClassName(classname);\n\n for (var i = 0; i < e.length; i++) {\n\n e[i].classList.add(newClass);\n }\n }\n}", "setClass(el, classname) {\n el.className += ' ' + classname;\n }", "function className(node, value) {\n var klass = node.className,\n svg = klass && klass.baseVal !== undefined;\n\n if (value === undefined) return svg ? klass.baseVal : klass;\n svg ? klass.baseVal = value : node.className = value;\n }", "_setClassNames() {\n const classNames = ['osjs-window', ...this.attributes.classNames];\n if (this.id) {\n classNames.push(`Window_${this.id}`);\n }\n\n classNames.filter(val => !!val)\n .forEach((val) => this.$element.classList.add(val));\n }", "function xphasclass($s) {\n return strcat(\"//*[contains(concat(' ',@class,' '),' \",$s,\" ')]\");\n}", "function className( node, value ) {\n var klass = node.className || '',\n svg = klass && klass.baseVal !== undefined\n\n if ( value === undefined ) return svg ? klass.baseVal : klass\n svg ? (klass.baseVal = value) : (node.className = value)\n }", "ReplaceClass(node, className) {\n node.className = className;\n }", "function xAddClass(e, c) {\r\n e = xGetElementById(e);\r\n if (!e)\r\n return false;\r\n if (!xHasClass(e, c))\r\n e.className += ' '+c;\r\n return true;\r\n}", "get classes() {\n const result = {};\n const element = this.nativeElement;\n // SVG elements return an `SVGAnimatedString` instead of a plain string for the `className`.\n const className = element.className;\n const classes = typeof className !== 'string' ? className.baseVal.split(' ') : className.split(' ');\n classes.forEach((value) => result[value] = true);\n return result;\n }", "function xAddClass(e, c)\n{\n if ((e=xGetElementById(e))!=null) {\n var s = '';\n if (e.className.length && e.className.charAt(e.className.length - 1) != ' ') {\n s = ' ';\n }\n if (!xHasClass(e, c)) {\n e.className += s + c;\n return true;\n }\n }\n return false;\n}", "function className(node, value) {\n var klass = node.className || '',\n svg = klass && klass.baseVal !== undefined\n\n if (value === undefined) return svg ? klass.baseVal : klass\n svg ? (klass.baseVal = value) : (node.className = value)\n }", "function className(node, value){\n var klass = node.className,\n svg = klass && klass.baseVal !== undefined\n\n if (value === undefined) return svg ? klass.baseVal : klass\n svg ? (klass.baseVal = value) : (node.className = value)\n }", "function className(node, value){\n var klass = node.className,\n svg = klass && klass.baseVal !== undefined\n\n if (value === undefined) return svg ? klass.baseVal : klass\n svg ? (klass.baseVal = value) : (node.className = value)\n }", "function className(node, value){\n var klass = node.className,\n svg = klass && klass.baseVal !== undefined\n\n if (value === undefined) return svg ? klass.baseVal : klass\n svg ? (klass.baseVal = value) : (node.className = value)\n }", "function className(node, value){\n var klass = node.className,\n svg = klass && klass.baseVal !== undefined\n\n if (value === undefined) return svg ? klass.baseVal : klass\n svg ? (klass.baseVal = value) : (node.className = value)\n }", "function setClass(_native8,className,add,renderer,store,playerBuilder){if(store||playerBuilder){if(store){store.setValue(className,add);}if(playerBuilder){playerBuilder.setValue(className,add);}}else if(add){ngDevMode&&ngDevMode.rendererAddClass++;isProceduralRenderer(renderer)?renderer.addClass(_native8,className):_native8['classList'].add(className);}else{ngDevMode&&ngDevMode.rendererRemoveClass++;isProceduralRenderer(renderer)?renderer.removeClass(_native8,className):_native8['classList'].remove(className);}}", "function addClass(el){\r\n\tel.classList.add(\"opaque\");\r\n\r\n}", "function addClass(element, cls) {\n element.classList.add(cls);\n}", "function setClass(node, index, newClass){\n let newClasses = [];\n let classList = node.classList;\n for(let i = 2; i >= 0; i--){\n newClasses.unshift(node.classList[i]);\n classList.remove(classList[i]);\n }\n\n newClasses[index] = newClass;\n\n for(let i = 0; i < 3; i++){\n classList.add(newClasses[i]);\n }\n\n}", "function createClassAttribute(vnode) {\n const {\n elm,\n data: {\n classMap\n },\n owner: {\n renderer\n }\n } = vnode;\n\n if (isUndefined$3(classMap)) {\n return;\n }\n\n const classList = renderer.getClassList(elm);\n\n for (const name in classMap) {\n classList.add(name);\n }\n }", "function Vc(a,b){var c=a.getAttribute(\"class\")||\"\";-1==(\" \"+c+\" \").indexOf(\" \"+b+\" \")&&(c&&(c+=\" \"),a.setAttribute(\"class\",c+b))}", "function addNewClass(elementName, newClass) {\n const element = document.querySelectorAll(elementName)\n\n element.forEach(el => {\n el.classList.add(newClass)\n })\n}", "function legacyAppendClass() {\n if (!transitionSupport) return;\n\n var basicClassName = Object(__WEBPACK_IMPORTED_MODULE_12__util__[\"d\" /* getTransitionName */])(transitionName, '' + eventType);\n if (basicClassName) nodeClasses.add(basicClassName);\n\n if (eventActive) {\n var activeClassName = Object(__WEBPACK_IMPORTED_MODULE_12__util__[\"d\" /* getTransitionName */])(transitionName, eventType + '-active');\n if (activeClassName) nodeClasses.add(activeClassName);\n }\n }", "function legacyAppendClass() {\n if (!transitionSupport) return;\n\n var basicClassName = Object(__WEBPACK_IMPORTED_MODULE_10__util__[\"d\" /* getTransitionName */])(transitionName, '' + eventType);\n if (basicClassName) nodeClasses.add(basicClassName);\n\n if (eventActive) {\n var activeClassName = Object(__WEBPACK_IMPORTED_MODULE_10__util__[\"d\" /* getTransitionName */])(transitionName, eventType + '-active');\n if (activeClassName) nodeClasses.add(activeClassName);\n }\n }", "function SVGWrapper(svg, container) {\r\n\tthis._svg = svg; // The SVG root node\r\n\tthis._container = container; // The containing div\r\n\tfor (var i = 0; i < jQuery.svg._extensions.length; i++) {\r\n\t var extension = jQuery.svg._extensions[i];\r\n\t this[extension[0]] = new extension[1](this);\r\n\t}\r\n }", "function SVGWrapper(svg, container) {\n\tthis._svg = svg; // The SVG root node\n\tthis._container = container; // The containing div\n\tfor (var i = 0; i < $.svg._extensions.length; i++) {\n\t\tvar extension = $.svg._extensions[i];\n\t\tthis[extension[0]] = new extension[1](this);\n\t}\n}", "add_class(e, c)\n\t{\n\t\te && c && e.classList.add(c);\n\t}", "function adicionaClasseDeErro(elemento){\r\n elemento.classList.add('vazio')\r\n}", "function AddClass(ele, classStr) {\r\n //w[i].className\r\n ele.className = ele.className.replaceAll(\" \" + classStr, \"\") + \" \" + classStr; //function (replaceThis, withThis)\r\n //console.log(ele);\r\n}", "function legacyAppendClass() {\n if (!transitionSupport) return;\n\n var basicClassName = Object(_util__WEBPACK_IMPORTED_MODULE_12__[\"getTransitionName\"])(transitionName, '' + eventType);\n if (basicClassName) nodeClasses.add(basicClassName);\n\n if (eventActive) {\n var activeClassName = Object(_util__WEBPACK_IMPORTED_MODULE_12__[\"getTransitionName\"])(transitionName, eventType + '-active');\n if (activeClassName) nodeClasses.add(activeClassName);\n }\n }", "function legacyAppendClass() {\n if (!transitionSupport) return;\n\n var basicClassName = Object(_util__WEBPACK_IMPORTED_MODULE_12__[\"getTransitionName\"])(transitionName, '' + eventType);\n if (basicClassName) nodeClasses.add(basicClassName);\n\n if (eventActive) {\n var activeClassName = Object(_util__WEBPACK_IMPORTED_MODULE_12__[\"getTransitionName\"])(transitionName, eventType + '-active');\n if (activeClassName) nodeClasses.add(activeClassName);\n }\n }", "showClasses(classElements) {\n const props = this.props\n classElements.forEach(item => {\n props.classListElement.appendChild(item)\n })\n }", "function createClassAttribute$1(vnode) {\n const {\n elm,\n data: {\n classMap\n }\n } = vnode;\n\n if (isUndefined$3(classMap)) {\n return;\n }\n\n const {\n classList\n } = elm;\n\n for (const name in classMap) {\n classList.add(name);\n }\n }", "function addMyClass(param, classToAdd) {\r\n //if it has the class\r\n if (param.classList.contains(classToAdd)) {\r\n param.classList.remove(classToAdd);\r\n } else {\r\n //if it doesnt have the class add it\r\n var classString = param.className; // returns the string of all the classes for element\r\n var newClass = classString.concat(\" \" + classToAdd);\r\n param.className = newClass;\r\n }\r\n}", "function getElementClass(){if(typeof HTMLElement!=='function'){// case of Safari\nvar _BaseElement=function _BaseElement(){};_BaseElement.prototype=document.createElement('div');return _BaseElement;}else{return HTMLElement;}}", "function addClassByTag(tag, className) {\n filterNodesByTag(tag).forEach(node => {\n node.classList.add(className);\n })\n}", "addClasses(){\n\t\tif(!this.visible) return;\n\t\t\n\t\tif(this.classes){\n\t\t\tthis.appliedClasses = this.classes;\n\t\t\tthis.element.classList.add(...this.appliedClasses);\n\t\t}\n\t}", "createElement(tag, classes = null) {\n let element = document.createElement(tag)\n if(classes instanceof Array){\n for (const clas of classes) {\n element.classList.add(clas)\n }\n }\n else{\n element.classList.add(classes)\n }\n return element\n }", "function addGreen(className) {\n if(className === 'why-android-wrapper') {\n document.getElementsByClassName(className)[0].children[0].style.cssText = 'color: #6ab344;';\n document.getElementsByClassName(className)[0].children[1].style.cssText = 'fill: #6ab344;';\n } else {\n document.getElementsByClassName(className)[0].children[0].children[0].style.cssText = 'fill: #6ab344;';\n document.getElementsByClassName(className)[0].children[1].style.cssText = 'color: #6ab344;';\n }\n}", "function _addClassesOption(options, classes) {classes.forEach(function(cls){_addClassOption(options, cls)})}", "function translateToCssClass(scope,element){element.addClass(className);}", "function createClassAttribute(vnode) {\n const {\n elm,\n data: {\n classMap\n }\n } = vnode;\n\n if (isUndefined(classMap)) {\n return;\n }\n\n const {\n classList\n } = elm;\n\n for (const name in classMap) {\n classList.add(name);\n }\n }", "function setClass(node, name, value) {\n if (value) {\n return node.className = Array.isArray(value) ? value.split(' ') : value;\n } else {\n return node.removeAttribute('class');\n };\n}", "function addClasses$613(element$616, frame$617) {\n element$616.classList.add('frame');\n if (frame$617.disposal == 2)\n element$616.classList.add('disposal-restore');\n}", "function __attachClass($dom, $className) {\r\n var clsName = $dom.getAttribute(\"className\");\r\n if (clsName.indexOf($className)==-1) {\r\n $dom.setAttribute(\"className\", __trim(clsName + \" \" + $className));\r\n\r\n }\r\n}" ]
[ "0.7646955", "0.7538302", "0.715277", "0.715277", "0.7131344", "0.7131344", "0.71100616", "0.71061164", "0.71061164", "0.70534873", "0.7012893", "0.6931945", "0.6931945", "0.6931945", "0.6931945", "0.6931945", "0.6927917", "0.6918403", "0.6347607", "0.62825215", "0.6246344", "0.6235068", "0.61794484", "0.61794484", "0.61794484", "0.61794484", "0.61794484", "0.61794484", "0.6165344", "0.6142014", "0.6142014", "0.6121351", "0.6092742", "0.6074437", "0.60642326", "0.60642326", "0.6060182", "0.603443", "0.6005103", "0.6005103", "0.60042095", "0.5988409", "0.5985256", "0.5985256", "0.5985256", "0.5985256", "0.5985256", "0.5985256", "0.5985256", "0.5985256", "0.5985256", "0.5985256", "0.5985256", "0.5985256", "0.5985256", "0.5985256", "0.5970619", "0.59679854", "0.5953532", "0.5948774", "0.5938643", "0.59331286", "0.5927193", "0.5900683", "0.58947617", "0.58831406", "0.58728766", "0.58606666", "0.58606666", "0.58606666", "0.58606666", "0.5838789", "0.58267504", "0.5826385", "0.5817439", "0.5806404", "0.5805458", "0.5791416", "0.578713", "0.57821995", "0.5767673", "0.576342", "0.57557136", "0.57539046", "0.57466006", "0.5744461", "0.5744461", "0.57213277", "0.57172304", "0.5715966", "0.57076854", "0.56907004", "0.56886846", "0.56877047", "0.56867003", "0.5681618", "0.5679826", "0.56780267", "0.56656355", "0.566007", "0.565294" ]
0.0
-1
Remove class with compatibility for SVG since classList is not supported on SVG elements in IE
function removeClass (el, cls) { /* istanbul ignore if */ if (!cls || !(cls = cls.trim())) { return } /* istanbul ignore else */ if (el.classList) { if (cls.indexOf(' ') > -1) { cls.split(whitespaceRE).forEach(function (c) { return el.classList.remove(c); }); } else { el.classList.remove(cls); } if (!el.classList.length) { el.removeAttribute('class'); } } else { var cur = " " + (el.getAttribute('class') || '') + " "; var tar = ' ' + cls + ' '; while (cur.indexOf(tar) >= 0) { cur = cur.replace(tar, ' '); } cur = cur.trim(); if (cur) { el.setAttribute('class', cur); } else { el.removeAttribute('class'); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hackSVG() {\n\tif (SVGElement && SVGElement.prototype) {\n\n\t\tSVGElement.prototype.hasClass = function(className) {\n\t\t\treturn new RegExp('(\\\\s|^)' + className + '(\\\\s|$)').test(this\n\t\t\t\t\t.getAttribute('class'));\n\t\t};\n\n\t\tSVGElement.prototype.addClass = function(className) {\n\t\t\tif (!this.hasClass(className)) {\n\t\t\t\tthis.setAttribute('class', this.getAttribute('class') + ' '\n\t\t\t\t\t\t+ className);\n\t\t\t}\n\t\t};\n\n\t\tSVGElement.prototype.removeClass = function(className) {\n\t\t\tvar removedClass = this.getAttribute('class').replace(\n\t\t\t\t\tnew RegExp('(\\\\s|^)' + className + '(\\\\s|$)', 'g'), '$2');\n\t\t\tif (this.hasClass(className)) {\n\t\t\t\tthis.setAttribute('class', removedClass);\n\t\t\t}\n\t\t};\n\t\tSVGElement.prototype.toggleClass = function(className) {\n\t\t\tif (this.hasClass(className)) {\n\t\t\t\tthis.removeClass(className);\n\t\t\t} else {\n\t\t\t\tthis.addClass(className);\n\t\t\t}\n\t\t};\n\n\t}\n}", "function applyClass(svg, klass) {\n if (!klass) {\n return svg;\n }\n\n // now we have 2 problems...\n return svg.replace('<svg', '<svg class=\"' + klass + '\"');\n }", "function removeUnusedClasses(element) {\n\n element.classList.contains('old-out') ? element.classList.remove('old-out') : null;\n element.classList.contains('old-in') ? element.classList.remove('old-in') : null;\n element.classList.contains('new-out') ? element.classList.remove('new-out') : null;\n element.classList.contains('new-in') ? element.classList.remove('new-in') : null;\n}", "function clearSelectedState() {\n var selected = svgDoc.getElementsByClassName('selected');\n if (selected.length > 0) {\n var className = selected[0].getAttribute('class').replace('selected','').trim();\n selected[0].setAttribute('class', className);\n }\n }", "function removeAnimClasses(elem) {\n var cn = elem.className;\n var ac = [\" toLeft\",\" toRight\",\" fromLeft\",\" fromRight\"]; //Animation classes\n for (var i=0;i<ac.length;i++) {\n while (cn.indexOf(ac[i])>=0) {\n cn = cn.replace(ac[i],\"\");\n }\n }\n elem.className=cn;\n}", "function clearDarkenenedState() {\n var selected = svgDoc.getElementsByClassName('bordered');\n if (selected.length > 0) {\n var className = selected[0].getAttribute('class').replace('bordered','').trim();\n selected[0].setAttribute('class', className);\n }\n }", "function patchClass(el, value, isSVG) {\n // directly setting className should be faster than setAttribute in theory\n // if this is an element during a transition, take the temporary transition\n // classes into account.\n const transitionClasses = el._vtc;\n if (transitionClasses) value = (value ? [\n value,\n ...transitionClasses\n ] : [\n ...transitionClasses\n ]).join(' ');\n if (value == null) el.removeAttribute('class');\n else if (isSVG) el.setAttribute('class', value);\n else el.className = value;\n}", "function circle_animated() {\n // console.log(\"Worked\");\n circle.removeAttribute('class');\n path.removeAttribute('class');\n }", "function svgChangeClass() {\n for (c of classes) {\n if (classesSelection.value == c) { \n classIcon.setAttribute(\"src\", `./img/classes/${c}.svg`);\n }\n }\n }", "function rmvClass(el, cl) {\r\n el.classList.remove(cl)\r\n}", "function patchClass(el, value, isSVG) {\r\n // directly setting className should be faster than setAttribute in theory\r\n // if this is an element during a transition, take the temporary transition\r\n // classes into account.\r\n const transitionClasses = el._vtc;\r\n if (transitionClasses) {\r\n value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(' ');\r\n }\r\n if (value == null) {\r\n el.removeAttribute('class');\r\n }\r\n else if (isSVG) {\r\n el.setAttribute('class', value);\r\n }\r\n else {\r\n el.className = value;\r\n }\r\n}", "function patchClass(el, value, isSVG) {\n // directly setting className should be faster than setAttribute in theory\n // if this is an element during a transition, take the temporary transition\n // classes into account.\n const transitionClasses = el._vtc;\n if (transitionClasses) {\n value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(' ');\n }\n if (value == null) {\n el.removeAttribute('class');\n }\n else if (isSVG) {\n el.setAttribute('class', value);\n }\n else {\n el.className = value;\n }\n}", "function patchClass(el, value, isSVG) {\n // directly setting className should be faster than setAttribute in theory\n // if this is an element during a transition, take the temporary transition\n // classes into account.\n const transitionClasses = el._vtc;\n if (transitionClasses) {\n value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(' ');\n }\n if (value == null) {\n el.removeAttribute('class');\n }\n else if (isSVG) {\n el.setAttribute('class', value);\n }\n else {\n el.className = value;\n }\n}", "function patchClass(el, value, isSVG) {\n // directly setting className should be faster than setAttribute in theory\n // if this is an element during a transition, take the temporary transition\n // classes into account.\n const transitionClasses = el._vtc;\n if (transitionClasses) {\n value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(' ');\n }\n if (value == null) {\n el.removeAttribute('class');\n }\n else if (isSVG) {\n el.setAttribute('class', value);\n }\n else {\n el.className = value;\n }\n}", "function patchClass(el, value, isSVG) {\n // directly setting className should be faster than setAttribute in theory\n // if this is an element during a transition, take the temporary transition\n // classes into account.\n const transitionClasses = el._vtc;\n if (transitionClasses) {\n value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(' ');\n }\n if (value == null) {\n el.removeAttribute('class');\n }\n else if (isSVG) {\n el.setAttribute('class', value);\n }\n else {\n el.className = value;\n }\n}", "function patchClass(el, value, isSVG) {\n // directly setting className should be faster than setAttribute in theory\n // if this is an element during a transition, take the temporary transition\n // classes into account.\n const transitionClasses = el._vtc;\n if (transitionClasses) {\n value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(' ');\n }\n if (value == null) {\n el.removeAttribute('class');\n }\n else if (isSVG) {\n el.setAttribute('class', value);\n }\n else {\n el.className = value;\n }\n}", "function patchClass(el, value, isSVG) {\n // directly setting className should be faster than setAttribute in theory\n // if this is an element during a transition, take the temporary transition\n // classes into account.\n const transitionClasses = el._vtc;\n if (transitionClasses) {\n value = (value\n ? [value, ...transitionClasses]\n : [...transitionClasses]).join(' ');\n }\n if (value == null) {\n el.removeAttribute('class');\n }\n else if (isSVG) {\n el.setAttribute('class', value);\n }\n else {\n el.className = value;\n }\n}", "function removeImgClasses() {\n\t\tvar classes = $( '#img' ).attr( 'class' ).split( /\\s+/);\n\t\t$.each( classes, function( index, item ) {\n\t\t if ( item.indexOf( 'filter' ) !== -1 || item.indexOf( 'pb' ) !== -1 ) {\n\t\t $( '#img' ).removeClass( item );\n\t\t }\n\t\t});\n\t}", "function patchClass(el, value, isSVG) {\n if (value == null) {\n value = '';\n }\n if (isSVG) {\n el.setAttribute('class', value);\n }\n else {\n // directly setting className should be faster than setAttribute in theory\n // if this is an element during a transition, take the temporary transition\n // classes into account.\n const transitionClasses = el._vtc;\n if (transitionClasses) {\n value = (value\n ? [value, ...transitionClasses]\n : [...transitionClasses]).join(' ');\n }\n el.className = value;\n }\n}", "function patchClass(el, value, isSVG) {\n if (value == null) {\n value = '';\n }\n if (isSVG) {\n el.setAttribute('class', value);\n }\n else {\n // directly setting className should be faster than setAttribute in theory\n // if this is an element during a transition, take the temporary transition\n // classes into account.\n const transitionClasses = el._vtc;\n if (transitionClasses) {\n value = (value\n ? [value, ...transitionClasses]\n : [...transitionClasses]).join(' ');\n }\n el.className = value;\n }\n}", "function patchClass(el, value, isSVG) {\n if (value == null) {\n value = '';\n }\n if (isSVG) {\n el.setAttribute('class', value);\n }\n else {\n // directly setting className should be faster than setAttribute in theory\n // if this is an element during a transition, take the temporary transition\n // classes into account.\n var transitionClasses = el._vtc;\n if (transitionClasses) {\n value = (value\n ? [value ].concat( transitionClasses)\n : [].concat( transitionClasses )).join(' ');\n }\n el.className = value;\n }\n }", "function patchClass(el, value, isSVG) {\n if (value == null) {\n value = '';\n }\n if (isSVG) {\n el.setAttribute('class', value);\n }\n else {\n // directly setting className should be faster than setAttribute in theory\n // if this is an element during a transition, take the temporary transition\n // classes into account.\n var transitionClasses = el._vtc;\n if (transitionClasses) {\n value = (value\n ? [value ].concat( transitionClasses)\n : [].concat( transitionClasses )).join(' ');\n }\n el.className = value;\n }\n }", "function patchClass(el, value, isSVG) {\r\n if (value == null) {\r\n value = '';\r\n }\r\n if (isSVG) {\r\n el.setAttribute('class', value);\r\n }\r\n else {\r\n // directly setting className should be faster than setAttribute in theory\r\n // if this is an element during a transition, take the temporary transition\r\n // classes into account.\r\n const transitionClasses = el._vtc;\r\n if (transitionClasses) {\r\n value = (value\r\n ? [value, ...transitionClasses]\r\n : [...transitionClasses]).join(' ');\r\n }\r\n el.className = value;\r\n }\r\n}", "function patchClass(el, value, isSVG) {\r\n if (value == null) {\r\n value = '';\r\n }\r\n if (isSVG) {\r\n el.setAttribute('class', value);\r\n }\r\n else {\r\n // directly setting className should be faster than setAttribute in theory\r\n // if this is an element during a transition, take the temporary transition\r\n // classes into account.\r\n const transitionClasses = el._vtc;\r\n if (transitionClasses) {\r\n value = (value\r\n ? [value, ...transitionClasses]\r\n : [...transitionClasses]).join(' ');\r\n }\r\n el.className = value;\r\n }\r\n}", "_removeClasses(rawClassVal) {\n if (rawClassVal) {\n if (Array.isArray(rawClassVal) || rawClassVal instanceof Set) {\n rawClassVal.forEach(klass => this._toggleClass(klass, false));\n } else {\n Object.keys(rawClassVal).forEach(klass => this._toggleClass(klass, false));\n }\n }\n }", "function removeSelected() {\r\n arrayClass = [\r\n 'open', 'save', 'eraser', 'brush', 'line', 'curve', \r\n 'letterL', 'letterW', 'car', 'house', 'rectangle', \r\n 'circle', 'ellipse', 'hexagon', 'arrow', 'triangle', \r\n 'pentagon', 'diamond', 'fourStar', 'fiveStar'\r\n ]\r\n\r\n arrayClass.forEach(element => {\r\n let toolClass = document.getElementById(element)\r\n try {\r\n toolClass.classList.remove(\"selected\");\r\n } catch {\r\n }\r\n });\r\n}", "function patchClass(el, value, isSVG) {\n if (value == null) {\n value = '';\n }\n\n if (isSVG) {\n el.setAttribute('class', value);\n } else {\n // directly setting className should be faster than setAttribute in theory\n // if this is an element during a transition, take the temporary transition\n // classes into account.\n const transitionClasses = el._vtc;\n\n if (transitionClasses) {\n value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(' ');\n }\n\n el.className = value;\n }\n}", "function w3RemoveClass(element, name) {\r\n var i, arr1, arr2;\r\n arr1 = element.className.split(\" \");\r\n arr2 = name.split(\" \");\r\n for (i = 0; i < arr2.length; i++) {\r\n while (arr1.indexOf(arr2[i]) > -1) {\r\n arr1.splice(arr1.indexOf(arr2[i]), 1); \r\n }\r\n }\r\n element.className = arr1.join(\" \");\r\n}", "RemoveClass(node, classname) {\n node.className = node.className.replace(new RegExp(\"(\\\\b)\" + classname + \"(\\\\s|$)\", \"g\"), \" \").trim().replace(/[\\s]{2}/g, \" \");\n }", "function w3RemoveClass(element, name) {\r\n var i, arr1, arr2;\r\n arr1 = element.className.split(\" \");\r\n arr2 = name.split(\" \");\r\n for (i = 0; i < arr2.length; i++) {\r\n while (arr1.indexOf(arr2[i]) > -1) {\r\n arr1.splice(arr1.indexOf(arr2[i]), 1);\r\n }\r\n }\r\n element.className = arr1.join(\" \");\r\n}", "function w3RemoveClass(element, name) {\r\n var i, arr1, arr2;\r\n arr1 = element.className.split(\" \");\r\n arr2 = name.split(\" \");\r\n for (i = 0; i < arr2.length; i++) {\r\n while (arr1.indexOf(arr2[i]) > -1) {\r\n arr1.splice(arr1.indexOf(arr2[i]), 1);\r\n }\r\n }\r\n element.className = arr1.join(\" \");\r\n}", "function w3RemoveClass(element, name) {\r\n var i, arr1, arr2;\r\n arr1 = element.className.split(\" \");\r\n arr2 = name.split(\" \");\r\n for (i = 0; i < arr2.length; i++) {\r\n while (arr1.indexOf(arr2[i]) > -1) {\r\n arr1.splice(arr1.indexOf(arr2[i]), 1);\r\n }\r\n }\r\n element.className = arr1.join(\" \");\r\n}", "function removeClass(el,cls){/* istanbul ignore if */if(!cls||!cls.trim()){return;}/* istanbul ignore else */if(el.classList){if(cls.indexOf(' ')>-1){cls.split(/\\s+/).forEach(function(c){return el.classList.remove(c);});}else{el.classList.remove(cls);}}else{var cur=' '+el.getAttribute('class')+' ';var tar=' '+cls+' ';while(cur.indexOf(tar)>=0){cur=cur.replace(tar,' ');}el.setAttribute('class',cur.trim());}}", "function w3RemoveClass(element, name) {\r\n var i, arr1, arr2;\r\n arr1 = element.className.split(\" \");\r\n arr2 = name.split(\" \");\r\n for (i = 0; i < arr2.length; i++) {\r\n while (arr1.indexOf(arr2[i]) > -1) {\r\n arr1.splice(arr1.indexOf(arr2[i]), 1);\r\n }\r\n }\r\n element.className = arr1.join(\" \");\r\n}", "function clearHighlightedStates() {\n var highlightedStates = svgDoc.getElementsByClassName('highlighted'),\n lastElem,\n className;\n\n //Iterate in reverse because the array is a \"live nodeList\"\n while(highlightedStates.length > 0) {\n lastElem = highlightedStates[highlightedStates.length-1]; //get last item\n\n //Remove the 'highlighted' class from the element. \n //This will automatically update the nodeList's length too.\n className = lastElem.getAttribute('class').replace('highlighted','').trim();\n lastElem.setAttribute('class', className);\n }\n }", "function removeClassFromElementByClassName(obj) {\n\n var oldClass = obj.class;\n for (var index = 0; index < obj.classnames.length; index++) {\n\n classname = obj.classnames[index];\n\n var e = document.getElementsByClassName(classname);\n\n for (var i = 0; i < e.length; i++) {\n\n e[i].classList.remove(oldClass);\n }\n }\n}", "function w3RemoveClass(element, name) {\n var i, arr1, arr2;\n arr1 = element.className.split(\" \");\n arr2 = name.split(\" \");\n for (i = 0; i < arr2.length; i++) {\n while (arr1.indexOf(arr2[i]) > -1) {\n arr1.splice(arr1.indexOf(arr2[i]), 1); \n }\n }\n element.className = arr1.join(\" \");\n}", "function w3RemoveClass(element, name) {\n var i, arr1, arr2;\n arr1 = element.className.split(\" \");\n arr2 = name.split(\" \");\n for (i = 0; i < arr2.length; i++) {\n while (arr1.indexOf(arr2[i]) > -1) {\n arr1.splice(arr1.indexOf(arr2[i]), 1); \n }\n }\n element.className = arr1.join(\" \");\n}", "function w3RemoveClass(element, name) {\n var i, arr1, arr2;\n arr1 = element.className.split(\" \");\n arr2 = name.split(\" \");\n for (i = 0; i < arr2.length; i++) {\n while (arr1.indexOf(arr2[i]) > -1) {\n arr1.splice(arr1.indexOf(arr2[i]), 1); \n }\n }\n element.className = arr1.join(\" \");\n}", "function w3RemoveClass(element, name) {\n var i, arr1, arr2;\n arr1 = element.className.split(\" \");\n arr2 = name.split(\" \");\n for (i = 0; i < arr2.length; i++) {\n while (arr1.indexOf(arr2[i]) > -1) {\n arr1.splice(arr1.indexOf(arr2[i]), 1); \n }\n }\n element.className = arr1.join(\" \");\n}", "function w3RemoveClass(element, name) {\n var i, arr1, arr2;\n arr1 = element.className.split(\" \");\n arr2 = name.split(\" \");\n for (i = 0; i < arr2.length; i++) {\n while (arr1.indexOf(arr2[i]) > -1) {\n arr1.splice(arr1.indexOf(arr2[i]), 1); \n }\n }\n element.className = arr1.join(\" \");\n}", "function w3RemoveClass(element, name) {\n var i, arr1, arr2;\n arr1 = element.className.split(\" \");\n arr2 = name.split(\" \");\n for (i = 0; i < arr2.length; i++) {\n while (arr1.indexOf(arr2[i]) > -1) {\n arr1.splice(arr1.indexOf(arr2[i]), 1); \n }\n }\n element.className = arr1.join(\" \");\n}", "function removeSelectedNavClass(name){\n var el = document.getElementsByClassName(name);\n if (el.length < 1) return;\n for(var i=0; i<(el.length + 1); i++){\n el[i].classList.remove(name);\n }\n}", "function w3RemoveClass(element, name) {\n var i, arr1, arr2;\n arr1 = element.className.split(\" \");\n arr2 = name.split(\" \");\n for (i = 0; i < arr2.length; i++) {\n while (arr1.indexOf(arr2[i]) > -1) {\n arr1.splice(arr1.indexOf(arr2[i]), 1);\n }\n }\n element.className = arr1.join(\" \");\n}", "function w3RemoveClass(element, name) {\n var i, arr1, arr2;\n arr1 = element.className.split(\" \");\n arr2 = name.split(\" \");\n for (i = 0; i < arr2.length; i++) {\n while (arr1.indexOf(arr2[i]) > -1) {\n arr1.splice(arr1.indexOf(arr2[i]), 1);\n }\n }\n element.className = arr1.join(\" \");\n}", "function w3RemoveClass(element, name) {\n var i, arr1, arr2;\n arr1 = element.className.split(\" \");\n arr2 = name.split(\" \");\n for (i = 0; i < arr2.length; i++) {\n while (arr1.indexOf(arr2[i]) > -1) {\n arr1.splice(arr1.indexOf(arr2[i]), 1);\n }\n }\n element.className = arr1.join(\" \");\n}", "function w3RemoveClass(element, name) {\n var i, arr1, arr2;\n arr1 = element.className.split(\" \");\n arr2 = name.split(\" \");\n for (i = 0; i < arr2.length; i++) {\n while (arr1.indexOf(arr2[i]) > -1) {\n arr1.splice(arr1.indexOf(arr2[i]), 1);\n }\n }\n element.className = arr1.join(\" \");\n}", "function w3RemoveClass(element, name) {\n var i, arr1, arr2;\n arr1 = element.className.split(\" \");\n arr2 = name.split(\" \");\n for (i = 0; i < arr2.length; i++) {\n while (arr1.indexOf(arr2[i]) > -1) {\n arr1.splice(arr1.indexOf(arr2[i]), 1);\n }\n }\n element.className = arr1.join(\" \");\n}", "function w3RemoveClass(element, name) {\n var i, arr1, arr2;\n arr1 = element.className.split(\" \");\n arr2 = name.split(\" \");\n for (i = 0; i < arr2.length; i++) {\n while (arr1.indexOf(arr2[i]) > -1) {\n arr1.splice(arr1.indexOf(arr2[i]), 1);\n }\n }\n element.className = arr1.join(\" \");\n}", "function w3RemoveClass(element, name) {\n var i, arr1, arr2;\n arr1 = element.className.split(\" \");\n arr2 = name.split(\" \");\n for (i = 0; i < arr2.length; i++) {\n while (arr1.indexOf(arr2[i]) > -1) {\n arr1.splice(arr1.indexOf(arr2[i]), 1);\n }\n }\n element.className = arr1.join(\" \");\n}", "function w3RemoveClass(element, name) {\n var i, arr1, arr2;\n arr1 = element.className.split(\" \");\n arr2 = name.split(\" \");\n for (i = 0; i < arr2.length; i++) {\n while (arr1.indexOf(arr2[i]) > -1) {\n arr1.splice(arr1.indexOf(arr2[i]), 1);\n }\n }\n element.className = arr1.join(\" \");\n}", "function w3RemoveClass(element, name) {\n var i, arr1, arr2;\n arr1 = element.className.split(\" \");\n arr2 = name.split(\" \");\n for (i = 0; i < arr2.length; i++) {\n while (arr1.indexOf(arr2[i]) > -1) {\n arr1.splice(arr1.indexOf(arr2[i]), 1);\n }\n }\n element.className = arr1.join(\" \");\n}", "function svgchange(){\n var element = document.getElementById(\"svg-div\");\n element.classList.toggle(\"svgclass\");\n}", "function removeClass(el,cls){/* istanbul ignore if */if(!cls||!(cls=cls.trim())){return;}/* istanbul ignore else */if(el.classList){if(cls.indexOf(' ')>-1){cls.split(/\\s+/).forEach(function(c){return el.classList.remove(c);});}else{el.classList.remove(cls);}if(!el.classList.length){el.removeAttribute('class');}}else{var cur=\" \"+(el.getAttribute('class')||'')+\" \";var tar=' '+cls+' ';while(cur.indexOf(tar)>=0){cur=cur.replace(tar,' ');}cur=cur.trim();if(cur){el.setAttribute('class',cur);}else{el.removeAttribute('class');}}}", "function removeClass(el,cls){/* istanbul ignore if */if(!cls||!(cls=cls.trim())){return;}/* istanbul ignore else */if(el.classList){if(cls.indexOf(' ')>-1){cls.split(/\\s+/).forEach(function(c){return el.classList.remove(c);});}else{el.classList.remove(cls);}if(!el.classList.length){el.removeAttribute('class');}}else{var cur=\" \"+(el.getAttribute('class')||'')+\" \";var tar=' '+cls+' ';while(cur.indexOf(tar)>=0){cur=cur.replace(tar,' ');}cur=cur.trim();if(cur){el.setAttribute('class',cur);}else{el.removeAttribute('class');}}}", "function exRemClass(node, name) {\n var list = node.classList;\n var parts = name.split(/\\s+/);\n for (var i = 0, n = parts.length; i < n; ++i) {\n if (parts[i])\n list.remove(parts[i]);\n }\n}", "function removeClass(el){\r\n\tel.classList.remove(\"pats-silver\");\r\n}", "function removeSelectedClass(element)\n{\n element.className = prevElement.className.replace(selectedClass, '');\n element.className = prevElement.className.replace(selectedHoverClass, '');\n element.firstElementChild.className = prevElement.firstElementChild.className.replace(childSelectedClass, '');\n}", "function w3RemoveClass(element, name) {\n element.classList.remove(name);\n}", "function w3RemoveClass(element, name) {\n element.classList.remove(name);\n}", "unsetClass(el, classname) {\n el.className = el.className.replace(' ' + classname, '');\n }", "function RemoveColorFromClass (className){\n\n if (selectedClasses.includes(className)){\n // console.log(\"word is still locked, won't remove the color\", className);\n }\n else {\n // remove color from bars\n $(\".\" + className + '_bar')\n .css(\"fill\", colorForUnselected)\n .css(\"background\", 'transparent');\n\n // remove color from lines\n $(\".\" + className + '_line')\n .css(\"stroke\", colorForUnselected)\n .css(\"stroke-width\", \"0.2px\")\n .css(\"background\", 'transparent');\n\n // remove color from circles\n $(\".\" + className + '_circle')\n .css(\"fill\", colorForUnselected)\n .css(\"background\", 'transparent');\n\n\n // and transition back\n reduceSelectedCircle(className);\n }\n}", "_removeClass(className) {\n this.container.className = this.container.className.split(' ')\n .filter(c => c !== className)\n .join(' ');\n }", "_removeClasses(rawClassVal) {\n if (rawClassVal) {\n if (Array.isArray(rawClassVal) || rawClassVal instanceof Set) {\n rawClassVal.forEach((klass) => this._toggleClass(klass, false));\n }\n else {\n Object.keys(rawClassVal).forEach(klass => this._toggleClass(klass, false));\n }\n }\n }", "_removeClasses(rawClassVal) {\n if (rawClassVal) {\n if (Array.isArray(rawClassVal) || rawClassVal instanceof Set) {\n rawClassVal.forEach((klass) => this._toggleClass(klass, false));\n }\n else {\n Object.keys(rawClassVal).forEach(klass => this._toggleClass(klass, false));\n }\n }\n }", "_removeClasses(rawClassVal) {\n if (rawClassVal) {\n if (Array.isArray(rawClassVal) || rawClassVal instanceof Set) {\n rawClassVal.forEach((klass) => this._toggleClass(klass, false));\n }\n else {\n Object.keys(rawClassVal).forEach(klass => this._toggleClass(klass, false));\n }\n }\n }", "_removeClasses(rawClassVal) {\n if (rawClassVal) {\n if (Array.isArray(rawClassVal) || rawClassVal instanceof Set) {\n rawClassVal.forEach((klass) => this._toggleClass(klass, false));\n }\n else {\n Object.keys(rawClassVal).forEach(klass => this._toggleClass(klass, false));\n }\n }\n }", "_removeClasses(rawClassVal) {\n if (rawClassVal) {\n if (Array.isArray(rawClassVal) || rawClassVal instanceof Set) {\n rawClassVal.forEach((klass) => this._toggleClass(klass, false));\n }\n else {\n Object.keys(rawClassVal).forEach(klass => this._toggleClass(klass, false));\n }\n }\n }", "function remove() {\n 'use strict';\n ulelement.forEach(function (ulelement) {\n ulelement.classList.remove('activ');\n });\n}", "function _removeClasses($el, arr){\n for (var ix = 0; ix < arr.length; ix++)\n $el.removeClass(arr[ix])\n }", "rem_class(e, c)\n\t{\n\t\te && c && e.classList.remove(c);\n\t}", "function cleanBoard() {\r\n var elTds = document.querySelectorAll('.mark, .selected');\r\n for (var i = 0; i < elTds.length; i++) {\r\n elTds[i].classList.remove('mark', 'selected');\r\n }\r\n}", "function remove_class_all(class_name) {\n\n var elm_arr = document.getElementsByClassName(class_name);\n var i;\n elm_arr = [].slice.call(elm_arr);\n for (i = 0; i < elm_arr.length; i++) {\n remove_class(class_name,elm_arr[i].id)\n }\n}", "removeClass(clazz) {\n this.eachElem(item => item.classList.remove(clazz));\n return this;\n }", "removeClass(clazz) {\n this.eachElem(item => item.classList.remove(clazz));\n return this;\n }", "function removeClass(elementName, newClass) {\n const element = document.querySelectorAll(elementName)\n\n element.forEach(el => {\n el.classList.remove(newClass)\n })\n}", "function removeClasses(item) {\n item.classList.remove(\"filled\");\n item.classList.add(\"not-filled\");\n item.style.backgroundColor = \"#faf7f7\";\n if (grid == true) {\n item.style.outline = \"1px solid #e8e7e7\";\n }\n}", "function removeClass(element, cls) {\n element.classList.remove(cls);\n}", "function removeNewClassNameFromHTML () {\n\tvar class_name = $html.className.split ( ' ' ), //class_name splits $html class names at spaces\n\t\tlen = class_name.length, //len = Number of class names in array\n\t\tkept_classes = []; //kept_classes = Empty array\n\twhile (len--) {\n\t\tif (class_name[len] != 'new-class-name'){\n\t\t\tkept_classes.push (class_name[len]);\n\t\t}\n\t}\n\t$html.className = kept_classes.join ( ' ' );\n}", "function removeGreen (className) {\n if(className === 'why-android-wrapper') {\n document.getElementsByClassName(className)[0].children[0].style.cssText = '';\n document.getElementsByClassName(className)[0].children[1].style.cssText = '';\n } else {\n document.getElementsByClassName(className)[0].children[0].children[0].style.cssText = '';\n document.getElementsByClassName(className)[0].children[1].style.cssText = '';\n }\n}", "function _cleanupClasses(target) {\n\t for (var i = 0; i < this._dirtyClasses.length; i++) target.classList.remove(this._dirtyClasses[i]);\n\t this._dirtyClasses = [];\n\t }", "function normalizeClassName(element) {\n function removeEmptyClass(element){\n if (!element.className) {\n element.removeAttribute('class');\n }\n }\n function clear(element) {\n removeEmptyClass(element);\n Array.from(element.classList).forEach(c => {\n Array.from(element.querySelectorAll(`[class='${c}']`)).forEach(node =>{\n node.classList.remove(c)\n removeEmptyClass(node)\n });\n })\n }\n \n const elements = Array.from(element.querySelectorAll('span[class]')).concat(element);\n elements.forEach(child => clear(child));\n}", "function removeSelectedClass() {\n document.querySelectorAll(\".colorSelector\").forEach((element) => element.classList.remove(\"colorSelected\"));\n }", "function removeClass (element, class_name) {\n\tvar class_names = element.className.split ( ' ' ), //class_name splits $html class names at spaces\n\t\tlen = class_names.length, //len = Number of class names in array\n\t\tkept_classes = []; //kept_classes = Empty array\n\twhile (len--) {\n\t\tif (class_names[len] != class_name){\n\t\t\tkept_classes.push (class_name[len]);\n\t\t}\n\t}\n\telement.className = kept_classes.join ( ' ' );\n}", "function xRemoveClass(e, c) {\r\n e = xGetElementById(e);\r\n if (!e)\r\n return false;\r\n if (xHasClass(e, c))\r\n e.className = e.className.replace(new RegExp('(^| )'+c+'($| )','g'), '');\r\n return true;\r\n}", "function removeClass(element, deleteClass)\n {\n \tvar reg = new RegExp(\" \" + deleteClass,\"g\");\n \telement.className = element.className.replace(reg, '');\n }", "function removeClass(at, cls) {\n at.classList.remove(cls);\n}", "function removeClass(at, cls) {\n at.classList.remove(cls);\n}", "function markAllInactive(items, klass) {\n for (var i = 0; i < items.length; i++) {\n items[i].classList.remove(klass);\n }\n }", "function removeActive(){\nfor(var i=0;i<lgImg.length;i++){\nlgImg[i].classList.remove('active');\n}\n}", "function xhiRqst() {\r\n $('rqstinfo').classList.remove('inview');\r\n}", "function removeSelectedClass() {\n const countSelectClass = document.getElementsByClassName('selected');\n for (let index = 0; index < countSelectClass.length; index += 1) {\n countSelectClass[index].classList.remove('selected');\n }\n}", "function removeClasses() {\n for (let i=0; i<openCards.length; i++ ) {\n openCards[i][0].classList.remove(\"open\",\"show\");\n }\n openCards = [];\n }", "function removeClassJS (cssClass) {\n\n\tlet el = document.querySelectorAll (\"div\");\n\tel.forEach (function (element) {\n\t\telement.addEventListener (\"click\", function () {\n\t\t\tif (this.classList.contains (cssClass)) {\n\t\t\t\tthis.classList.remove (cssClass);\n\t\t\t\tconsole.log (\"Class name '\" + cssClass + \"' removed.\")\n\t\t\t}\n\t\t\telse console.log (\"Element doesn't have that class name\");\n\t\t});\n\t});\t\n}", "function nbRemoveCssClass(element, cssClass) {\n element.className = element.className.replace(cssClass, '').trim();\n}", "function _cleanupClasses(target) {\n for (var i = 0; i < this._dirtyClasses.length; i++) target.classList.remove(this._dirtyClasses[i]);\n this._dirtyClasses = [];\n }", "function xRemoveClass(e, c)\n{\n if(!(e=xGetElementById(e))) return false;\n e.className = e.className.replace(new RegExp(\"(^|\\\\s)\"+c+\"(\\\\s|$)\",'g'),\n function(str, p1, p2) { return (p1 == ' ' && p2 == ' ') ? ' ' : ''; }\n );\n return true;\n}", "function classRemover(){\r\n $(\"#snackNav\").removeClass();\r\n $(\"#drinkNav\").removeClass();\r\n $(\"#lunchNav\").removeClass();\r\n }", "function myRemoveClass(element, name) {\n var i, arr1, arr2;\n arr1 = element.className.split(\" \");\n arr2 = name.split(\" \");\n for (i = 0; i < arr2.length; i++) {\n while (arr1.indexOf(arr2[i]) > -1) {\n arr1.splice(arr1.indexOf(arr2[i]), 1); \n }\n }\n element.className = arr1.join(\" \");\n}", "function removeScale() {\n document.body.classList.remove(\"scale-cv\");\n}", "function remove (domNode, classes) {\n classes.split(' ').forEach(function (c) {\n var removedClass = domNode.getAttribute('class').replace(new RegExp('(\\\\s|^)' + c + '(\\\\s|$)', 'g'), '$2');\n if (has(domNode, c)) {\n domNode.setAttribute('class', removedClass);\n }\n });\n}" ]
[ "0.78212637", "0.70082444", "0.66950405", "0.6686834", "0.6601462", "0.6501605", "0.64928", "0.64598966", "0.6440813", "0.6439091", "0.6416516", "0.639915", "0.639915", "0.639915", "0.639915", "0.639915", "0.6377093", "0.6373922", "0.6355365", "0.6355365", "0.6350961", "0.6350961", "0.63466185", "0.63466185", "0.6345504", "0.6343537", "0.6339275", "0.6335884", "0.63319504", "0.6330235", "0.6330235", "0.6330235", "0.63268924", "0.6323309", "0.6308642", "0.6305765", "0.6298534", "0.6298534", "0.6298534", "0.6298534", "0.6298534", "0.6298534", "0.62907326", "0.62874544", "0.62874544", "0.62874544", "0.62874544", "0.62874544", "0.62874544", "0.62874544", "0.6282401", "0.6282401", "0.62818485", "0.62705606", "0.62705606", "0.62689614", "0.6266553", "0.6256534", "0.6249652", "0.6249652", "0.62456155", "0.6243309", "0.624252", "0.62307477", "0.62307477", "0.62307477", "0.62307477", "0.62307477", "0.6229585", "0.62150055", "0.6185795", "0.61802137", "0.6176817", "0.61748767", "0.61748767", "0.6170672", "0.61256987", "0.6124291", "0.6109534", "0.60950804", "0.60902977", "0.60756856", "0.60746616", "0.606641", "0.6066287", "0.605569", "0.60524714", "0.60524714", "0.6046097", "0.6032809", "0.60327566", "0.6031269", "0.60213584", "0.601842", "0.60131466", "0.59992784", "0.5993129", "0.5986713", "0.5977448", "0.59748065", "0.5964408" ]
0.0
-1
Old versions of Chromium (below 61.0.3163.100) formats floating pointer numbers in a localedependent way, using a comma instead of a dot. If comma is not replaced with a dot, the input will be rounded down (i.e. acting as a floor function) causing unexpected behaviors
function toMs (s) { return Number(s.slice(0, -1).replace(',', '.')) * 1000 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function floatFmt(value) { //# str(float)\r\n\tvar precision = 1; //#\r\n\tvar power = Math.pow(10, precision || 0); //#\r\n\treturn String(Math.round(value * power) / power); //#\r\n} //#", "function decimalComma2Dot(ivalue){\n return ivalue.replace(/^([^,]*),/, '$1.');\n}", "toFloat(value){\n return parseFloat(value.replace(/,/g, ''));\n }", "function commaFormat(value)\n\t\t\t{\n\t\t\t\tvar i = parseFloat(value);\n\t\t\t\tif(isNaN(i)) { i = 0.00; }\n\t\t\t\tvar minus = '';\n\t\t\t\tif(i < 0) { minus = '-'; }\n\t\t\t\ti = Math.abs(i);\n\t\t\t\ti = parseInt((i + .005) * 100);\n\t\t\t\ti = i / 100;\n\t\t\t\tvar s = new String(i);\n\t\t\t\tif(s.indexOf('.') < 0) { s += '.00'; }\n\t\t\t\tif(s.indexOf('.') == (s.length - 2)) { s += '0'; }\n\t\t\t\ts = minus + s;\n\t\t\t\tvar delimiter = \".\";\n\t\t\t\tvar a = s.split('.',2)\n\t\t\t\tvar d = a[1];\n\t\t\t\tvar i = parseInt(a[0]);\n\t\t\t\tif(isNaN(i)) { return ''; }\n\t\t\t\tvar minus = '';\n\t\t\t\tif(i < 0) { minus = '-'; }\n\t\t\t\ti = Math.abs(i);\n\t\t\t\tvar n = new String(i);\n\t\t\t\tvar a = [];\n\t\t\t\twhile(n.length > 3)\n\t\t\t\t{\n\t\t\t\t\tvar nn = n.substr(n.length-3);\n\t\t\t\t\ta.unshift(nn);\n\t\t\t\t\tn = n.substr(0,n.length-3);\n\t\t\t\t}\n\t\t\t\tif(n.length > 0) { a.unshift(n); }\n\t\t\t\tn = a.join(delimiter);\n\t\t\t\tif(d.length < 1) { s = n; }\n\t\t\t\telse { s = n + ',' + d; }\n\t\t\t\ts = minus + s;\n\t\t\t\treturn s;\n\t\t\t}", "function commas(d, precision) {\n return formatNumber(Number(d.toFixed(precision || 0)));\n }", "function numberWithCommas(x) {\n var parts = x.toFixed(2).toString().split(\".\");\n \n parts[0] = parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n \n return parts.join(\".\");\n }", "function formatFloat(num,js) {\n var originalValue=num; \n var p = match(num,\"[.]\"); var d = \"0\"; if (p >= 0) { d = num.substring(p+1,num.length+1); num = num.substring(0,p); }\n if ((num == \"\") || (isNaN(num))) num = \"0\";\n if ((d == \"\") || (isNaN(d))) d = \"0\"; \n d = \"\" + (parseFloat(\"0.\"+d)+Math.pow(0.1,10)); \n var newNum=parseInt(num,10); \n var numStr=\"\";\n if((originalValue>-1) && (originalValue<0))\n {\n numStr=\"-\" + newNum; \n }\n else\n {\n numStr=newNum; \n }\n var result=(numStr+ \".\" + d.substring(2,2+js)); \n return result; \n}", "function number_format(number, decimals, dec_point, thousands_sep)\r\n{\r\n\tvar n = !isFinite(+number) ? 0 : +number, \r\n prec = !isFinite(+decimals) ? 0 : Math.abs(decimals),\r\n sep = (typeof thousands_sep === 'undefined') ? ',' : thousands_sep, dec = (typeof dec_point === 'undefined') ? '.' : dec_point,\r\n s = '',\r\n toFixedFix = function (n, prec) {\r\n var k = Math.pow(10, prec);\r\n return '' + Math.round(n * k) / k; };\r\n // Fix for IE parseFloat(0.55).toFixed(0) = 0;\r\n s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.');\r\n if (s[0].length > 3) {\r\n s[0] = s[0].replace(/\\B(?=(?:\\d{3})+(?!\\d))/g, sep); }\r\n if ((s[1] || '').length < prec) {\r\n s[1] = s[1] || '';\r\n s[1] += new Array(prec - s[1].length + 1).join('0');\r\n }\r\n\treturn s.join(dec);\r\n}", "function floatRenderer() {\n\treturn function (value) {\n\t\treturn isNaN(value) ? '' : String(value).replace(\".\", Sys.CultureInfo.CurrentCulture.numberFormat.CurrencyDecimalSeparator);\n\t};\n}", "function formatNumber(x) {\n var parts = x.toString().split(\".\");\n parts[0] = parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n return parts.join(\".\");\n}", "function formatNumber(x) {\n var parts = x.toString().split(\".\");\n parts[0] = parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n return parts.join(\".\");\n}", "function numberWithCommas(x) {\n return x.toString().replace(/\\B(?<!\\.\\d*)(?=(\\d{3})+(?!\\d))/g, \",\");\n}", "function replaceDecimal(elem)\n{\n\tvar value = elem.value;\n\telem.value = value.replace(new RegExp(\",\", \"g\") ,\".\");\n}", "function numberWithCommas(x) {\n\n var parts = x.toString().split(\".\");\n\n parts[0] = parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, \".\");\n\n return parts.join(\".\");\n\n}", "function formatNumber(number, decimals, dec_point, thousands_sep) {\n number = (number + '').replace(/[^0-9+-Ee.]/g, '');\n var n = !isFinite(+number) ? 0 : +number,\n prec = !isFinite(+decimals) ? 0 : Math.abs(decimals),\n sep = (typeof thousands_sep === 'undefined') ? ',' : thousands_sep,\n dec = (typeof dec_point === 'undefined') ? '.' : dec_point,\n s = '',\n toFixedFix = function (n, prec) {\n var k = Math.pow(10, prec);\n return '' + Math.round(n * k) / k;\n };\n // Fix for IE parseFloat(0.55).toFixed(0) = 0;\n s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.');\n if (s[0].length > 3) {\n s[0] = s[0].replace(/B(?=(?:d{3})+(?!d))/g, sep);\n }\n if ((s[1] || '').length < prec) {\n s[1] = s[1] || '';\n s[1] += new Array(prec - s[1].length + 1).join('0');\n }\n return s.join(dec);\n}", "function numberWithCommas(x) {\n return x.toString().replace(/\\B(?<!\\.\\d*)(?=(\\d{3})+(?!\\d))/g, ',');\n}", "function commafy( arg ) {\n arg += '';\n var num = arg.split('.'); \n if (typeof num[0] !== 'undefined'){\n var int = num[0];\n if (int.length > 3){\n int = int.split('').reverse().join('');\n int = int.replace(/(\\d{3})/g, \"$1,\");\n int = int.split('').reverse().join('')\n }\n }\n if (typeof num[1] !== 'undefined'){\n var dec = num[1];\n if (dec.length > 4){\n dec = dec.replace(/(\\d{3})/g, \"$1 \");\n }\n }\n\n return (typeof num[0] !== 'undefined'?int:'') \n + (typeof num[1] !== 'undefined'?'.'+dec:'');\n }", "function number_format(b,c,d,e){b=(b+\"\").replace(/[^0-9+\\-Ee.]/g,\"\");b=isFinite(+b)?+b:0;c=isFinite(+c)?Math.abs(c):0;e=\"undefined\"===typeof e?\",\":e;d=\"undefined\"===typeof d?\".\":d;var a=\"\",a=function(a,b){var c=Math.pow(10,b);return\"\"+(Math.round(a*c)/c).toFixed(b)},a=(c?a(b,c):\"\"+Math.round(b)).split(\".\");3<a[0].length&&(a[0]=a[0].replace(/\\B(?=(?:\\d{3})+(?!\\d))/g,e));(a[1]||\"\").length<c&&(a[1]=a[1]||\"\",a[1]+=Array(c-a[1].length+1).join(\"0\"));return a.join(d)}", "function number_format(number, decimals, dec_point, thousands_point) {\n\t\tif (number == null || !isFinite(number)) {\n\t\t\tthrow new TypeError(\"number is not valid\");\n\t\t}\n\t\n\t\tif (!decimals) {\n\t\t\tvar len = number.toString().split('.').length;\n\t\t\tdecimals = len > 1 ? len : 0;\n\t\t}\n\t\n\t\tif (!dec_point) {\n\t\t\tdec_point = '.';\n\t\t}\n\t\n\t\tif (!thousands_point) {\n\t\t\tthousands_point = ',';\n\t\t}\n\t\n\t\tnumber = parseFloat(number).toFixed(decimals);\n\t\n\t\tnumber = number.replace(\".\", dec_point);\n\t\n\t\tvar splitNum = number.split(dec_point);\n\t\tsplitNum[0] = splitNum[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, thousands_point);\n\t\tnumber = splitNum.join(dec_point);\n\t\n\t\treturn number;\n\t}", "function parseFloatOpts(str) {\n\n if (typeof str === \"number\") {\n return str;\n }\n\n var ar = str.split(/\\.|,/);\n\n var value = '';\n for (var i in ar) {\n if (i > 0 && i == ar.length - 1) {\n value += \".\";\n }\n value += ar[i];\n }\n return Number(value);\n}", "function commafy( arg ) {\n arg += '';\n var num = arg.split('.');\n if (typeof num[0] !== 'undefined'){\n var int = num[0];\n if (int.length > 3){\n int = int.split('').reverse().join('');\n int = int.replace(/(\\d{3})/g, \"$1,\");\n int = int.split('').reverse().join('')\n }\n }\n if (typeof num[1] !== 'undefined'){\n var dec = num[1];\n if (dec.length > 4){\n dec = dec.replace(/(\\d{3})/g, \"$1 \");\n }\n }\n\n return (typeof num[0] !== 'undefined'?int:'')\n + (typeof num[1] !== 'undefined'?'.'+dec:'');\n }", "numberWithCommas(x) {\n if (x) {\n return x.toString().replace(/\\B(?<!\\.\\d*)(?=(\\d{3})+(?!\\d))/g, \",\");\n } else {\n return 0;\n }\n }", "function format(input) {\n var num = input.toString().replace(/\\./g, '');\n if (!isNaN(num)) {\n num = num.toString().split('').reverse().join('').replace(/(?=\\d*\\,?)(\\d{3})/g, \"$1,\");\n num = num.split('').reverse().join('').replace(/^[\\,]/, '');\n return num;\n }\n}", "function number_format(number, decimals, dec_point, thousands_sep) {\r\n\r\n number = (number + '').replace(/[^0-9+\\-Ee.]/g, '');\r\n var n = !isFinite(+number) ? 0 : +number,\r\n prec = !isFinite(+decimals) ? 0 : Math.abs(decimals),\r\n sep = (typeof thousands_sep === 'undefined') ? ',' : thousands_sep,\r\n dec = (typeof dec_point === 'undefined') ? '.' : dec_point,\r\n s = '',\r\n toFixedFix = function (n, prec) {\r\n var k = Math.pow(10, prec);\r\n return '' + Math.round(n * k) / k;\r\n };\r\n s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.');\r\n if (s[0].length > 3) {\r\n s[0] = s[0].replace(/\\B(?=(?:\\d{3})+(?!\\d))/g, sep);\r\n }\r\n if ((s[1] || '').length < prec) {\r\n s[1] = s[1] || '';\r\n s[1] += new Array(prec - s[1].length + 1).join('0');\r\n }\r\n return s.join(dec);\r\n}", "function number_format(number, decimals, dec_point, thousands_sep) {\n // * example: number_format(1234.56, 2, ',', ' ');\n // * return: '1 234,56'\n number = (number + '').replace(',', '').replace(' ', '');\n var n = !isFinite(+number) ? 0 : +number,\n prec = !isFinite(+decimals) ? 0 : Math.abs(decimals),\n sep = (typeof thousands_sep === 'undefined') ? ',' : thousands_sep,\n dec = (typeof dec_point === 'undefined') ? '.' : dec_point,\n s = '',\n toFixedFix = function (n, prec) {\n var k = Math.pow(10, prec);\n return '' + Math.round(n * k) / k;\n };\n // Fix for IE parseFloat(0.55).toFixed(0) = 0;\n s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.');\n if (s[0].length > 3) {\n s[0] = s[0].replace(/\\B(?=(?:\\d{3})+(?!\\d))/g, sep);\n }\n if ((s[1] || '').length < prec) {\n s[1] = s[1] || '';\n s[1] += new Array(prec - s[1].length + 1).join('0');\n }\n return s.join(dec);\n}", "function gp_number_format (ao_obj, decimals, dec_point, thousands_sep) {\n \n var exponent = \"\";\n var numberstr = null;\n var eindex = null;\n var temp = null;\n var sign = null;\n var integer = null;\n var fractional = null;\n// var number = av_obj.value.replace(/,/g,\"\");\n var number = gp_replaceComma(ao_obj.val());\n var msgVal = \"\";\n\n if(gp_trim(number)==\"\"){\n return true;\n }\n \n numberstr = number.toString ();\n eindex = numberstr.indexOf (\"e\");\n \n if (eindex > -1) {\n exponent = numberstr.substring (eindex);\n number = parseFloat (numberstr.substring (0, eindex));\n }\n \n if (decimals != null) {\n temp = Math.pow (10, decimals);\n number = Math.round (number * temp) / temp;\n }\n \n sign = number < 0 ? \"-\" : \"\";\n integer = (number > 0 ? Math.floor (number) : Math.abs (Math.ceil (number))).toString ();\n \n fractional = number.toString ().substring (integer.length + sign.length);\n dec_point = dec_point != null ? dec_point : \".\";\n fractional = decimals != null && decimals > 0 || fractional.length > 1 ? (dec_point + fractional.substring (1)) : \"\";\n \n if (decimals != null && decimals > 0) {\n for (i = fractional.length - 1, z = decimals; i < z; ++i) {\n fractional += \"0\";\n }\n }\n \n thousands_sep = (thousands_sep != dec_point || fractional.length == 0) ? thousands_sep : null;\n if (thousands_sep != null && thousands_sep != \"\") {\n for (var i = integer.length - 3; i > 0; i -= 3){\n integer = integer.substring (0 , i) + thousands_sep + integer.substring (i);\n }\n }\n \n msgVal = sign + integer + fractional + exponent;\n if(msgVal.indexOf(\"NaN\") > -1){\n return false;\n }\n \n //av_obj.value = msgVal;\n ao_obj.val(msgVal);\n return true;\n \n //av_obj.value = sign + integer + fractional + exponent;\n //return sign + integer + fractional + exponent;\n}", "function formatDecimal(x) {\n return Math.abs(x = Math.round(x)) >= 1e21\n ? x.toLocaleString(\"en\").replace(/,/g, \"\")\n : x.toString(10);\n}", "function number_format(number, decimals, dec_point, thousands_sep) {\n // * example: number_format(1234.56, 2, ',', ' ');\n // * return: '1 234,56'\n number = (number + '').replace(',', '').replace(' ', '');\n var n = !isFinite(+number) ? 0 : +number,\n prec = !isFinite(+decimals) ? 0 : Math.abs(decimals),\n sep = (typeof thousands_sep === 'undefined') ? ',' : thousands_sep,\n dec = (typeof dec_point === 'undefined') ? '.' : dec_point,\n s = '',\n toFixedFix = function(n, prec) {\n var k = Math.pow(10, prec);\n return '' + Math.round(n * k) / k;\n };\n // Fix for IE parseFloat(0.55).toFixed(0) = 0;\n s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.');\n if (s[0].length > 3) {\n s[0] = s[0].replace(/\\B(?=(?:\\d{3})+(?!\\d))/g, sep);\n }\n if ((s[1] || '').length < prec) {\n s[1] = s[1] || '';\n s[1] += new Array(prec - s[1].length + 1).join('0');\n }\n return s.join(dec);\n}", "function number_format(number, decimals, dec_point, thousands_sep) {\n // * example: number_format(1234.56, 2, ',', ' ');\n // * return: '1 234,56'\n number = (number + '').replace(',', '').replace(' ', '');\n var n = !isFinite(+number) ? 0 : +number,\n prec = !isFinite(+decimals) ? 0 : Math.abs(decimals),\n sep = (typeof thousands_sep === 'undefined') ? ',' : thousands_sep,\n dec = (typeof dec_point === 'undefined') ? '.' : dec_point,\n s = '',\n toFixedFix = function(n, prec) {\n var k = Math.pow(10, prec);\n return '' + Math.round(n * k) / k;\n };\n // Fix for IE parseFloat(0.55).toFixed(0) = 0;\n s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.');\n if (s[0].length > 3) {\n s[0] = s[0].replace(/\\B(?=(?:\\d{3})+(?!\\d))/g, sep);\n }\n if ((s[1] || '').length < prec) {\n s[1] = s[1] || '';\n s[1] += new Array(prec - s[1].length + 1).join('0');\n }\n return s.join(dec);\n}", "function formatNumber(val, decimals) {\r\n return val.toLocaleString(undefined, \r\n {minimumFractionDigits: decimals,\r\n maximumFractionDigits: decimals});\r\n}", "function humanize(x)\n{\n// if (isNumber(x)) {\n// console.debug(\"failed humanize(\" + x + \")\");\n// return x;\n// }\n //var myLocale = Qt.locale(getLocalCode());\n //console.debug(\"****** start humanize(\" + x + \")\");\n //var ans = Number(parseFloat(x)).toLocaleString(getLocalCode(), { minimumFractionDigits: 2 });\n //var ans = Number.fromLocaleString(myLocale, x);\n //var ans = x.toLocaleString(getLocalCode())\n //var ans = x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n //var ans = parseFloat(x).toLocaleString().replace(/\\.([0-9])$/, \".$10\");\n //console.debug(\"******** end humanize(\" + ans + \")\");\n x += '';\n var ans = x.split('.');\n var x1 = ans[0];\n var x2 = ans.length > 1 ? '.' + ans[1] : '';\n var rgx = /(\\d+)(\\d{3})/;\n while (rgx.test(x1))\n {\n x1 = x1.replace(rgx, '$1' + ',' + '$2');\n }\n ans = x1 + x2;\n\n return ans;\n}", "function floatingPointFormatString() {\n return operator_1.pipe(string_1.toTrimmed(), string_1.match(FloatingPointUtil.floatingPointRegex, function (name) {\n return {\n message: name + \" must be valid floating point format string\",\n expected: \"valid floating point format string\",\n };\n }));\n}", "function qd_number_format(b,c,d,e){b=(b+\"\").replace(/[^0-9+\\-Ee.]/g,\"\");b=isFinite(+b)?+b:0;c=isFinite(+c)?Math.abs(c):0;e=\"undefined\"===typeof e?\",\":e;d=\"undefined\"===typeof d?\".\":d;var a=\"\",a=function(a,b){var c=Math.pow(10,b);return\"\"+(Math.round(a*c)/c).toFixed(b)},a=(c?a(b,c):\"\"+Math.round(b)).split(\".\");3<a[0].length&&(a[0]=a[0].replace(/\\B(?=(?:\\d{3})+(?!\\d))/g,e));(a[1]||\"\").length<c&&(a[1]=a[1]||\"\",a[1]+=Array(c-a[1].length+1).join(\"0\"));return a.join(d)}", "function qd_number_format(b,c,d,e){b=(b+\"\").replace(/[^0-9+\\-Ee.]/g,\"\");b=isFinite(+b)?+b:0;c=isFinite(+c)?Math.abs(c):0;e=\"undefined\"===typeof e?\",\":e;d=\"undefined\"===typeof d?\".\":d;var a=\"\",a=function(a,b){var c=Math.pow(10,b);return\"\"+(Math.round(a*c)/c).toFixed(b)},a=(c?a(b,c):\"\"+Math.round(b)).split(\".\");3<a[0].length&&(a[0]=a[0].replace(/\\B(?=(?:\\d{3})+(?!\\d))/g,e));(a[1]||\"\").length<c&&(a[1]=a[1]||\"\",a[1]+=Array(c-a[1].length+1).join(\"0\"));return a.join(d)}", "function qd_number_format(b,c,d,e){b=(b+\"\").replace(/[^0-9+\\-Ee.]/g,\"\");b=isFinite(+b)?+b:0;c=isFinite(+c)?Math.abs(c):0;e=\"undefined\"===typeof e?\",\":e;d=\"undefined\"===typeof d?\".\":d;var a=\"\",a=function(a,b){var c=Math.pow(10,b);return\"\"+(Math.round(a*c)/c).toFixed(b)},a=(c?a(b,c):\"\"+Math.round(b)).split(\".\");3<a[0].length&&(a[0]=a[0].replace(/\\B(?=(?:\\d{3})+(?!\\d))/g,e));(a[1]||\"\").length<c&&(a[1]=a[1]||\"\",a[1]+=Array(c-a[1].length+1).join(\"0\"));return a.join(d)}", "function numberWithCommas(x) {\n if (x) {\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \".\");\n } else {\n return 0;\n }\n\n}", "function decimal_to_commadecimal(input) {\n if (/^\\d+\\.?\\d*$/.test(input)) {\n return input.toFixed(6).replace(\".\", \",\");\n } else {\n alert(\"Invalid input: \" + input);\n return false;\n }\n}", "function Fmt(x) { \n var v\n if(x>0) { v=''+(x+0.00000001) } else { v=''+(x-0.00000000) };\n return v.substring(0,v.indexOf('.')+8)\n}", "function formatNumber(n) {\n\treturn n.replace(\",\", '.').replace(\" \", '');\n\t;\n}", "function formatNumber(val) {\r\n\tvar str = val.toString();\r\n\tif (str.length > 3)\r\n\t\treturn addCommas(str.substr(0, str.length - 3)) + \",\" + str.substr(str.length - 3);\r\n\treturn str;\r\n}", "function formateNum(value) {\n var temp = value.toFixed(2).replace(/(\\d)(?=(\\d{3})+\\.)/g, \"$1,\")\n return temp.substring(0, temp.length-3)\n}", "function format(num){\n var n = num.toString(), p = n.indexOf('.');\n return n.replace(/\\d(?=(?:\\d{3})+(?:\\.|$))/g, function($0, i) {\n return p<0 || i<p ? ($0+',') : $0;\n });\n }", "function autoNumberFormat(value) {\n return value % 1 === 0 ? d3_format_1.format(',')(value) : d3_format_1.format(',.2f')(value);\n}", "function convertCommaToDot(value) {\n var strValue = new String(value);\n if (strValue.indexOf(\",\") > -1 ) {\n var strValue=strValue.replace(\",\",\".\");\n }\n return new Number(strValue);\n}", "function numberWithCommas(x) {\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',')\n }", "function formatNumber(number) {\n var num_parts = number.toString().split(\".\");\n num_parts[0] = num_parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n return num_parts.join(\".\");\n}", "function formatNum(x) {\n x = x.toFixed(2);\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\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 num_format(val) {\n if (val >= 1000 || val < 0.01) {\n return d3.format('.2e')(val)\n } else {\n return d3.format('.2f')(val)\n }\n}", "function commaToDot(val1, val2) {\r\n\t\tval1.replace(\",\", \".\");\r\n\t\tval2.replace(\",\",\".\");\r\n\t}", "function numberWithCommas(x) {\r\n var rounded = Math.round(x * 100) / 100;\r\n return rounded.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\r\n }", "function numberWithCommas(num) {\n var n = num.toString(),\n p = n.indexOf('.');\n return n.replace(/\\d(?=(?:\\d{3})+(?:\\.|$))/g, function ($0, i) {\n return p < 0 || i < p ? ($0 + ',') : $0;\n });\n}", "function numberWithDots(x) {\n var parts = x.toString().split(\".\");\n // console.log(parts)\n parts[0] = parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n return parts.join(\".\");\n }", "function format_decimal(val, type_char) {\n var valStr = val.toString();\n if (type_char === 'f') {\n if (val === util.FLOAT_POS_INFINITY || val === Number.POSITIVE_INFINITY) {\n valStr = \"Infinity\";\n }\n else if (val === util.FLOAT_NEG_INFINITY || val === Number.NEGATIVE_INFINITY) {\n valStr = \"-Infinity\";\n }\n else if (val === NaN) {\n valStr = \"NaN\";\n }\n }\n var str;\n if (valStr.match(/-?(Infinity|NaN)/)) {\n str = valStr;\n }\n else {\n var m = valStr.match(/(-?\\d+)(\\.\\d+)?(?:e\\+?(-?\\d+))?/);\n str = m[1] + (m[2] ? m[2] : '.0');\n if (type_char === 'f' && m[2] != null && m[2].length > 8) {\n str = parseFloat(str).toFixed(7);\n }\n str = str.replace(/0+$/, '').replace(/\\.$/, '.0');\n if (m[3] != null) {\n str += \"E\" + m[3];\n }\n }\n return str + type_char;\n}", "function numberWithCommas(x) {\n\t return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n\t}", "function numberWithCommas(x) {\n\t return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n\t}", "function numberWithCommas(x) {\n\t\t return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n\t\t}", "function numberWithCommas(x) {\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',')\n }", "function numberWithCommas(x) {\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',')\n }", "function numberWithCommas(x) {\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',')\n }", "function numberWithCommas(x) {\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',')\n }", "function numberWithCommas(x) {\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n }", "function numberWithCommas(x) {\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n }", "commaFormatted(amount) {\r\n\t\tvar delimiter = \",\";\r\n\t\tvar a = amount.split('.', 2);\r\n\t\tvar d = a[1];\r\n\t\tvar i = parseInt(a[0]);\r\n\t\tif (isNaN(i)) {\r\n\t\t\treturn '';\r\n\t\t}\r\n\t\tvar minus = '';\r\n\t\tif (i < 0) {\r\n\t\t\tminus = '-';\r\n\t\t}\r\n\t\ti = Math.abs(i);\r\n\t\tvar n = new String(i);\r\n\t\tvar a = [];\r\n\t\twhile (n.length > 3) {\r\n\t\t\tvar nn = n.substr(n.length - 3);\r\n\t\t\ta.unshift(nn);\r\n\t\t\tn = n.substr(0, n.length - 3);\r\n\t\t}\r\n\t\tif (n.length > 0) {\r\n\t\t\ta.unshift(n);\r\n\t\t}\r\n\t\tn = a.join(delimiter);\r\n\t\tif (d.length < 1) {\r\n\t\t\tamount = n;\r\n\t\t} else {\r\n\t\t\tamount = n + '.' + d;\r\n\t\t}\r\n\t\tamount = minus + amount;\r\n\t\treturn amount;\r\n\t}", "function numberWithCommas(x) {\n if(x) return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n}", "function FormatFourDecimal() {\n if (event != null) {\n var obj = event.srcElement;\n if (obj.value != \"\" && !(isNaN(obj.value))) {\n var intDecimalPlace = obj.value.length - obj.value.lastIndexOf(\".\")\n\n if (intDecimalPlace == 1 || intDecimalPlace == 0 || obj.value.lastIndexOf(\".\") == -1) {\n obj.value = obj.value + \".0000\"\n }\n else if (intDecimalPlace == 2) {\n obj.value = obj.value + \"000\"\n }\n else if (intDecimalPlace == 3) {\n obj.value = obj.value + \"00\"\n }\n else if (intDecimalPlace == 4) {\n obj.value = obj.value + \"0\"\n }\n else if (intDecimalPlace == 5) {\n obj.value = obj.value\n }\n }\n }\n}", "function numberWithCommas(x) {\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n }", "function numberWithCommas(x) {\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n }", "function formatValue(value) {\n var str = parseFloat(value).toFixed(2) + \"\";\n str = str.replace(\".\", \",\");\n str = `R$ ${str}`;\n return str;\n}", "function nwp(v, p) {\n\tvar parts = v.toFixed(p).split('.');\n\tparts[0] = parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',');\n\treturn parts.join('.');\n}", "function numberWithCommas(x) {\n\t\t\t return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n\t\t\t}", "function numberWithCommas(x) {\n\t\t\t return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n\t\t\t}", "formatValue(value) {\n let precision = 2;\n if (value >= 1) {\n precision = 3;\n }\n if (value >= 9) {\n precision = 4;\n }\n let convertedValue = value.toPrecision(precision).toString();\n return parseFloat(convertedValue);\n }", "function numberWithCommas(x) {\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n }", "function set_number_format(amount, decimals) {\n amount += '';\n amount = parseFloat(amount.replace(/[^0-9\\.]/g, ''));\n decimals = decimals || 0;\n if (isNaN(amount) || amount === 0)\n return parseFloat(0).toFixed(decimals);\n amount = '' + amount.toFixed(decimals);\n var amount_parts = amount.split('.'),\n regexp = /(\\d+)(\\d{3})/;\n while (regexp.test(amount_parts[0]))\n amount_parts[0] = amount_parts[0].replace(regexp, '$1' + ' ' + '$2');\n return amount_parts.join('.');\n }", "function formatReal(mixed) {\n\tvar int = parseInt(mixed.toFixed(2).toString().replace(/[^\\d]+/g, ''));\n\tvar tmp = int + '';\n\ttmp = tmp.replace(/([0-9]{2})$/g, \",$1\");\n\tif (tmp.length > 6)\n\t\ttmp = tmp.replace(/([0-9]{3}),([0-9]{2}$)/g, \".$1,$2\");\n\n\treturn tmp;\n}", "function numberWithCommas(x) {\r\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \" \");\r\n}", "formatDecimalToBD(str) {\n if(str == null || str == '' || str == 0){\n return 0;\n }else{\n return str.replace(\".\", \"\").replace(\",\", \".\");\n } \n }", "function commify(num) {\n return num.toString().replace(\".\", \",\");\n }", "function tonumber(valor, format){\n\tif (format === undefined){\n\t\tformat = \"double\";\n\t}\n\tswitch(format){\n\t\tcase \"integer\":\n\t\t\tvar validaNumero = /^(\\-)?([0-9]+)$/;\n\t\t\tif (!validaNumero.test(valor)){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvalor = parseInt(valor);\n\t\treturn valor;\n\t\tdefault:\n\t\t\tvar validaNumero = /^(\\-)?([0-9.,]+)$/;\n\t\t\tif (!validaNumero.test(valor)){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar posVirgula = valor.lastIndexOf(',');\n\t\t\tvar posPonto = valor.lastIndexOf('.');\n\t\t\tvar pontoSeparacao = 0;\n\t\t\tvar separador = \"\";\n\t\t\tvar tamanhoNumero = valor.length;\n\t\t\tif (posVirgula == -1 && posPonto == -1){\n\t\t\t\treturn valor + \",00\";\n\t\t\t}\n\t\t\tif (posVirgula > posPonto){\n\t\t\t\tseparador = \",\";\n\t\t\t\tpontoSeparacao = posVirgula;\n\t\t\t}else{\n\t\t\t\tseparador = \".\";\n\t\t\t\tpontoSeparacao = posPonto;\n\t\t\t}\n\t\t\tvar valorNaoDecimal = valor.substring(0, pontoSeparacao);\n\t\t\tvar valorDecimal = valor.substring((pontoSeparacao+1));\n\t\t\tvalorNaoDecimal = valorNaoDecimal.replace(/[.,]/g, \"\");\n\t\t\tvalorDecimal = valorDecimal.replace(/[.,]/g, \".\");\n\t\t\tif (valorDecimal === \"\"){\n\t\t\t\tvalorDecimal = \"0\";\n\t\t\t}\n\t\t\tvalor = valorNaoDecimal + \".\" + valorDecimal;\n\t\t\tvalor = valor.replace(\".\", \",\");\n\t\treturn valor;\n\t}\n}", "function __BRE__human_readable(value, dp)\n{\n try{\n value/2.3;\n \n if (!isNaN(dp))\n value = value.toFixed(dp);\n else\n value = value.toString();\n }\n catch(e){\n // value already a string as we want it!\n }\n \n if (isNaN(parseFloat(value)))\n {\n return value;\n }\n\n dp_index = value.indexOf(\".\");\n dp_index = dp_index<0 ? value.length-1 : dp_index-1;\n \n // array to contain new human-readable value format...\n value_reverse = [];\n for (var i=value.length-1; i!=dp_index; --i)\n value_reverse.push(value[i]);\n \n for (var i=dp_index, counter=1; i>=0; --i)\n {\n value_reverse.push(value[i]);\n if (counter==3 && i)\n {\n value_reverse.push(\",\");\n counter = 0;\n }\n\n counter++;\n }\n\n value_reverse.reverse();\n\n if (!isNaN(dp) && !dp)\n {\n value = value_reverse.join(\"\");\n if (value.indexOf(\".\")>=0)\n return value.slice(0, value.indexOf(\".\"));\n }\n \n return value_reverse.join(\"\");\n\n \n}", "function numberWithCommas(x) {\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',');\n}", "function numberWithCommas(x) {\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',');\n}", "function numberWithCommas(x) {\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',');\n}", "function numberFormat(number, decimals, decPoint, thousandsSep) {\n decimals = isNaN(decimals) ? 2 : Math.abs(decimals);\n decPoint = decPoint === undefined ? '.' : decPoint;\n thousandsSep = thousandsSep === undefined ? ',' : thousandsSep;\n var sign = number < 0 ? '-' : '';\n number = Math.abs(+number || 0);\n var intPart = parseInt(number.toFixed(decimals), 10) + '';\n var j = intPart.length > 3 ? intPart.length % 3 : 0;\n return sign + (j ? intPart.substr(0, j) + thousandsSep : '') + intPart.substr(j).replace(/(\\d{3})(?=\\d)/g, '$1' + thousandsSep) + (decimals ? decPoint + Math.abs(number - intPart).toFixed(decimals).slice(2) : '');\n}", "function addCommas(yourNumber) {\n //Seperates the components of the number\n var n= yourNumber.toString().split(\".\");\n //Comma-fies the first part\n n[0] = n[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n //Combines the two sections\n return n.join(\".\");\n}", "function numberWithCommas(x) \n{\n\tif(x == null) { return 0; }\n\treturn x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n}", "function numberWithCommas(x) {\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n}", "function numberWithCommas(x) {\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n}", "function numberWithCommas(x) {\r\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\r\n }", "function numberWithCommas(x) {\r\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\r\n}", "function numberWithCommas(x) {\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',');\n}", "function numberWithCommas(x) {\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',');\n}", "function numberWithCommas(x) {\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',');\n}", "function numberWithCommas(x) {\n return x.toString().replace(/\\B(?=(?:\\d{3})+(?!\\d))/g, \",\");\n}", "function number_format(numero, decimal, decimal_separador, milhar_separador) {\n numero = (numero + '').replace(/[^0-9+\\-Ee.]/g, '');\n var n = !isFinite(+numero) ? 0 : +numero,\n prec = !isFinite(+decimal) ? 0 : Math.abs(decimal),\n sep = (typeof milhar_separador === 'undefined') ? ',' : milhar_separador,\n dec = (typeof decimal_separador === 'undefined') ? '.' : decimal_separador,\n s = '',\n toFixedFix = function (n, prec) {\n var k = Math.pow(10, prec);\n return '' + Math.round(n * k) / k;\n };\n // Fix para IE: parseFloat(0.55).toFixed(0) = 0;\n s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.');\n if (s[0].length > 3) {\n s[0] = s[0].replace(/\\B(?=(?:\\d{3})+(?!\\d))/g, sep);\n }\n if ((s[1] || '').length < prec) {\n s[1] = s[1] || '';\n s[1] += new Array(prec - s[1].length + 1).join('0');\n }\n\n return s.join(dec);\n}", "function numberWithCommas(x) {\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n}", "function numberWithCommas(x) {\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n}", "function numberWithCommas(x) {\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n}", "function numberWithCommas(x) {\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n}", "function numberWithCommas(x) {\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n}" ]
[ "0.6597131", "0.6470943", "0.6449249", "0.6426498", "0.6417687", "0.6262479", "0.6242373", "0.623794", "0.6237522", "0.62252074", "0.62252074", "0.62139016", "0.61919457", "0.6179374", "0.6178386", "0.61721474", "0.61590827", "0.6158602", "0.61562145", "0.6144109", "0.61440414", "0.6142705", "0.61346364", "0.6126039", "0.6118842", "0.6113503", "0.6113083", "0.60868895", "0.60868895", "0.6078178", "0.6069804", "0.6039863", "0.6031769", "0.6031769", "0.6031769", "0.6031693", "0.6027969", "0.6021735", "0.6013777", "0.6006142", "0.5996535", "0.5995934", "0.5986096", "0.5971557", "0.5964638", "0.5959493", "0.59491473", "0.5946266", "0.59434325", "0.5934312", "0.5930488", "0.5930475", "0.5920339", "0.5919175", "0.5910988", "0.5910988", "0.590661", "0.5905135", "0.5905135", "0.5905135", "0.5905135", "0.5903363", "0.5897138", "0.5889583", "0.5882056", "0.5870993", "0.5859978", "0.5859978", "0.5858681", "0.5848244", "0.5844209", "0.5844209", "0.5839584", "0.583891", "0.58347994", "0.5830014", "0.58245665", "0.5822929", "0.5816306", "0.5816257", "0.58110213", "0.58090866", "0.58090866", "0.58090866", "0.5808919", "0.58080083", "0.580673", "0.5801514", "0.5801514", "0.5799232", "0.579893", "0.57889026", "0.57889026", "0.57889026", "0.57881844", "0.5784711", "0.57831407", "0.57831407", "0.57831407", "0.57831407", "0.57831407" ]
0.0
-1
only used in dev mode
function checkDuration (val, name, vnode) { if (typeof val !== 'number') { warn( "<transition> explicit " + name + " duration is not a valid number - " + "got " + (JSON.stringify(val)) + ".", vnode.context ); } else if (isNaN(val)) { warn( "<transition> explicit " + name + " duration is NaN - " + 'the duration expression might be incorrect.', vnode.context ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isDevMode(){_runModeLocked=true;return _devMode;}", "function isDevMode(){_runModeLocked=true;return _devMode}", "function devDebug(){\n\n}", "function initDevMode() {\n if(!document.getElementById(\"devModeCheckbox\").checked) {\n // If not in dev mode, hide the devModeContainer.\n document.getElementById(\"devModeContainer\").className += \" invisible\";\n } else {\n console.log(\"Checked\");\n // In dev mode:\n // Remove invisible class\n let container = document.getElementById(\"devModeContainer\");\n container.className = container.className.replace(\"invisible\", '');\n\n dumpStoredData();\n setClearStorageHandler();\n\n setDevModeGithub();\n }\n}", "function enableProdMode(){if(_runModeLocked){throw new Error('Cannot enable prod mode after platform setup.');}_devMode=false;}", "function enableProdMode(){if(_runModeLocked){throw new Error(\"Cannot enable prod mode after platform setup.\")}_devMode=false}", "function isDevMode() {\n _runModeLocked = true;\n return _devMode;\n}", "function isDevMode() {\n _runModeLocked = true;\n return _devMode;\n}", "function isDevMode() {\n _runModeLocked = true;\n return _devMode;\n}", "function isDevMode() {\n _runModeLocked = true;\n return _devMode;\n}", "function isDevMode() {\n _runModeLocked = true;\n return _devMode;\n}", "function isDevMode() {\n _runModeLocked = true;\n return _devMode;\n}", "function isDevMode() {\n _runModeLocked = true;\n return _devMode;\n}", "function isDevMode() {\n _runModeLocked = true;\n return _devMode;\n}", "function isDevMode() {\n _runModeLocked = true;\n return _devMode;\n}", "function isDevMode() {\n _runModeLocked = true;\n return _devMode;\n}", "function isDevMode() {\n _runModeLocked = true;\n return _devMode;\n}", "function isDevMode() {\n _runModeLocked = true;\n return _devMode;\n}", "function isDevMode() {\n _runModeLocked = true;\n return _devMode;\n}", "function isDevMode() {\n _runModeLocked = true;\n return _devMode;\n}", "function isDevMode() {\n _runModeLocked = true;\n return _devMode;\n }", "function dev(cb) {\n if (!util.isProd()) {\n startDev(cb());\n }\n}", "function isDevMode() {\n _runModeLocked = true;\n return _devMode;\n }", "function isDevMode() {\n _runModeLocked = true;\n return _devMode;\n }", "function isDevMode() {\n _runModeLocked = true;\n return _devMode;\n }", "isDevMode() {\n\t\treturn this._devMode;\n\t}", "function isDevMode() {\n _runModeLocked = true;\n return _devMode;\n}", "function isDev() {\n return (process.env.NODE_ENV !== 'production')\n}", "private internal function m248() {}", "toggleDebugMode() {\n debug = !debug;\n }", "static ready() { }", "function devmode() {\n dev = !dev;\n if (dev) {\n track('Options', 'Advanced configuration', 'Show the advanced configuration');\n // show advanced configuration\n $('.advanced').show('blind', 'fast');\n $('#devmode').addClass('activated');\n } else {\n // hide advanced configuration\n $('.advanced').hide('blind', 'fast');\n $('#devmode').removeClass('activated');\n }\n}", "static on() {\n this._debugMode = true;\n this._stack = [];\n console.warn(`${this.FILENAME} : Debug mode turned ON.`);\n }", "function devMode() {\n return location.hostname === \"localhost\" || location.hostname === \"127.0.0.1\";\n}", "function isDevMode() {\n const config = Object(mattermost_redux_selectors_entities_general__WEBPACK_IMPORTED_MODULE_16__[\"getConfig\"])(stores_redux_store_jsx__WEBPACK_IMPORTED_MODULE_30__[\"default\"].getState());\n return config.EnableDeveloper === 'true';\n}", "function reportIsDev() {\n if (isDev) {\n console.log('isDev?:', 'Running in development');\n } else {\n console.log('isDev?:', 'Running in production');\n }\n}", "private public function m246() {}", "initialize() {\n this.updateDebugMode();\n }", "_initializeProperties(){}// prevent user code in connected from running", "_renderDebugInfo() {\n if (this.DEBUGMODE) {\n this.DEBUGDATA.CARD = this.card_title\n this.DEBUGDATA.API.updateIntervall = msToTime(this.update_interval)\n this.DEBUGDATA.API.elapsed_total = msToTime(performance.now() - this.APISTART)\n this.DEBUGDATA.API.datainfo = this.dataInfo\n this.DEBUGDATA.DATA_ENTITIES = this.entity_items.items\n this.DEBUGDATA.LOVELACE_CONFIG = this._config\n this.DEBUGDATA.LOCALEINFO = window.localeNames\n if (this.DEBUGDATA.PROFILER) {\n if (this.DEBUGDATA.PROFILER.GETHASSDATA) delete this.DEBUGDATA.PROFILER.GETHASSDATA.start\n if (this.DEBUGDATA.PROFILER.GETBUCKETDATA) delete this.DEBUGDATA.PROFILER.GETBUCKETDATA.start\n if (this.DEBUGDATA.PROFILER.GETSTATEDATA) delete this.DEBUGDATA.PROFILER.GETSTATEDATA.start\n if (this.DEBUGDATA.PROFILER.CHART && this.DEBUGDATA.PROFILER.CHART.start) delete this.DEBUGDATA.PROFILER.CHART.start\n if (this.DEBUGDATA.PROFILER.DATAPROVIDER) delete this.DEBUGDATA.PROFILER.DATAPROVIDER.start\n //if (this.DEBUGDATA.PROFILER.INFLUXDB) delete this.DEBUGDATA.PROFILER.INFLUXDB.start\n }\n console.info(\n `%cDEBUGDATA ${this.chart_type.toUpperCase()} ${appinfo.name} ${appinfo.version}:`,\n \"color:white;background:#cc283a;padding:4px\",\n this.DEBUGDATA\n )\n }\n }", "_renderDebugInfo() {\n if (this.DEBUGMODE) {\n this.DEBUGDATA.CARD = this.card_title\n this.DEBUGDATA.API.updateIntervall = msToTime(this.update_interval)\n this.DEBUGDATA.API.elapsed_total = msToTime(performance.now() - this.APISTART)\n this.DEBUGDATA.API.datainfo = this.dataInfo\n this.DEBUGDATA.DATA_ENTITIES = this.entity_items.items\n this.DEBUGDATA.LOVELACE_CONFIG = this._config\n this.DEBUGDATA.LOCALEINFO = window.localeNames\n if (this.DEBUGDATA.PROFILER) {\n if (this.DEBUGDATA.PROFILER.GETHASSDATA) delete this.DEBUGDATA.PROFILER.GETHASSDATA.start\n if (this.DEBUGDATA.PROFILER.GETBUCKETDATA) delete this.DEBUGDATA.PROFILER.GETBUCKETDATA.start\n if (this.DEBUGDATA.PROFILER.GETSTATEDATA) delete this.DEBUGDATA.PROFILER.GETSTATEDATA.start\n if (this.DEBUGDATA.PROFILER.CHART && this.DEBUGDATA.PROFILER.CHART.start) delete this.DEBUGDATA.PROFILER.CHART.start\n if (this.DEBUGDATA.PROFILER.DATAPROVIDER) delete this.DEBUGDATA.PROFILER.DATAPROVIDER.start\n //if (this.DEBUGDATA.PROFILER.INFLUXDB) delete this.DEBUGDATA.PROFILER.INFLUXDB.start\n }\n console.info(\n `%cDEBUGDATA ${this.chart_type.toUpperCase()} ${appinfo.name} ${appinfo.version}:`,\n \"color:white;background:#cc283a;padding:4px\",\n this.DEBUGDATA\n )\n }\n }", "function kp() {\n $log.debug(\"TODO\");\n }", "function toggleConfDebug(){\n\tdebug = !debug;\n\tsetData('debug', debug);\n\talert('Debug mode '+ (debug ? 'ON' : 'OFF'));\n}", "setDebugMode() {\n console.warn(\"setDebugMode is deprecated. use @ledgerhq/logs instead. No logs are emitted in this anymore.\");\n }", "async isAllowed() {\n return config.isDeveloperMode;\n }", "static get NOT_READY () {return 0}", "setDevMode(devMode) {\n\t\tthis._devMode = devMode;\n\t}", "function isLayer0RunDev() {\n return !isCloud() && !isProductionBuild();\n}", "function isDebug() {\n return process.env.RUN_MODE && process.env.RUN_MODE !== 'prod'\n}", "function _____SHARED_functions_____(){}", "function runInDevelopment() {\n runInAutologin(true);\n }", "function PressabilityDebugView() {\n return null;\n}", "function emDev(dev){\r\n io.emit('lightstate', lightSwitchStat[dev]);\r\n }", "function isDev(fn) {\n if (devMode) {\n return fn;\n } else {\n return passthrough();\n }\n}", "setDebug() {\n this.debug = true;\n }", "function main() {\n if (!PRODUCTION) {\n console.warn(\"Running in development mode.\");\n }\n const liveModelClient = new LiveModelClient();\n liveModelClient.on(\"update\", () => {\n const modelJson = JSON.stringify(liveModelClient.getModel(), null, 2);\n document.getElementById(\"data-console\").textContent = modelJson;\n });\n\n // Initiate connection.\n liveModelClient.connect();\n}", "_environmentChanged() {}", "function enableDebugTools(ref){exportNgVar(PROFILER_GLOBAL_NAME,new AngularProfiler(ref));return ref;}", "function isDev() {\n return process.env.NODE_ENV === 'development' ||\n process.env.NODE_ENV === 'test';\n}", "function InternalBreakpointState() { }", "function devMode(){\n\tdocument.getElementById('devButtons').style.display = 'block';\n}", "function alwaysRunOnload () {\n\t\t// Placeholder/Future use.\n\t}", "function DebugView() { }", "development () {\n this.enabled = true\n return this\n }", "function isDebug() {\n return debug;\n }", "function uabinjectDefuser()\n{\n window.trckd = true;\n window.uabpdl = true;\n window.uabInject = true;\n window.uabDetect = true;\n}", "Env(id){debugger;}", "function _main() {\n window.tools = {} || window.tools;\n window.tools.log = _log;\n }", "enableDeveloperMode() {\n if (!this.developerModeEnabled) {\n this.log.debug('Enabled developer mode');\n FirebaseRemoteConfig.enableDeveloperMode();\n this.developerModeEnabled = true\n }\n }", "_maybeRenderDevelopmentModeWarning() {\n if (__DEV__) {\n const learnMoreButton = (\n <Text onPress={this._handleLearnMorePress} style={styles.helpLinkText}>\n Learn more\n </Text>\n );\n\n return (\n <Text style={styles.developmentModeText}>\n Development mode is enabled, your app will be slower but you can use useful development\n tools. {learnMoreButton}\n </Text>\n );\n } else {\n return (\n <Text style={styles.developmentModeText}>\n You are not in development mode, your app will run at full speed.\n </Text>\n );\n }\n }", "function enableProdMode() {\n\t if (_modeLocked) {\n\t // Cannot use BaseException as that ends up importing from facade/lang.\n\t throw 'Cannot enable prod mode after platform setup.';\n\t }\n\t _devMode = false;\n\t}", "onReady() {}", "function jessica() {\n $log.debug(\"TODO\");\n }", "_FBPReady(){super._FBPReady();//this._FBPTraceWires()\n}", "_FBPReady(){super._FBPReady();//this._FBPTraceWires()\n}", "function isInDebugMode() {\n return (typeof config.debug !== 'undefined' && config.debug === true);\n}", "function enableProdMode() {\n if (_runModeLocked) {\n throw new Error('Cannot enable prod mode after platform setup.');\n }\n _devMode = false;\n}", "function enableProdMode() {\n if (_runModeLocked) {\n throw new Error('Cannot enable prod mode after platform setup.');\n }\n _devMode = false;\n}", "function enableProdMode() {\n if (_runModeLocked) {\n throw new Error('Cannot enable prod mode after platform setup.');\n }\n _devMode = false;\n}", "function enableProdMode() {\n if (_runModeLocked) {\n throw new Error('Cannot enable prod mode after platform setup.');\n }\n _devMode = false;\n}", "function enableProdMode() {\n if (_runModeLocked) {\n throw new Error('Cannot enable prod mode after platform setup.');\n }\n _devMode = false;\n}", "function enableProdMode() {\n if (_runModeLocked) {\n throw new Error('Cannot enable prod mode after platform setup.');\n }\n _devMode = false;\n}", "function enableProdMode() {\n if (_runModeLocked) {\n throw new Error('Cannot enable prod mode after platform setup.');\n }\n _devMode = false;\n}", "function enableProdMode() {\n if (_runModeLocked) {\n throw new Error('Cannot enable prod mode after platform setup.');\n }\n _devMode = false;\n}", "__fbpReady(){super.__fbpReady();//this._FBPTraceWires()\n}", "__fbpReady(){super.__fbpReady();//this._FBPTraceWires()\n}", "function debug_reset(){\n debug_executed = false\n debug[\"debug object.self\"][1] ? console.log(\"ready\") : \"\"\n }", "function InternalBreakpointState() {}", "function InternalBreakpointState() {}", "function debug(v){return false;}", "transient private protected internal function m182() {}", "function enableProdMode() {\n if (_runModeLocked) {\n throw new Error('Cannot enable prod mode after platform setup.');\n }\n\n _devMode = false;\n }", "function enableProdMode() {\n if (_runModeLocked) {\n throw new Error('Cannot enable prod mode after platform setup.');\n }\n\n _devMode = false;\n }", "function enableProdMode() {\n if (_runModeLocked) {\n throw new Error('Cannot enable prod mode after platform setup.');\n }\n\n _devMode = false;\n }", "extend(config, { isDev }) {\n if (isDev) {\n config.devtool = 'source-map';\n }\n }", "transient final protected internal function m174() {}", "function mainMonitor() {\n // queueDisk.addEvent() listen.... todo\n onNewDevEvent(() => {\n console.warn(\"newDevEvent\");\n\n // //step1 get new dev info and update view\n // sendGlobalUpdate();//global view update(from store)\n //\n // //setp check2 ntfs and update\n // if (action === NTFS_Mount) {\n // workerDisk.autoMount(function () {\n // sendGlobalUpdate();//global view update again\n // });\n // }\n })\n\n}", "function InDebugMode(){\n return window.location.href.indexOf(\"debug\")>0;\n}", "function init() {\n //UH HUH, THIS MY SHIT!\n }", "function DWRUtil() { }", "logDev(message){\n\t\tif(this.debugLevel==='DEVELOPPEMENT')\n\t\t\tconsole.log(message)\n\t}" ]
[ "0.689489", "0.6842149", "0.6738177", "0.64978427", "0.6495801", "0.64551413", "0.6330048", "0.6330048", "0.6330048", "0.6330048", "0.6330048", "0.6330048", "0.6330048", "0.6330048", "0.6330048", "0.6330048", "0.6330048", "0.6330048", "0.6330048", "0.6330048", "0.63274556", "0.6306661", "0.6285112", "0.6285112", "0.6285112", "0.62797534", "0.62725174", "0.60946774", "0.60548127", "0.60138553", "0.6002185", "0.6001724", "0.599409", "0.5969579", "0.5955699", "0.5937431", "0.5856834", "0.58219934", "0.58162165", "0.57976925", "0.57976925", "0.5767979", "0.5761148", "0.5757045", "0.57479095", "0.573663", "0.57319677", "0.5719305", "0.5710963", "0.56818724", "0.56791276", "0.5675757", "0.56680477", "0.56608623", "0.56482935", "0.564648", "0.5632599", "0.56298673", "0.56296796", "0.5610404", "0.560614", "0.5601524", "0.55777967", "0.55772483", "0.5572453", "0.5569121", "0.55688", "0.5568592", "0.55605245", "0.55598783", "0.5550456", "0.5545691", "0.5544345", "0.5542231", "0.5542231", "0.55392694", "0.5538856", "0.5538856", "0.5538856", "0.5538856", "0.5538856", "0.5538856", "0.5538856", "0.5538856", "0.55375546", "0.55375546", "0.553537", "0.55344796", "0.55344796", "0.55326337", "0.5531436", "0.5521245", "0.5521245", "0.5521245", "0.55202365", "0.5513297", "0.5511906", "0.550223", "0.54796404", "0.5476968", "0.54768586" ]
0.0
-1
Normalize a transition hook's argument length. The hook may be: a merged hook (invoker) with the original in .fns a wrapped component method (check ._length) a plain function (.length)
function getHookArgumentsLength (fn) { if (isUndef(fn)) { return false } var invokerFns = fn.fns; if (isDef(invokerFns)) { // invoker return getHookArgumentsLength( Array.isArray(invokerFns) ? invokerFns[0] : invokerFns ) } else { return (fn._length || fn.length) > 1 } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getHookArgumentsLength(fn){if(isUndef(fn)){return false;}var invokerFns=fn.fns;if(isDef(invokerFns)){// invoker\nreturn getHookArgumentsLength(Array.isArray(invokerFns)?invokerFns[0]:invokerFns);}else{return(fn._length||fn.length)>1;}}", "function getHookArgumentsLength(fn){if(isUndef(fn)){return false;}var invokerFns=fn.fns;if(isDef(invokerFns)){// invoker\nreturn getHookArgumentsLength(Array.isArray(invokerFns)?invokerFns[0]:invokerFns);}else{return(fn._length||fn.length)>1;}}", "function getHookArgumentsLength (fn) {\n if (isUndef(fn)) {\n return false\n }\n var invokerFns = fn.fns;\n if (isDef(invokerFns)) {\n // invoker\n return getHookArgumentsLength(\n Array.isArray(invokerFns)\n ? invokerFns[0]\n : invokerFns\n )\n } else {\n return (fn._length || fn.length) > 1\n }\n }", "function getHookArgumentsLength (fn) {\n if (isUndef(fn)) {\n return false\n }\n var invokerFns = fn.fns;\n if (isDef(invokerFns)) {\n // invoker\n return getHookArgumentsLength(\n Array.isArray(invokerFns)\n ? invokerFns[0]\n : invokerFns\n )\n } else {\n return (fn._length || fn.length) > 1\n }\n }", "function getHookArgumentsLength (fn) {\n if (isUndef(fn)) {\n return false\n }\n var invokerFns = fn.fns;\n if (isDef(invokerFns)) {\n // invoker\n return getHookArgumentsLength(\n Array.isArray(invokerFns)\n ? invokerFns[0]\n : invokerFns\n )\n } else {\n return (fn._length || fn.length) > 1\n }\n }", "function getHookArgumentsLength (fn) {\n if (isUndef(fn)) {\n return false\n }\n var invokerFns = fn.fns;\n if (isDef(invokerFns)) {\n // invoker\n return getHookArgumentsLength(\n Array.isArray(invokerFns)\n ? invokerFns[0]\n : invokerFns\n )\n } else {\n return (fn._length || fn.length) > 1\n }\n }", "function getHookArgumentsLength (fn) {\n if (isUndef(fn)) {\n return false\n }\n var invokerFns = fn.fns;\n if (isDef(invokerFns)) {\n // invoker\n return getHookArgumentsLength(\n Array.isArray(invokerFns)\n ? invokerFns[0]\n : invokerFns\n )\n } else {\n return (fn._length || fn.length) > 1\n }\n }", "function getHookArgumentsLength (fn) {\n\t if (isUndef(fn)) {\n\t return false\n\t }\n\t var invokerFns = fn.fns;\n\t if (isDef(invokerFns)) {\n\t // invoker\n\t return getHookArgumentsLength(\n\t Array.isArray(invokerFns)\n\t ? invokerFns[0]\n\t : invokerFns\n\t )\n\t } else {\n\t return (fn._length || fn.length) > 1\n\t }\n\t}", "function getHookArgumentsLength (fn) {\n\t if (isUndef(fn)) {\n\t return false\n\t }\n\t var invokerFns = fn.fns;\n\t if (isDef(invokerFns)) {\n\t // invoker\n\t return getHookArgumentsLength(\n\t Array.isArray(invokerFns)\n\t ? invokerFns[0]\n\t : invokerFns\n\t )\n\t } else {\n\t return (fn._length || fn.length) > 1\n\t }\n\t}", "function getHookArgumentsLength(fn) {\n if (isUndef(fn)) {\n return false;\n }\n var invokerFns = fn.fns;\n if (isDef(invokerFns)) {\n // invoker\n return getHookArgumentsLength(Array.isArray(invokerFns) ? invokerFns[0] : invokerFns);\n } else {\n return (fn._length || fn.length) > 1;\n }\n }", "function getHookArgumentsLength(fn) {\n\t if (isUndef(fn)) {\n\t return false;\n\t }\n\t var invokerFns = fn.fns;\n\t if (isDef(invokerFns)) {\n\t // invoker\n\t return getHookArgumentsLength(Array.isArray(invokerFns) ? invokerFns[0] : invokerFns);\n\t } else {\n\t return (fn._length || fn.length) > 1;\n\t }\n\t}", "function getHookArgumentsLength(fn) {\n\t if (isUndef(fn)) {\n\t return false;\n\t }\n\t var invokerFns = fn.fns;\n\t if (isDef(invokerFns)) {\n\t // invoker\n\t return getHookArgumentsLength(Array.isArray(invokerFns) ? invokerFns[0] : invokerFns);\n\t } else {\n\t return (fn._length || fn.length) > 1;\n\t }\n\t}", "function getHookArgumentsLength (fn) {\n\t if (!fn) { return false }\n\t var invokerFns = fn.fns;\n\t if (invokerFns) {\n\t // invoker\n\t return getHookArgumentsLength(\n\t Array.isArray(invokerFns)\n\t ? invokerFns[0]\n\t : invokerFns\n\t )\n\t } else {\n\t return (fn._length || fn.length) > 1\n\t }\n\t}", "function getHookArgumentsLength (fn) {\n\t if (!fn) { return false }\n\t var invokerFns = fn.fns;\n\t if (invokerFns) {\n\t // invoker\n\t return getHookArgumentsLength(\n\t Array.isArray(invokerFns)\n\t ? invokerFns[0]\n\t : invokerFns\n\t )\n\t } else {\n\t return (fn._length || fn.length) > 1\n\t }\n\t}", "function getHookArgumentsLength(fn) {\n if (isUndef(fn)) {\n return false\n }\n var invokerFns = fn.fns;\n if (isDef(invokerFns)) {\n // invoker\n return getHookArgumentsLength(\n Array.isArray(invokerFns) ?\n invokerFns[0] :\n invokerFns\n )\n } else {\n return (fn._length || fn.length) > 1\n }\n }", "function getHookArgumentsLength(fn) {\n if (isUndef(fn)) {\n return false;\n }\n\n var invokerFns = fn.fns;\n\n if (isDef(invokerFns)) {\n // invoker\n return getHookArgumentsLength(Array.isArray(invokerFns) ? invokerFns[0] : invokerFns);\n } else {\n return (fn._length || fn.length) > 1;\n }\n }" ]
[ "0.62618375", "0.62618375", "0.59820837", "0.5928923", "0.5928923", "0.5928923", "0.5928923", "0.58920735", "0.58920735", "0.5888032", "0.58659106", "0.58659106", "0.58558553", "0.58558553", "0.5846772", "0.583989" ]
0.0
-1
recursively search for possible transition defined inside the component root
function locateNode (vnode) { return vnode.componentInstance && (!vnode.data || !vnode.data.transition) ? locateNode(vnode.componentInstance._vnode) : vnode }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "calculateTransition(transition) {\n // Start in true state so adding transition can make to uncraftable\n const depth = new Depth({value: 0, craftable: true});\n depth.addTransition(transition);\n transition.depth = depth;\n\n if (transition.newActor) {\n this.setObjectDepth(transition.newActor, depth);\n }\n if (transition.newTarget) {\n this.setObjectDepth(transition.newTarget, depth);\n }\n if (transition.newExtraTarget) {\n this.setObjectDepth(transition.newExtraTarget, depth);\n }\n }", "function runTransitionHooks(routes, transition) {\n if (routes.state.path === transition.path)\n return Promise.resolve(); // Nothing to do!\n\n var currentMatches = routes.state.matches;\n var nextMatches = routes.match(transition.path);\n\n warning(\n nextMatches,\n 'No route matches path \"' + transition.path + '\". Make sure you have ' +\n '<Route path=\"' + transition.path + '\"> somewhere in your routes'\n );\n\n if (!nextMatches)\n nextMatches = [];\n\n var fromMatches, toMatches;\n if (currentMatches) {\n updateMatchComponents(currentMatches, routes.refs);\n\n fromMatches = currentMatches.filter(function (match) {\n return !hasMatch(nextMatches, match);\n });\n\n toMatches = nextMatches.filter(function (match) {\n return !hasMatch(currentMatches, match);\n });\n } else {\n fromMatches = [];\n toMatches = nextMatches;\n }\n\n return runTransitionFromHooks(fromMatches, transition).then(function () {\n if (transition.isAborted)\n return; // No need to continue.\n\n return runTransitionToHooks(toMatches, transition).then(function () {\n if (transition.isAborted)\n return; // No need to continue.\n\n var rootMatch = getRootMatch(nextMatches);\n var params = (rootMatch && rootMatch.params) || {};\n var query = Path.extractQuery(transition.path) || {};\n\n return {\n path: transition.path,\n matches: nextMatches,\n activeParams: params,\n activeQuery: query,\n activeRoutes: nextMatches.map(function (match) {\n return match.route;\n })\n };\n });\n });\n}", "function checkTransitionFromHooks(matches, transition) {\n var promise = Promise.resolve();\n\n reversedArray(matches).forEach(function (match) {\n promise = promise.then(function () {\n var handler = match.route.props.handler;\n\n if (!transition.isCancelled && handler.willTransitionFrom)\n return handler.willTransitionFrom(transition, match.component);\n });\n });\n\n return promise;\n}", "function checkTransitionToHooks(matches, transition) {\n var promise = Promise.resolve();\n\n matches.forEach(function (match, index) {\n promise = promise.then(function () {\n var handler = match.route.props.handler;\n\n if (!transition.isCancelled && handler.willTransitionTo)\n return handler.willTransitionTo(transition, match.params);\n });\n });\n\n return promise;\n}", "function step2(map) {\n\tconst root = { name: '/', nodes: [] };\n\treturn (function next(map, parent, level) {\n\t\tObject.keys(map).forEach(key => {\n\t\t\tlet val = map[key];\n\t\t\tlet node = { name: key };\n\t\t\tif (typeof val === 'object') {\n\t\t\t\tnode.nodes = [];\n\t\t\t\tnode.open = level < 1;\n\t\t\t\tnext(val, node, level + 1);\n\t\t\t} else {\n\t\t\t\tnode.src = val;\n\t\t\t}\n\t\t\tparent.nodes.push(node);\n\t\t});\n\t\treturn parent;\n\t})(map, root, 0);\n}", "function syncWithTransition(routes, transition) {\n if (routes.state.path === transition.path)\n return Promise.resolve(); // Nothing to do!\n\n var currentMatches = routes.state.matches;\n var nextMatches = routes.match(transition.path);\n\n warning(\n nextMatches,\n 'No route matches path \"' + transition.path + '\". Make sure you have ' +\n '<Route path=\"' + transition.path + '\"> somewhere in your routes'\n );\n\n if (!nextMatches)\n nextMatches = [];\n\n var fromMatches, toMatches;\n if (currentMatches) {\n updateMatchComponents(currentMatches, routes.refs);\n\n fromMatches = currentMatches.filter(function (match) {\n return !hasMatch(nextMatches, match);\n });\n\n toMatches = nextMatches.filter(function (match) {\n return !hasMatch(currentMatches, match);\n });\n } else {\n fromMatches = [];\n toMatches = nextMatches;\n }\n\n return checkTransitionFromHooks(fromMatches, transition).then(function () {\n if (transition.isCancelled)\n return; // No need to continue.\n\n return checkTransitionToHooks(toMatches, transition).then(function () {\n if (transition.isCancelled)\n return; // No need to continue.\n\n var rootMatch = getRootMatch(nextMatches);\n var params = (rootMatch && rootMatch.params) || {};\n var query = Path.extractQuery(transition.path) || {};\n var state = {\n path: transition.path,\n matches: nextMatches,\n activeParams: params,\n activeQuery: query,\n activeRoutes: nextMatches.map(function (match) {\n return match.route;\n })\n };\n\n // TODO: add functional test\n maybeScrollWindow(routes, toMatches[toMatches.length - 1]);\n routes.setState(state);\n\n return state;\n });\n });\n}", "function connectTransitionGraph() {\n //normalize as with onEntry/onExit\n transitions.forEach(function (t) {\n if (typeof t.onTransition === 'function') {\n t.onTransition = [t.onTransition];\n }\n });\n\n transitions.forEach(function (t) {\n //normalize \"event\" attribute into \"events\" attribute\n if (t.event) {\n t.events = t.event.trim().split(/ +/);\n }\n });\n\n //hook up targets\n transitions.forEach(function (t) {\n if (t.targets || (typeof t.target === 'undefined')) return; //targets have already been set up\n\n if (typeof t.target === 'string') {\n //console.log('here1');\n var target = idToStateMap[t.target];\n if (!target) throw new Error('Unable to find target state with id ' + t.target);\n t.target = target;\n t.targets = [t.target];\n } else if (Array.isArray(t.target)) {\n //console.log('here2');\n t.targets = t.target.map(function (target) {\n if (typeof target === 'string') {\n target = idToStateMap[target];\n if (!target) throw new Error('Unable to find target state with id ' + t.target);\n return target;\n } else {\n return target;\n }\n });\n } else if (typeof t.target === 'object') {\n t.targets = [t.target];\n } else {\n throw new Error('Transition target has unknown type: ' + t.target);\n }\n });\n\n //hook up LCA - optimization\n transitions.forEach(function (t) {\n if (t.targets) t.lcca = getLCCA(t.source, t.targets[0]); //FIXME: we technically do not need to hang onto the lcca. only the scope is used by the algorithm\n\n t.scope = getScope(t);\n //console.log('scope',t.source.id,t.scope.id,t.targets);\n });\n }", "function updateTransitions() {\r\n\r\n if (motion.currentTransition !== nullTransition) {\r\n // is this a new transition?\r\n if (motion.currentTransition.progress === 0) {\r\n // do we have overlapping transitions?\r\n if (motion.currentTransition.lastTransition !== nullTransition) {\r\n // is the last animation for the nested transition the same as the new animation?\r\n if (motion.currentTransition.lastTransition.lastAnimation === avatar.currentAnimation) {\r\n // then sync the nested transition's frequency time wheel for a smooth animation blend\r\n motion.frequencyTimeWheelPos = motion.currentTransition.lastTransition.lastFrequencyTimeWheelPos;\r\n }\r\n }\r\n }\r\n if (motion.currentTransition.updateProgress() === TRANSITION_COMPLETE) {\r\n motion.currentTransition = nullTransition;\r\n }\r\n }\r\n}", "function runTransitionFromHooks(matches, transition) {\n var promise = Promise.resolve();\n\n reversedArray(matches).forEach(function (match) {\n promise = promise.then(function () {\n var handler = match.route.props.handler;\n\n if (!transition.isAborted && handler.willTransitionFrom)\n return handler.willTransitionFrom(transition, match.component);\n });\n });\n\n return promise;\n}", "function findRelatives(event) {\n var relatives = {};\n\n // finds closest parent of match or quantified type, sets ID on relatives object\n var parentID = $(event.toElement).closest('.match, .quantified').attr('id');\n relatives.parentID = parseInt(parentID);\n\n relatives.leftSibID = handlerHelpers.findLeftSibling(event);\n\n if (relatives.leftSibID === undefined && relatives.parentID === undefined){\n console.log('no parent node and no left sibling. Drop the copy and revert. YOU GET NOTHINGGGGG');\n return;\n }\n return relatives;\n }", "function updateTransition() {\r\n\r\n if (motion.currentTransition !== nullTransition) {\r\n\r\n // new transition?\r\n if (motion.currentTransition.progress === 0) {\r\n\r\n // overlapping transitions?\r\n if (motion.currentTransition.lastTransition !== nullTransition) {\r\n\r\n // is the last animation for the nested transition the same as the new animation?\r\n if (motion.currentTransition.lastTransition.lastAnimation === motion.currentAnimation) {\r\n\r\n // sync the nested transitions's frequency time wheel for a smooth animation blend\r\n motion.frequencyTimeWheelPos = motion.currentTransition.lastTransition.lastFrequencyTimeWheelPos;\r\n }\r\n }\r\n\r\n if (motion.currentTransition.lastAnimation === motion.selectedWalk) {\r\n\r\n // decide at which angle we should stop the frequency time wheel\r\n var stopAngle = motion.selectedWalk.calibration.stopAngleForwards;\r\n var percentToMove = 0;\r\n var lastFrequencyTimeWheelPos = motion.currentTransition.lastFrequencyTimeWheelPos;\r\n var lastElapsedFTDegrees = motion.currentTransition.lastElapsedFTDegrees;\r\n\r\n // set the stop angle depending on which quadrant of the walk cycle we are currently in\r\n // and decide whether we need to take an extra step to complete the walk cycle or not\r\n // - currently work in progress\r\n if(lastFrequencyTimeWheelPos <= stopAngle && lastElapsedFTDegrees < 180) {\r\n\r\n // we have not taken a complete step yet, so we do need to do so before stopping\r\n percentToMove = 100;\r\n stopAngle += 180;\r\n\r\n } else if(lastFrequencyTimeWheelPos > stopAngle && lastFrequencyTimeWheelPos <= stopAngle + 90) {\r\n\r\n // take an extra step to complete the walk cycle and stop at the second stop angle\r\n percentToMove = 100;\r\n stopAngle += 180;\r\n\r\n } else if(lastFrequencyTimeWheelPos > stopAngle + 90 && lastFrequencyTimeWheelPos <= stopAngle + 180) {\r\n\r\n // stop on the other foot at the second stop angle for this walk cycle\r\n percentToMove = 0;\r\n if (motion.currentTransition.lastDirection === BACKWARDS) {\r\n\r\n percentToMove = 100;\r\n\r\n } else {\r\n\r\n stopAngle += 180;\r\n }\r\n\r\n } else if(lastFrequencyTimeWheelPos > stopAngle + 180 && lastFrequencyTimeWheelPos <= stopAngle + 270) {\r\n\r\n // take an extra step to complete the walk cycle and stop at the first stop angle\r\n percentToMove = 100;\r\n }\r\n\r\n // set it all in motion\r\n motion.currentTransition.stopAngle = stopAngle;\r\n motion.currentTransition.percentToMove = percentToMove;\r\n }\r\n\r\n } // end if new transition\r\n\r\n // update the Transition progress\r\n if (motion.currentTransition.updateProgress() >= 1) {\r\n\r\n // it's time to kill off this transition\r\n delete motion.currentTransition;\r\n motion.currentTransition = nullTransition;\r\n }\r\n }\r\n}", "_getTransitionHooks(nextState) {\n var { history } = this.context;\n var prevState = this.state;\n var fromRoutes = prevState.branch;\n var toRoutes = nextState.branch;\n\n var hooks = this.transitionHooks.map(function (hook) {\n return hook.bind(this, history, nextState);\n }, this);\n\n if (fromRoutes) {\n function isLeavingRoute(route) {\n return toRoutes.indexOf(route) === -1 || routeParamsChanged(route, prevState, nextState);\n }\n\n var leavingRoutes = [];\n\n fromRoutes.forEach(function (route, index) {\n if (isLeavingRoute(route)) {\n leavingRoutes.push(route);\n\n if (route.onLeave)\n hooks.push(route.onLeave.bind(route, history, nextState));\n }\n });\n\n // Call \"leave\" hooks starting at the leaf route.\n hooks.reverse();\n\n function isEnteringRoute(route) {\n return fromRoutes.indexOf(route) === -1 || leavingRoutes.indexOf(route) !== -1;\n }\n\n toRoutes.forEach(function (route, index) {\n if (isEnteringRoute(route) && route.onEnter)\n hooks.push(route.onEnter.bind(route, history, nextState));\n });\n } else {\n toRoutes.forEach(function (route, index) {\n if (route.onEnter)\n hooks.push(route.onEnter.bind(route, history, nextState));\n });\n }\n\n return hooks;\n }", "function locateNode(vnode) {\n\t return vnode.componentInstance && (!vnode.data || !vnode.data.transition) ? locateNode(vnode.componentInstance._vnode) : vnode;\n\t}", "function locateNode(vnode) {\n\t return vnode.componentInstance && (!vnode.data || !vnode.data.transition) ? locateNode(vnode.componentInstance._vnode) : vnode;\n\t}", "GetComponentsInChildren() {}", "GetComponentsInChildren() {}", "GetComponentsInChildren() {}", "GetComponentsInChildren() {}", "function runTransitionToHooks(matches, transition) {\n var promise = Promise.resolve();\n\n matches.forEach(function (match) {\n promise = promise.then(function () {\n var handler = match.route.props.handler;\n\n if (!transition.isAborted && handler.willTransitionTo)\n return handler.willTransitionTo(transition, match.params);\n });\n });\n\n return promise;\n}", "detectTransitionType(){\n this.getTransitionType()\n this.toggleTransitionClasses()\n }", "function deepNavigation(sections) {\n for (section of sections) {\n Array.isArray(section)\n ? deepNavigation(section)\n : console.log(\"checking \" + section);\n }\n}", "function locateNode(vnode) {\n return vnode.componentInstance && (!vnode.data || !vnode.data.transition) ? locateNode(vnode.componentInstance._vnode) : vnode;\n }", "function locateNode(vnode) {\n return vnode.componentInstance && (!vnode.data || !vnode.data.transition) ? locateNode(vnode.componentInstance._vnode) : vnode;\n }", "preTraverseSceneGraph(rootNode, func) {\n func(rootNode);\n if (!this.gameObjects.has(rootNode)) return; //might have been deleted during execution\n\n let nodeQueue = new Set(this.childrenOf(rootNode)); //shallow copy\n for (let child of nodeQueue) {\n this.preTraverseSceneGraph(child, func);\n }\n }", "function locateNode (vnode) {\n return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n ? locateNode(vnode.componentInstance._vnode)\n : vnode\n }", "function locateNode (vnode) {\n return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n ? locateNode(vnode.componentInstance._vnode)\n : vnode\n }", "function locateNode (vnode) {\n return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n ? locateNode(vnode.componentInstance._vnode)\n : vnode\n }", "function locateNode (vnode) {\n return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n ? locateNode(vnode.componentInstance._vnode)\n : vnode\n }", "detectCycles() {\n\t\t\tconst flatOrder = Array.from(this.orderedNodes);\n\n\t\t\tfor (let i = 0; i < flatOrder.length; i++) {\n\t\t\t\tconst node = flatOrder[i];\n\n\t\t\t\tfor (const imp of node.analyze.value.importFirstUsage) {\n\t\t\t\t\tconst subnode = node.getNodeFromRelativeDependency(imp.source);\n\t\t\t\t\tif (subnode === undefined) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst resolved = subnode.resolveImport(imp.imported, imp.loc);\n\t\t\t\t\tif (resolved.type !== \"FOUND\") {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Hoisted exports will always be accessible\n\t\t\t\t\tif (resolved.record.valueType === \"function\") {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst dep = resolved.node;\n\n\t\t\t\t\tconst isBefore = flatOrder.indexOf(dep) > i;\n\t\t\t\t\tif (isBefore) {\n\t\t\t\t\t\tthis.flagCycle(node, dep, imp);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function getComponents(nextState, callback) { // 26\n _AsyncUtils.mapAsync(nextState.routes, function (route, index, callback) {\n getComponentsForRoute(nextState.location, route, callback); // 28\n }, callback); // 29\n} // 30", "function findpath(u) {\n\tfor (let e = nextedge[u]; e; e = g.nextAt(u,e)) {\n\t\tsteps++;\n\t\tlet v = g.mate(u,e);\n\t\tif (level[v] != level[u] + 1) continue;\n\t\tlet ee = match.at(v);\n\t\tif (ee == 0) { nextedge[u] = e; link[v] = e; return v; }\n\t\tlet w = g.mate(v,ee);\n\t\tif (level[w] != level[v] + 1) continue;\n\t\tlet x = findpath(w);\n\t\tif (x) {\n\t\t\tnextedge[u] = e; link[v] = e; link[w] = ee; return x;\n\t\t}\n\t}\n\tnextedge[u] = 0; return 0;\n}", "function transition(d) {\n\t\t\t\t\tconsole.log(\"--- transition firing with d.name at \" + d .name + \" and d.depth at \" + d.depth);\n\t\t\t\t\t\n\t\t\t\t\tcurrentDepth = d.depth;// gm state test\n\t\t\t\t\tmyData.currentNode = d;//\n\t\t\t\t\tmyData.currentDepth = d.depth;\n\t\t\t\t\t\n\t\t\t\t\tdefaultDuration = 750;\n\t\t\t\t\tnoDuration = 0;\n\t\t\t\t\t\n\t\t\t\t\tif(myData.reset == true){\n\t\t\t\t\t\tcurrentDuration = noDuration;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcurrentDuration = defaultDuration;\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\n\t\t\t\t\t\n\t\t\t\t\tif (transitioning || !d) return;\n\t\t\t\t\t\t\ttransitioning = true;\n\n\t\t\t\t\t\t\tvar g2 = display(d),\n\t\t\t\t\t\t\tt1 = g1.transition().duration(currentDuration),\n\t\t\t\t\t\t\tt2 = g2.transition().duration(currentDuration);\n\n\t\t\t\t\t\t\t// Update the domain only after entering new elements.\n\t\t\t\t\t\t\tx.domain([d.x, d.x + d.dx]);\n\t\t\t\t\t\t\ty.domain([d.y, d.y + d.dy]);\n\n\t\t\t\t\t\t\t// Enable anti-aliasing during the transition.\n\t\t\t\t\t\t\tsvg.style(\"shape-rendering\", null);\n\n\t\t\t\t\t\t\t// Draw child nodes on top of parent nodes.\n\t\t\t\t\t\t\tsvg.selectAll(\".depth\").sort(function(a, b) { return a.depth - b.depth; });\n\n\t\t\t\t\t\t\t// Fade-in entering text.\n\t\t\t\t\t\t\tg2.selectAll(\"text\").style(\"fill-opacity\", 0);\n\t\t\t\t\t\t\tg2.selectAll(\"foreignObject div\").style(\"display\", \"none\"); /*added*/\n\n\t\t\t\t\t\t\t// Transition to the new view.\n\t\t\t\t\t\t\tt1.selectAll(\"text\").call(text).style(\"fill-opacity\", 0);\n\t\t\t\t\t\t\tt2.selectAll(\"text\").call(text).style(\"fill-opacity\", 1);\n\t\t\t\t\t\t\tt1.selectAll(\"rect\").call(rect);\n\t\t\t\t\t\t\tt2.selectAll(\"rect\").call(rect);\n\n\t\t\t\t\t\t\tt1.selectAll(\".textdiv\").style(\"display\", \"none\"); /* added */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//t1.selectAll(\".smalltext\").call(smalltext); /* GM EXPERIMENT */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tt1.selectAll(\".foreignobj\").call(foreign); /* added */\n\t\t\t\t\t\t\tt2.selectAll(\".textdiv\").style(\"display\", \"block\"); /* added */\n\t\t\t\t\t\t\tt2.selectAll(\".amtDisplay\").style(\"display\", \"block\"); /* added */\n\t\t\t\t\t\t\tt2.selectAll(\".foreignobj\").call(foreign); /* added */ \n\n\t\t\t\t\t\t\t// Remove the old node when the transition is finished.\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/**/t1.remove().each(\"end\", function() {\n\t\t\t\t\t\t\t\tsvg.style(\"shape-rendering\", \"crispEdges\");\n\t\t\t\t\t\t\t\ttransitioning = false;\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// G ADD TO RESTORE CLICK FUNCTION?\n\t\t\t\t\t\t\td3.selectAll(\".foreignobj\").style(\"pointer-events\",\"none\")\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\td3.selectAll(\".child\")\n\t\t\t\t\t\t\t\t//d3.selectAll(\".child\").attr(\"width\",\"30px\"); //works\n\t\t\t\t\t\t\t\t\t.on(\"click\", function(d) { \n\t\t\t\t\t\t\t\t\tconsole.log(\"clicked with num children at \" + d.parent.children.length)\n\t\t\t\t\t\t\t\t})*/\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\n\t\t\t\t}", "function walkTreeRecursive($node) {\n\t// try visit me 1st\n\tif ($node[0].count==0 ) {\n\t\t$node[0].count++;\n\t\tif ( !$node.hasClass(abstractClass)) { // $node.hasClass(abstractClass) is an interesting part, bottom up parsing, we see a handle not a top node.\n\t\t\tsetFocus($node);\n\t\t\t_.delay(walkTreeRecursive, calcDelay($node), $node);\n\t\t\treturn ;\n\t\t}\n\t}\n\t// try visit any unvisited children - 1st time\n\tif ( $node[0].children && $node[0].children.length )\n\t\tfor (var i=0; i<$node[0].children.length; i++) \n\t\t{\n\t\t\tif ( $node[0].children[i].count==0 ) {\n\t\t\t\twalkTreeRecursive( $( $node[0].children[i] ) ) ;\n\t\t\t\treturn ;\n\t\t\t}\n\t\t\telse { // so remove focus when we move to sibling, but keep focus if i am last sibling\n\t\t\t\tvar isEdge = i == $node[0].children.length-1; \n\t\t\t\tunfocusDecendantsAndOptionallyLeaves( $($node[0].children[i] ), isEdge );\n\t\t\t}\n\t\t}\n\n\t// try visit myself 2nd time\n\tif ($node[0].count==1 ) {\n\t\t$node[0].count++;\n\t\t//unfocusLeaf($node);\n\t\tvar delay = $node.hasClass(abstractClass) ? calcDelay($node) : 0 ;\n\t\t_.delay(walkTreeRecursive, calcDelay($node), $node.parent());\n\t\treturn ;\n\t}\n\n}", "function locateNode(vnode) {\n return vnode.componentInstance && (!vnode.data || !vnode.data.transition) ? locateNode(vnode.componentInstance._vnode) : vnode;\n}", "function locateNode(vnode) {\n return vnode.componentInstance && (!vnode.data || !vnode.data.transition) ? locateNode(vnode.componentInstance._vnode) : vnode;\n}", "function locateNode(vnode) {\n return vnode.componentInstance && (!vnode.data || !vnode.data.transition) ? locateNode(vnode.componentInstance._vnode) : vnode;\n}", "function locateNode(vnode) {\n return vnode.componentInstance && (!vnode.data || !vnode.data.transition) ? locateNode(vnode.componentInstance._vnode) : vnode;\n}", "function locateNode(vnode) {\n return vnode.componentInstance && (!vnode.data || !vnode.data.transition) ? locateNode(vnode.componentInstance._vnode) : vnode;\n}", "function locateNode(vnode) {\n return vnode.componentInstance && (!vnode.data || !vnode.data.transition) ? locateNode(vnode.componentInstance._vnode) : vnode;\n}", "function locateNode(vnode) {\n return vnode.componentInstance && (!vnode.data || !vnode.data.transition) ? locateNode(vnode.componentInstance._vnode) : vnode;\n}", "function locateNode(vnode) {\n return vnode.componentInstance && (!vnode.data || !vnode.data.transition) ? locateNode(vnode.componentInstance._vnode) : vnode;\n}", "function locateNode(vnode) {\n return vnode.componentInstance && (!vnode.data || !vnode.data.transition) ? locateNode(vnode.componentInstance._vnode) : vnode;\n}", "function locateNode(vnode) {\n return vnode.componentInstance && (!vnode.data || !vnode.data.transition) ? locateNode(vnode.componentInstance._vnode) : vnode;\n}", "function locateNode(vnode) {\n return vnode.componentInstance && (!vnode.data || !vnode.data.transition) ? locateNode(vnode.componentInstance._vnode) : vnode;\n}", "function locateNode(vnode) {\n return vnode.componentInstance && (!vnode.data || !vnode.data.transition) ? locateNode(vnode.componentInstance._vnode) : vnode;\n}", "function locateNode (vnode) {\n return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n ? locateNode(vnode.componentInstance._vnode)\n : vnode\n }", "_updateZIndexAllSiblings() {\n HSystem.updateZIndexOfChildren(this.parent.viewId);\n }", "function traverseTwoPhase(inst,fn,arg){var path=[];while(inst){path.push(inst);inst=getParent(inst);}var i;for(i=path.length;i-->0;){fn(path[i],'captured',arg);}for(i=0;i<path.length;i++){fn(path[i],'bubbled',arg);}}", "function traverseTwoPhase(inst,fn,arg){var path=[];while(inst){path.push(inst);inst=getParent(inst);}var i;for(i=path.length;i-->0;){fn(path[i],'captured',arg);}for(i=0;i<path.length;i++){fn(path[i],'bubbled',arg);}}", "function traverseTwoPhase(inst,fn,arg){var path=[];while(inst){path.push(inst);inst=getParent(inst);}var i;for(i=path.length;i-->0;){fn(path[i],'captured',arg);}for(i=0;i<path.length;i++){fn(path[i],'bubbled',arg);}}", "function traverseTwoPhase(inst,fn,arg){var path=[];while(inst){path.push(inst);inst=getParent(inst);}var i;for(i=path.length;i-->0;){fn(path[i],'captured',arg);}for(i=0;i<path.length;i++){fn(path[i],'bubbled',arg);}}", "function traverseTwoPhase(inst,fn,arg){var path=[];while(inst){path.push(inst);inst=getParent(inst);}var i;for(i=path.length;i-->0;){fn(path[i],'captured',arg);}for(i=0;i<path.length;i++){fn(path[i],'bubbled',arg);}}", "function traverseTwoPhase(inst,fn,arg){var path=[];while(inst){path.push(inst);inst=getParent(inst);}var i;for(i=path.length;i-->0;){fn(path[i],'captured',arg);}for(i=0;i<path.length;i++){fn(path[i],'bubbled',arg);}}", "function locateNode(vnode) {\n\t return vnode.child && (!vnode.data || !vnode.data.transition) ? locateNode(vnode.child._vnode) : vnode;\n\t}", "function callLifecycleHooksChildrenFirst(view,lifecycles){if(!(view.def.nodeFlags&lifecycles)){return;}var nodes=view.def.nodes;var initIndex=0;for(var i=0;i<nodes.length;i++){var nodeDef=nodes[i];var parent_1=nodeDef.parent;if(!parent_1&&nodeDef.flags&lifecycles){// matching root node (e.g. a pipe)\ncallProviderLifecycles(view,i,nodeDef.flags&lifecycles,initIndex++);}if((nodeDef.childFlags&lifecycles)===0){// no child matches one of the lifecycles\ni+=nodeDef.childCount;}while(parent_1&&parent_1.flags&1/* TypeElement */&&i===parent_1.nodeIndex+parent_1.childCount){// last child of an element\nif(parent_1.directChildFlags&lifecycles){initIndex=callElementProvidersLifecycles(view,parent_1,lifecycles,initIndex);}parent_1=parent_1.parent;}}}", "function traverseTwoPhase(inst,fn,arg){var path=[];while(inst){path.push(inst);inst=getParent(inst);}var i=void 0;for(i=path.length;i-->0;){fn(path[i],'captured',arg);}for(i=0;i<path.length;i++){fn(path[i],'bubbled',arg);}}", "function traverseTwoPhase(inst,fn,arg){var path=[];while(inst){path.push(inst);inst=getParent(inst);}var i=void 0;for(i=path.length;i-->0;){fn(path[i],'captured',arg);}for(i=0;i<path.length;i++){fn(path[i],'bubbled',arg);}}", "function traverseTwoPhase(inst,fn,arg){var path=[];while(inst){path.push(inst);inst=getParent(inst);}var i=void 0;for(i=path.length;i-->0;){fn(path[i],'captured',arg);}for(i=0;i<path.length;i++){fn(path[i],'bubbled',arg);}}", "function traverseTwoPhase(inst,fn,arg){var path=[];while(inst){path.push(inst);inst=getParent(inst);}var i=void 0;for(i=path.length;i-->0;){fn(path[i],'captured',arg);}for(i=0;i<path.length;i++){fn(path[i],'bubbled',arg);}}", "function breadth_first_search(initial_state) {\n let open = []; //See push()/pop() and unshift()/shift() to operate like stack or queue\n //https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array\n let closed = new Set(); //https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set\n\n /***Your code for breadth-first search here***/\n let found = false;\n let final;\n\n //if initial_state is goal state then return\n if(is_goal_state(initial_state)){\n return {\n actions : [] /*array of action ids*/,\n states : [] /*array of states*/\n };\n }\n\n //push initial_state\n open.push({\n actionID : 0,\n resultState : initial_state,\n parentState : null\n });\n\n //keep looking for successors until found the goal state\n while(!found){\n let parent = open.shift(); /* open the first one in the open array */\n let childs = find_successors(parent.resultState); /* find its successors */\n while(childs.length != 0){ /* check each child see if it is goal state*/\n if(is_goal_state(childs[0].resultState)){ /*if yes, then exit the loop and go find the path*/\n final = {\n actionID : childs[0].actionID,\n resultState : childs[0].resultState,\n parentState : parent\n }\n found = true;\n }else{ /*if no, then append it to the end of open*/\n open.push({\n actionID : childs[0].actionID,\n resultState : childs[0].resultState,\n parentState : parent\n })\n }\n childs.shift();\n }\n closed.add(parent); /*add parent to close set*/\n }\n\n /*\n Hint: In order to generate the solution path, you will need to augment\n the states to store the predecessor/parent state they were generated from\n and the action that generates the child state from the predecessor state.\n\n\t For example, make a wrapper object that stores the state, predecessor and action.\n\t Javascript objects are easy to make:\n\t\tlet object={\n\t\t\tmember_name1 : value1,\n\t\t\tmember_name2 : value2\n\t\t};\n\n Hint: Because of the way Javascript Set objects handle Javascript objects, you\n will need to insert (and check for) a representative value instead of the state\n object itself. The state_to_uniqueid function has been provided to help you with\n this. For example\n let state=...;\n closed.add(state_to_uniqueid(state)); //Add state to closed set\n if(closed.has(state_to_uniqueid(state))) { ... } //Check if state is in closed set\n */\n\n /***Your code to generate solution path here***/\n let actions = [];\n let states = [];\n let currentState = final;\n // find the path by looping up to the root\n while(currentState.parentState != null){\n actions.unshift(currentState.actionID);\n states.unshift(currentState.resultState);\n currentState = currentState.parentState\n }\n\n if(actions != null){\n return {\n actions : actions /*array of action ids*/,\n states : states /*array of states*/\n };\n }else{\n return null;\n }\n}", "*ancestors() {\r\n let state = this.prev;\r\n while (state != null) {\r\n yield state;\r\n state = state.prev;\r\n }\r\n }", "function traverseLang(trans, path) {\n\n for (var prop in trans) {\n\n if (_typeof(trans[prop]) == \"object\") {\n\n if (!path[prop]) {\n\n path[prop] = {};\n }\n\n traverseLang(trans[prop], path[prop]);\n } else {\n\n path[prop] = trans[prop];\n }\n }\n }", "function locateNode (vnode) {\r\n return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\r\n ? locateNode(vnode.componentInstance._vnode)\r\n : vnode\r\n}", "findSiblings(data,enVal){\n var _list=this.state.displayList;\n var obj=[];\n var _data=data.rel.slice(0,data.rel.lastIndexOf('/'));\n for(var i=0; i<_list.length; i++){\n if(_list[i].rel.slice(0,_list[i].rel.lastIndexOf('/'))===_data && _list[i].rel!==data.rel && _list[i].type===data.type){\n obj.push(_list[i].folder);\n }\n }\n if(obj.length===1 && obj[0]===enVal){\n return false;\n }\n else if(obj.indexOf(enVal)>-1){\n return false;\n }else{\n return true;\n }\n }", "function traverseTwoPhase(inst, fn, arg) {\n\t\t var path = [];\n\t\t while (inst) {\n\t\t path.push(inst);\n\t\t inst = inst._hostParent;\n\t\t }\n\t\t var i;\n\t\t for (i = path.length; i-- > 0;) {\n\t\t fn(path[i], false, arg);\n\t\t }\n\t\t for (i = 0; i < path.length; i++) {\n\t\t fn(path[i], true, arg);\n\t\t }\n\t\t}", "function traverseTwoPhase(inst, fn, arg) {\n\t\t var path = [];\n\t\t while (inst) {\n\t\t path.push(inst);\n\t\t inst = inst._hostParent;\n\t\t }\n\t\t var i;\n\t\t for (i = path.length; i-- > 0;) {\n\t\t fn(path[i], false, arg);\n\t\t }\n\t\t for (i = 0; i < path.length; i++) {\n\t\t fn(path[i], true, arg);\n\t\t }\n\t\t}", "function locateNode (vnode) {\n\t return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n\t ? locateNode(vnode.componentInstance._vnode)\n\t : vnode\n\t}", "function locateNode (vnode) {\n\t return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n\t ? locateNode(vnode.componentInstance._vnode)\n\t : vnode\n\t}", "function locateNode (vnode) {\n\t return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n\t ? locateNode(vnode.componentInstance._vnode)\n\t : vnode\n\t}", "function locateNode (vnode) {\n\t return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n\t ? locateNode(vnode.componentInstance._vnode)\n\t : vnode\n\t}", "function locateNode (vnode) {\n\t return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n\t ? locateNode(vnode.componentInstance._vnode)\n\t : vnode\n\t}", "function locateNode (vnode) {\n\t return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n\t ? locateNode(vnode.componentInstance._vnode)\n\t : vnode\n\t}" ]
[ "0.55722684", "0.5496103", "0.54526746", "0.5379765", "0.5289822", "0.52707857", "0.5268357", "0.52586865", "0.5094728", "0.5027448", "0.500278", "0.50016326", "0.49774256", "0.49774256", "0.49745646", "0.49745646", "0.49745646", "0.49745646", "0.4963759", "0.4952616", "0.49483898", "0.49282205", "0.49282205", "0.49186242", "0.4897797", "0.4897797", "0.4897797", "0.4897797", "0.48724732", "0.48711088", "0.48642036", "0.48614416", "0.48524565", "0.4849448", "0.4849448", "0.4849448", "0.4849448", "0.4849448", "0.4849448", "0.4849448", "0.4849448", "0.4849448", "0.4849448", "0.4849448", "0.4849448", "0.48484367", "0.48465538", "0.48458466", "0.48458466", "0.48458466", "0.48458466", "0.48458466", "0.48458466", "0.48386934", "0.48378888", "0.483516", "0.483516", "0.483516", "0.483516", "0.4835033", "0.48350146", "0.48334283", "0.48292923", "0.48117685", "0.48083654", "0.48083654", "0.48077533", "0.48077533", "0.48077533", "0.48077533", "0.48077533", "0.48077533" ]
0.0
-1
in case the child is also an abstract component, e.g. we want to recursively retrieve the real component to be rendered
function getRealChild (vnode) { var compOptions = vnode && vnode.componentOptions; if (compOptions && compOptions.Ctor.options.abstract) { return getRealChild(getFirstComponentChild(compOptions.children)) } else { return vnode } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getRealChild(vnode){var compOptions=vnode&&vnode.componentOptions;if(compOptions&&compOptions.Ctor.options.abstract){return getRealChild(getFirstComponentChild(compOptions.children));}else{return vnode;}}", "function getRealChild(vnode){var compOptions=vnode&&vnode.componentOptions;if(compOptions&&compOptions.Ctor.options.abstract){return getRealChild(getFirstComponentChild(compOptions.children));}else{return vnode;}}", "function getRealChild(vnode){var compOptions=vnode&&vnode.componentOptions;if(compOptions&&compOptions.Ctor.options.abstract){return getRealChild(getFirstComponentChild(compOptions.children));}else{return vnode;}}", "function getRealChild (vnode) {\n var compOptions = vnode && vnode.componentOptions;\n if (compOptions && compOptions.Ctor.options.abstract) {\n return getRealChild(getFirstComponentChild(compOptions.children))\n } else {\n return vnode\n }\n }", "function getRealChild (vnode) {\n var compOptions = vnode && vnode.componentOptions;\n if (compOptions && compOptions.Ctor.options.abstract) {\n return getRealChild(getFirstComponentChild(compOptions.children))\n } else {\n return vnode\n }\n }", "function getRealChild (vnode) {\n var compOptions = vnode && vnode.componentOptions;\n if (compOptions && compOptions.Ctor.options.abstract) {\n return getRealChild(getFirstComponentChild(compOptions.children))\n } else {\n return vnode\n }\n }", "function getRealChild (vnode) {\n var compOptions = vnode && vnode.componentOptions;\n if (compOptions && compOptions.Ctor.options.abstract) {\n return getRealChild(getFirstComponentChild(compOptions.children))\n } else {\n return vnode\n }\n }", "function getRealChild (vnode) {\n var compOptions = vnode && vnode.componentOptions;\n if (compOptions && compOptions.Ctor.options.abstract) {\n return getRealChild(getFirstComponentChild(compOptions.children))\n } else {\n return vnode\n }\n }", "function getRealChild(vnode) {\n\t\t var compOptions = vnode && vnode.componentOptions;\n\t\t if (compOptions && compOptions.Ctor.options._abstract) {\n\t\t return getRealChild(compOptions.propsData && compOptions.propsData.child);\n\t\t } else {\n\t\t return vnode;\n\t\t }\n\t\t}", "function getRealChild(vnode) {\n var compOptions = vnode && vnode.componentOptions;\n if (compOptions && compOptions.Ctor.options.abstract) {\n return getRealChild(getFirstComponentChild(compOptions.children));\n } else {\n return vnode;\n }\n }", "function getRealChild (vnode) {\n\t var compOptions = vnode && vnode.componentOptions\n\t if (compOptions && compOptions.Ctor.options.abstract) {\n\t return getRealChild(getFirstComponentChild(compOptions.children))\n\t } else {\n\t return vnode\n\t }\n\t}", "function getRealChild (vnode) {\r\n var compOptions = vnode && vnode.componentOptions;\r\n if (compOptions && compOptions.Ctor.options.abstract) {\r\n return getRealChild(getFirstComponentChild(compOptions.children))\r\n } else {\r\n return vnode\r\n }\r\n}", "function getRealChild (vnode) {\n\t var compOptions = vnode && vnode.componentOptions;\n\t if (compOptions && compOptions.Ctor.options.abstract) {\n\t return getRealChild(getFirstComponentChild(compOptions.children))\n\t } else {\n\t return vnode\n\t }\n\t}", "function getRealChild (vnode) {\n\t var compOptions = vnode && vnode.componentOptions;\n\t if (compOptions && compOptions.Ctor.options.abstract) {\n\t return getRealChild(getFirstComponentChild(compOptions.children))\n\t } else {\n\t return vnode\n\t }\n\t}", "function getRealChild (vnode) {\n\t var compOptions = vnode && vnode.componentOptions;\n\t if (compOptions && compOptions.Ctor.options.abstract) {\n\t return getRealChild(getFirstComponentChild(compOptions.children))\n\t } else {\n\t return vnode\n\t }\n\t}", "function getRealChild (vnode) {\n\t var compOptions = vnode && vnode.componentOptions;\n\t if (compOptions && compOptions.Ctor.options.abstract) {\n\t return getRealChild(getFirstComponentChild(compOptions.children))\n\t } else {\n\t return vnode\n\t }\n\t}", "function getRealChild (vnode) {\n\t var compOptions = vnode && vnode.componentOptions;\n\t if (compOptions && compOptions.Ctor.options.abstract) {\n\t return getRealChild(getFirstComponentChild(compOptions.children))\n\t } else {\n\t return vnode\n\t }\n\t}", "function getRealChild (vnode) {\n\t var compOptions = vnode && vnode.componentOptions;\n\t if (compOptions && compOptions.Ctor.options.abstract) {\n\t return getRealChild(getFirstComponentChild(compOptions.children))\n\t } else {\n\t return vnode\n\t }\n\t}", "function getRealChild (vnode) {\n\t var compOptions = vnode && vnode.componentOptions;\n\t if (compOptions && compOptions.Ctor.options.abstract) {\n\t return getRealChild(getFirstComponentChild(compOptions.children))\n\t } else {\n\t return vnode\n\t }\n\t}", "function getRealChild (vnode) {\n\t var compOptions = vnode && vnode.componentOptions;\n\t if (compOptions && compOptions.Ctor.options.abstract) {\n\t return getRealChild(getFirstComponentChild(compOptions.children))\n\t } else {\n\t return vnode\n\t }\n\t}", "function getRealChild(vnode) {\n var compOptions = vnode && vnode.componentOptions;\n\n if (compOptions && compOptions.Ctor.options[\"abstract\"]) {\n return getRealChild(getFirstComponentChild(compOptions.children));\n } else {\n return vnode;\n }\n }" ]
[ "0.7714982", "0.7714982", "0.7714982", "0.7405274", "0.7405274", "0.7405274", "0.7405274", "0.7385101", "0.7339899", "0.7311697", "0.7305101", "0.73004496", "0.72857636", "0.72857636", "0.72857636", "0.72857636", "0.72857636", "0.72857636", "0.72857636", "0.72857636", "0.72682256" ]
0.0
-1
wrapper for elt, which removes the elt from the accessibility tree
function eltP(tag, content, className, style) { var e = elt(tag, content, className, style); e.setAttribute("role", "presentation"); return e }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removeElement() {\n this.el.parentNode.removeChild(this.el);\n }", "function removeElement(elem){ if (elem) elem.parentNode.removeChild(elem) }", "function removeElement(elem){ if (elem) elem.parentNode.removeChild(elem) }", "@chained\n\tremove() {\n\t\tlet parent = this.element.parentNode;\n\t\tparent.removeChild(this.element);\n\t}", "function removeElement(element) {\n\n element.outerHTML = \"\";\n delete element;\n\n}", "static deleteDomElement(element) {\n element.parentNode.removeChild(element);\n }", "function remove(el) {\r\n el.parentNode.removeChild(el);\r\n }", "function removeElement (el) {\n if (el.parentNode) {\n el.parentNode.removeChild(el);\n }\n }", "function removeElement(elm) {\n elm.parentNode.removeChild(elm);\n}", "static removeBook(el) {\n el.parentElement.parentElement.parentElement.remove();\n }", "remove() {\n this.#el.remove();\n }", "delete () {\n this.element = this.element.delete(this)\n }", "remove() {\n this.element.remove();\n }", "function removeElement(elem) {\r\n\telem.parentNode.removeChild(elem);\r\n}", "removeBook(ele){\n ele.parentNode.parentNode.remove();\n }", "function removeElement(elem) {\n\telem.parentNode.removeChild(elem);\n}", "function remove(el) {\n var parent = el.parentNode;\n\n if (parent) {\n parent.removeChild(el);\n }\n } // @function empty(el: HTMLElement)", "function apagarButton(element) {\n console.log(element);\n element.parentNode.parentNode.remove();\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 }", "remove() {\n try { this.element.remove(); }\n catch (e) {}\n }", "function unrefElement(elRef) {\n var _a, _b;\n\n const plain = unref(elRef);\n return (_b = (_a = plain) === null || _a === void 0 ? void 0 : _a.$el) !== null && _b !== void 0 ? _b : plain;\n}", "unregister(element) {\n const set = this.getSet(element.name);\n set.set.delete(element);\n set.ordered = null;\n if (set.selected == element) {\n set.selected = null;\n }\n }", "remove () {\n $(this.element).remove ();\n }", "function mg_exit_and_remove (elem) {\n elem.exit().remove();\n}", "function removeElement(el) {\n if (typeof el.remove !== 'undefined') {\n el.remove()\n } else {\n el.parentNode.removeChild(el)\n }\n}", "removeElement(element) {\n this.node.removeChild(element.node);\n return this;\n }", "function removeElement(elem){if(elem.prev)elem.prev.next=elem.next;if(elem.next)elem.next.prev=elem.prev;if(elem.parent){var childs=elem.parent.children;childs.splice(childs.lastIndexOf(elem),1);}}", "domRemoveChildren(el) {\n if (!el) return;\n while (el.firstChild) {\n el.firstChild.remove();\n };\n }", "function removeElement(elem) {\n if (elem.prev) elem.prev.next = elem.next;\n if (elem.next) elem.next.prev = elem.prev;\n if (elem.parent) {\n var childs = elem.parent.children;\n childs.splice(childs.lastIndexOf(elem), 1);\n }\n }", "unmount() {\n let el;\n\n try {\n el = this.el;\n } catch (error) {\n return;\n }\n\n if (el.parentNode) {\n el.parentNode.removeChild(this.el); // use removeChild for IE11 support\n }\n }", "function removeElement(element) {\n\t element && element.parentNode && element.parentNode.removeChild(element);\n\t }", "function removeElement(element) {\n\t element && element.parentNode && element.parentNode.removeChild(element);\n\t }", "function removeElement(element) {\n\t element && element.parentNode && element.parentNode.removeChild(element);\n\t }", "function removeElement(element) {\n\t element && element.parentNode && element.parentNode.removeChild(element);\n\t }", "function remove(element) {\n element.parentNode.removeChild(element);\n\n}", "function del(elt) {\n //if the element is a garden with plants, remove the plants from local storage first\n if (elt.id[0] === \"g\") {\n let plants = elt.getElementsByTagName(\"g\");\n for (let i = 0, len = plants.length; i < len; i++) {\n removeFromLocalStorage(plants[i].id);\n }\n }\n //next remove the element from html (if a garden, plants will be deleted as part of garden's group)\n elt.parentElement.removeChild(elt);\n //finally, remove the element from local storage\n removeFromLocalStorage(elt.id);\n}", "delete() {\n this.eachElem((node) => {\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n });\n }", "delete() {\n this.eachElem((node) => {\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n });\n }", "function apagarButton(element) {\n element.parentNode.parentNode.remove();\n}", "function removeElement() {\n if(this instanceof HTMLCollection || this instanceof NodeList) {\n for(var i = 0; i < this.length; i++) {\n this[i].parentNode.removeChild(this);\n }\n }\n else if(this instanceof HTMLElement) {\n this.parentNode.removeChild(this);\n }\n }", "function detachElement(element, opts) {\n if (element[0].parentNode === opts.parent[0]) {\n opts.parent[0].removeChild(element[0]);\n }\n }", "function deleteElement(element){\n\t\tvar deleted = null;\n\t\tvar dc = element.dotComponent;\n\t\tif(dc){\n\t\t\tvar d = dc.__prms.deleting;\n\t\t\td && d.apply(dc);\n\t\t\tdc.$el = null;\n\t\t\tdeleted = dc.__prms.deleted;\n\t\t}\n\t\tif(element.parentNode) element.parentNode.removeChild(element);\n\t\tdeleted && deleted.apply(dc);\n\t}", "del(_id) {\n const _elem = this._elements[_id];\n const i = this._elemTodo.indexOf(_id);\n if (i !== -1) {\n this._elemTodo.splice(i, 1);\n }\n delete this._styleCache[_id];\n delete this._elemTodoH[_id];\n delete this._elements[_id];\n this._freeElemIds.push(_id);\n const _parent = _elem.parentNode;\n if (_parent) {\n _parent.removeChild(_elem);\n }\n else {\n console.warn('ELEM.del(', _id,\n '): Invalid parent: ', _parent,\n 'for elem:', _elem);\n }\n }", "del(_id) {\n const _elem = this._elements[_id];\n const i = this._elemTodo.indexOf(_id);\n if (i !== -1) {\n this._elemTodo.splice(i, 1);\n }\n delete this._styleCache[_id];\n delete this._elemTodoH[_id];\n delete this._elements[_id];\n this._freeElemIds.push(_id);\n const _parent = _elem.parentNode;\n if (_parent) {\n _parent.removeChild(_elem);\n }\n else {\n console.warn('ELEM.del(', _id,\n '): Invalid parent: ', _parent,\n 'for elem:', _elem);\n }\n }", "remove() { this.tooltip.remove(); this.element.remove(); }", "destroy() {\r\n if (this.parent.contains(this.elem)) this.parent.removeChild(this.elem);\r\n }", "function removeItem(element){\n \n}", "function unrefElement(elRef) {\n var _a;\n var plain = (0,_resolveUnref__WEBPACK_IMPORTED_MODULE_0__.resolveUnref)(elRef);\n return (_a = plain === null || plain === void 0 ? void 0 : plain.$el) !== null && _a !== void 0 ? _a : plain;\n}", "function removeAttr(elem, attrib) {\r\n elem.removeAttr(attrib);\r\n }", "remove() {\r\n manipulation_1.removeClausedNodeChild(this);\r\n }", "function removeElement(element) {\n element.parentNode.removeChild(element);\n}", "function deleteItem(element){\n element.parentNode.remove();\n}", "remove() {\n\t\tthis.outerElement.style.display = \"none\";\n\t\tthis.removed = true;\n\t}", "function delme() { this.parentNode.removeChild(this);\t}", "function removeElement(elem) {\n if (elem.prev)\n elem.prev.next = elem.next;\n if (elem.next)\n elem.next.prev = elem.prev;\n if (elem.parent) {\n var childs = elem.parent.children;\n childs.splice(childs.lastIndexOf(elem), 1);\n }\n}", "function removeElement(element) {\n element.parentElement.removeChild(element);\n}", "remove() {\n this.node.remove()\n }", "function eliminar(elemento){\n elemento.parentNode.remove();\n}", "function it(e){e.parent=null,ae(e)}", "function removeTreeFromElement()/*: void*/ {\n this.emitSync(\"willDetachFromParent\");\n this[_renderElement].removeChild(this.elementTree);\n this[_renderElement] = null;\n this[_attached] = false;\n this.emit(\"didDetachFromParent\");\n}", "cleanup() {\n this.element.parentNode.removeChild(this.element);\n removeDot(this.id);\n }", "function removeElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }", "function removeElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }", "function removeElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }", "function removeElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }", "function removeElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }", "function removeElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }", "function removeElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }", "function removeElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }", "function removeElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }", "function removeElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }", "function removeElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }", "function removeElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }", "function removeElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }", "function removeElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }", "function removeElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }", "function removeElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }", "function removeElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }", "function removeElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }", "function removeElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }", "function removeElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }", "function removeElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }", "function removeElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }", "function removeElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }", "function removeElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }", "function removeElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }", "function removeElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }", "function removeElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }", "function removeElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }", "function removeElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }", "function removeElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }", "function removeElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }", "function removeElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }", "function removeElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }", "function removeElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }", "function removeElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }", "function removeElement(evt) {\n selectedElement = evt.target.parentElement;\n selectedElement.remove();\n}", "function deleteElement(element){\n\telement.parentNode.remove(element.parentElement);\n}", "function removeTooltip() { \n element.removeAttribute( ariaDescribedBy )\n ops.container.removeChild( tooltip )\n timer = null\n }", "function clearSetElement(elem) {\n jQTE.find(elem).each(function () {\n $(this).before($(this).html()).remove();\n });\n }", "function _remElement(elm)\r\n{\r\n while (elm.childNodes.length > 0)\r\n {\r\n _remEle(elm.childNodes[elm.childNodes.length - 1]);\r\n }\r\n}" ]
[ "0.66243064", "0.66047394", "0.66047394", "0.65733343", "0.6453954", "0.6365628", "0.630967", "0.6300336", "0.62783736", "0.6265986", "0.6222522", "0.621535", "0.6156153", "0.61448133", "0.61276156", "0.61124647", "0.60432553", "0.60168844", "0.60155696", "0.6015051", "0.6008057", "0.599912", "0.5995276", "0.59816", "0.59793746", "0.5953624", "0.59515005", "0.59410834", "0.59285665", "0.5916691", "0.5913174", "0.5913174", "0.5913174", "0.5913174", "0.5902275", "0.58873135", "0.5882732", "0.5882732", "0.5863593", "0.5860625", "0.58371854", "0.58294046", "0.5828528", "0.5828528", "0.58285046", "0.5823341", "0.5810958", "0.5808275", "0.58073014", "0.5805621", "0.58042604", "0.57903874", "0.57789296", "0.57769364", "0.5748075", "0.574781", "0.5746223", "0.57349443", "0.5725766", "0.5721056", "0.571058", "0.57075274", "0.57075274", "0.57075274", "0.57075274", "0.57075274", "0.57075274", "0.57075274", "0.57075274", "0.57075274", "0.57075274", "0.57075274", "0.57075274", "0.57075274", "0.57075274", "0.57075274", "0.57075274", "0.57075274", "0.57075274", "0.57075274", "0.57075274", "0.57075274", "0.57075274", "0.57075274", "0.57075274", "0.57075274", "0.57075274", "0.57075274", "0.57075274", "0.57075274", "0.57075274", "0.57075274", "0.57075274", "0.57075274", "0.57075274", "0.57075274", "0.57073474", "0.5703505", "0.5702405", "0.57022315", "0.5700373" ]
0.0
-1
Counts the column offset in a string, taking tabs into account. Used mostly to find indentation.
function countColumn(string, end, tabSize, startIndex, startValue) { if (end == null) { end = string.search(/[^\s\u00a0]/); if (end == -1) { end = string.length; } } for (var i = startIndex || 0, n = startValue || 0;;) { var nextTab = string.indexOf("\t", i); if (nextTab < 0 || nextTab >= end) { return n + (end - i) } n += nextTab - i; n += tabSize - (n % tabSize); i = nextTab + 1; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function countColumn(string, end, tabSize) {\n if (end == null) {\n end = string.search(/[^\\s\\u00a0]/);\n if (end == -1) end = string.length;\n }\n for (var i = 0, n = 0; i < end; ++i) {\n if (string.charAt(i) == \"\\t\") n += tabSize - (n % tabSize);\n else ++n;\n }\n return n;\n }", "function countColumn(string, end, tabSize) {\n if (end == null) {\n end = string.search(/[^\\s\\u00a0]/);\n if (end == -1) end = string.length;\n }\n for (var i = 0, n = 0; i < end; ++i) {\n if (string.charAt(i) == \"\\t\") n += tabSize - (n % tabSize);\n else ++n;\n }\n return n;\n }", "function countColumn(string, end, tabSize) {\n if (end == null) {\n end = string.search(/[^\\s\\u00a0]/);\n if (end == -1) end = string.length;\n }\n for (var i = 0, n = 0; i < end; ++i) {\n if (string.charAt(i) == \"\\t\") n += tabSize - (n % tabSize);\n else ++n;\n }\n return n;\n }", "function countColumn(string, end, tabSize) {\n if (end == null) {\n end = string.search(/[^\\s\\u00a0]/);\n if (end == -1) end = string.length;\n }\n for (var i = 0, n = 0; i < end; ++i) {\n if (string.charAt(i) == \"\\t\") n += tabSize - (n % tabSize);\n else ++n;\n }\n return n;\n }", "function countColumn(string, end, tabSize) {\n if (end == null) {\n end = string.search(/[^\\s\\u00a0]/);\n if (end == -1) end = string.length;\n }\n for (var i = 0, n = 0; i < end; ++i) {\n if (string.charAt(i) == \"\\t\") n += tabSize - (n % tabSize);\n else ++n;\n }\n return n;\n }", "function countColumn(string, end, tabSize) {\n if (end == null) {\n end = string.search(/[^\\s\\u00a0]/);\n if (end == -1) end = string.length;\n }\n for (var i = 0, n = 0; i < end; ++i) {\n if (string.charAt(i) == \"\\t\") n += tabSize - (n % tabSize);\n else ++n;\n }\n return n;\n }", "function countColumn(string, end) {\n if (end == null) {\n end = string.search(/[^\\s\\u00a0]/);\n if (end == -1) end = string.length;\n }\n for (var i = 0, n = 0; i < end; ++i) {\n if (string.charAt(i) == \"\\t\") n += tabSize - (n % tabSize);\n else ++n;\n }\n return n;\n }", "function countColumn(string, end) {\n if (end == null) {\n end = string.search(/[^\\s\\u00a0]/);\n if (end == -1) end = string.length;\n }\n for (var i = 0, n = 0; i < end; ++i) {\n if (string.charAt(i) == \"\\t\") n += tabSize - (n % tabSize);\n else ++n;\n }\n return n;\n }", "function countColumn(string, end) {\n if (end == null) {\n end = string.search(/[^\\s\\u00a0]/);\n if (end == -1) end = string.length;\n }\n for (var i = 0, n = 0; i < end; ++i) {\n if (string.charAt(i) == \"\\t\") n += tabSize - (n % tabSize);\n else ++n;\n }\n return n;\n }", "function countColumn(string, end, tabSize, startIndex, startValue) {\n if (end == null) {\n end = string.search(/[^\\s\\u00a0]/);\n if (end == -1) end = string.length;\n }\n for (var i = startIndex || 0, n = startValue || 0; i < end; ++i) {\n if (string.charAt(i) == \"\\t\") n += tabSize - (n % tabSize);\n else ++n;\n }\n return n;\n }", "function countColumn(string, end, tabSize, startIndex, startValue) {\n if (end == null) {\n end = string.search(/[^\\s\\u00a0]/);\n if (end == -1) end = string.length;\n }\n for (var i = startIndex || 0, n = startValue || 0; i < end; ++i) {\n if (string.charAt(i) == \"\\t\") n += tabSize - (n % tabSize);\n else ++n;\n }\n return n;\n }", "function countColumn(string, end, tabSize, startIndex, startValue) {\n if (end == null) {\n end = string.search(/[^\\s\\u00a0]/);\n if (end == -1) end = string.length;\n }\n for (var i = startIndex || 0, n = startValue || 0; i < end; ++i) {\n if (string.charAt(i) == \"\\t\") n += tabSize - (n % tabSize);\n else ++n;\n }\n return n;\n }", "function countColumn(string, end, tabSize, startIndex, startValue) {\n if (end == null) {\n end = string.search(/[^\\s\\u00a0]/);\n if (end == -1) end = string.length;\n }\n for (var i = startIndex || 0, n = startValue || 0; i < end; ++i) {\n if (string.charAt(i) == \"\\t\") n += tabSize - (n % tabSize);\n else ++n;\n }\n return n;\n }", "function countCol(string, end, tabSize, startIndex = 0, startValue = 0) {\n if (end == null) {\n end = string.search(/[^\\s\\u00a0]/);\n if (end == -1)\n end = string.length;\n }\n let n = startValue;\n for (let i = startIndex; i < end; i++) {\n if (string.charCodeAt(i) == 9)\n n += tabSize - (n % tabSize);\n else\n n++;\n }\n return n;\n}", "function countColumn(string, end, tabSize, startIndex, startValue) {\n if (end == null) {\n end = string.search(/[^\\s\\u00a0]/)\n if (end == -1) { end = string.length }\n }\n for (var i = startIndex || 0, n = startValue || 0;;) {\n var nextTab = string.indexOf(\"\\t\", i)\n if (nextTab < 0 || nextTab >= end)\n { return n + (end - i) }\n n += nextTab - i\n n += tabSize - (n % tabSize)\n i = nextTab + 1\n }\n}", "function countColumn(string, end, tabSize, startIndex, startValue) {\n if (end == null) {\n end = string.search(/[^\\s\\u00a0]/)\n if (end == -1) { end = string.length }\n }\n for (var i = startIndex || 0, n = startValue || 0;;) {\n var nextTab = string.indexOf(\"\\t\", i)\n if (nextTab < 0 || nextTab >= end)\n { return n + (end - i) }\n n += nextTab - i\n n += tabSize - (n % tabSize)\n i = nextTab + 1\n }\n}", "function countColumn(string, end, tabSize, startIndex, startValue) {\n\t\t if (end == null) {\n\t\t end = string.search(/[^\\s\\u00a0]/);\n\t\t if (end == -1) { end = string.length; }\n\t\t }\n\t\t for (var i = startIndex || 0, n = startValue || 0;;) {\n\t\t var nextTab = string.indexOf(\"\\t\", i);\n\t\t if (nextTab < 0 || nextTab >= end)\n\t\t { return n + (end - i) }\n\t\t n += nextTab - i;\n\t\t n += tabSize - (n % tabSize);\n\t\t i = nextTab + 1;\n\t\t }\n\t\t }", "function countColumn(string, end, tabSize, startIndex, startValue) {\n if (end == null) {\n end = string.search(/[^\\s\\u00a0]/);\n\n if (end == -1) {\n end = string.length;\n }\n }\n\n for (var i = startIndex || 0, n = startValue || 0;;) {\n var nextTab = string.indexOf(\"\\t\", i);\n\n if (nextTab < 0 || nextTab >= end) {\n return n + (end - i);\n }\n\n n += nextTab - i;\n n += tabSize - n % tabSize;\n i = nextTab + 1;\n }\n }", "function countColumn(string, end, tabSize, startIndex, startValue) {\n if (end == null) {\n end = string.search(/[^\\s\\u00a0]/);\n if (end == -1) { end = string.length; }\n }\n for (var i = startIndex || 0, n = startValue || 0;;) {\n var nextTab = string.indexOf(\"\\t\", i);\n if (nextTab < 0 || nextTab >= end)\n { return n + (end - i) }\n n += nextTab - i;\n n += tabSize - (n % tabSize);\n i = nextTab + 1;\n }\n}", "function countColumn(string, end, tabSize, startIndex, startValue) {\n if (end == null) {\n end = string.search(/[^\\s\\u00a0]/);\n if (end == -1) { end = string.length; }\n }\n for (var i = startIndex || 0, n = startValue || 0;;) {\n var nextTab = string.indexOf(\"\\t\", i);\n if (nextTab < 0 || nextTab >= end)\n { return n + (end - i) }\n n += nextTab - i;\n n += tabSize - (n % tabSize);\n i = nextTab + 1;\n }\n}", "function countColumn(string, end, tabSize, startIndex, startValue) {\n if (end == null) {\n end = string.search(/[^\\s\\u00a0]/);\n if (end == -1) { end = string.length; }\n }\n for (var i = startIndex || 0, n = startValue || 0;;) {\n var nextTab = string.indexOf(\"\\t\", i);\n if (nextTab < 0 || nextTab >= end)\n { return n + (end - i) }\n n += nextTab - i;\n n += tabSize - (n % tabSize);\n i = nextTab + 1;\n }\n}", "function countColumn(string, end, tabSize, startIndex, startValue) {\n if (end == null) {\n end = string.search(/[^\\s\\u00a0]/);\n if (end == -1) { end = string.length; }\n }\n for (var i = startIndex || 0, n = startValue || 0;;) {\n var nextTab = string.indexOf(\"\\t\", i);\n if (nextTab < 0 || nextTab >= end)\n { return n + (end - i) }\n n += nextTab - i;\n n += tabSize - (n % tabSize);\n i = nextTab + 1;\n }\n}", "function countColumn(string, end, tabSize, startIndex, startValue) {\n if (end == null) {\n end = string.search(/[^\\s\\u00a0]/);\n if (end == -1) { end = string.length; }\n }\n for (var i = startIndex || 0, n = startValue || 0;;) {\n var nextTab = string.indexOf(\"\\t\", i);\n if (nextTab < 0 || nextTab >= end)\n { return n + (end - i) }\n n += nextTab - i;\n n += tabSize - (n % tabSize);\n i = nextTab + 1;\n }\n}", "function countColumn(string, end, tabSize, startIndex, startValue) {\n if (end == null) {\n end = string.search(/[^\\s\\u00a0]/);\n if (end == -1) { end = string.length; }\n }\n for (var i = startIndex || 0, n = startValue || 0;;) {\n var nextTab = string.indexOf(\"\\t\", i);\n if (nextTab < 0 || nextTab >= end)\n { return n + (end - i) }\n n += nextTab - i;\n n += tabSize - (n % tabSize);\n i = nextTab + 1;\n }\n}", "function countColumn(string, end, tabSize, startIndex, startValue) {\n if (end == null) {\n end = string.search(/[^\\s\\u00a0]/);\n if (end == -1) { end = string.length; }\n }\n for (var i = startIndex || 0, n = startValue || 0;;) {\n var nextTab = string.indexOf(\"\\t\", i);\n if (nextTab < 0 || nextTab >= end)\n { return n + (end - i) }\n n += nextTab - i;\n n += tabSize - (n % tabSize);\n i = nextTab + 1;\n }\n}", "function countColumn(string, end, tabSize, startIndex, startValue) {\n if (end == null) {\n end = string.search(/[^\\s\\u00a0]/);\n if (end == -1) { end = string.length; }\n }\n for (var i = startIndex || 0, n = startValue || 0;;) {\n var nextTab = string.indexOf(\"\\t\", i);\n if (nextTab < 0 || nextTab >= end)\n { return n + (end - i) }\n n += nextTab - i;\n n += tabSize - (n % tabSize);\n i = nextTab + 1;\n }\n}", "function countColumn(string, end, tabSize, startIndex, startValue) {\n if (end == null) {\n end = string.search(/[^\\s\\u00a0]/);\n if (end == -1) { end = string.length; }\n }\n for (var i = startIndex || 0, n = startValue || 0;;) {\n var nextTab = string.indexOf(\"\\t\", i);\n if (nextTab < 0 || nextTab >= end)\n { return n + (end - i) }\n n += nextTab - i;\n n += tabSize - (n % tabSize);\n i = nextTab + 1;\n }\n}", "function countColumn(string, end, tabSize, startIndex, startValue) {\n if (end == null) {\n end = string.search(/[^\\s\\u00a0]/);\n if (end == -1) { end = string.length; }\n }\n for (var i = startIndex || 0, n = startValue || 0;;) {\n var nextTab = string.indexOf(\"\\t\", i);\n if (nextTab < 0 || nextTab >= end)\n { return n + (end - i) }\n n += nextTab - i;\n n += tabSize - (n % tabSize);\n i = nextTab + 1;\n }\n}", "function countColumn(string, end, tabSize, startIndex, startValue) {\n if (end == null) {\n end = string.search(/[^\\s\\u00a0]/);\n if (end == -1) { end = string.length; }\n }\n for (var i = startIndex || 0, n = startValue || 0;;) {\n var nextTab = string.indexOf(\"\\t\", i);\n if (nextTab < 0 || nextTab >= end)\n { return n + (end - i) }\n n += nextTab - i;\n n += tabSize - (n % tabSize);\n i = nextTab + 1;\n }\n}", "function countColumn(string, end, tabSize, startIndex, startValue) {\r\n if (end == null) {\r\n end = string.search(/[^\\s\\u00a0]/);\r\n if (end == -1) { end = string.length; }\r\n }\r\n for (var i = startIndex || 0, n = startValue || 0;;) {\r\n var nextTab = string.indexOf(\"\\t\", i);\r\n if (nextTab < 0 || nextTab >= end)\r\n { return n + (end - i) }\r\n n += nextTab - i;\r\n n += tabSize - (n % tabSize);\r\n i = nextTab + 1;\r\n }\r\n}", "function count_column( string, end, tabSize, startIndex, startValue )\n{\n var i, n, nextTab;\n if ( null == end )\n {\n end = string.search( Stream.$NONSPC$ );\n if ( -1 == end ) end = string.length;\n }\n for (i=startIndex||0,n=startValue||0 ;;)\n {\n nextTab = string.indexOf( \"\\t\", i );\n if ( nextTab < 0 || nextTab >= end ) return n + (end - i);\n n += nextTab - i;\n n += tabSize - (n % tabSize);\n i = nextTab + 1;\n }\n}", "function count_column( string, end, tabSize, startIndex, startValue )\n{\n var i, n, nextTab;\n if ( null == end )\n {\n end = string.search( Stream.$NONSPC$ );\n if ( -1 == end ) end = string.length;\n }\n for (i=startIndex||0,n=startValue||0 ;;)\n {\n nextTab = string.indexOf( \"\\t\", i );\n if ( nextTab < 0 || nextTab >= end ) return n + (end - i);\n n += nextTab - i;\n n += tabSize - (n % tabSize);\n i = nextTab + 1;\n }\n}", "function countColumn(string, tabSize, to = string.length) {\n let n = 0;\n for (let i = 0; i < to;) {\n if (string.charCodeAt(i) == 9) {\n n += tabSize - (n % tabSize);\n i++;\n }\n else {\n n++;\n i = findClusterBreak(string, i);\n }\n }\n return n;\n}", "function findIndentation(input)\n{\n\tvar count = 0;\n\n\tif (input.length === 0)\n\t{\n\t\treturn 0;\n\t}\n\n\treturn input.split(/[^ \\t\\r\\n]/)[0].length; //**returns the number of tabs as well as the number of spaces!!!\n}", "function findColumn(string, goal, tabSize) {\n\t\t for (var pos = 0, col = 0;;) {\n\t\t var nextTab = string.indexOf(\"\\t\", pos);\n\t\t if (nextTab == -1) { nextTab = string.length; }\n\t\t var skipped = nextTab - pos;\n\t\t if (nextTab == string.length || col + skipped >= goal)\n\t\t { return pos + Math.min(skipped, goal - col) }\n\t\t col += nextTab - pos;\n\t\t col += tabSize - (col % tabSize);\n\t\t pos = nextTab + 1;\n\t\t if (col >= goal) { return pos }\n\t\t }\n\t\t }", "function findColumn(string, goal, tabSize) {\r\n for (var pos = 0, col = 0;;) {\r\n var nextTab = string.indexOf(\"\\t\", pos);\r\n if (nextTab == -1) nextTab = string.length;\r\n var skipped = nextTab - pos;\r\n if (nextTab == string.length || col + skipped >= goal)\r\n return pos + Math.min(skipped, goal - col);\r\n col += nextTab - pos;\r\n col += tabSize - (col % tabSize);\r\n pos = nextTab + 1;\r\n if (col >= goal) return pos;\r\n }\r\n }", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) nextTab = string.length;\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n return pos + Math.min(skipped, goal - col);\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) return pos;\n }\n }", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) nextTab = string.length;\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n return pos + Math.min(skipped, goal - col);\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) return pos;\n }\n }", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) nextTab = string.length;\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n return pos + Math.min(skipped, goal - col);\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) return pos;\n }\n }", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) nextTab = string.length;\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n return pos + Math.min(skipped, goal - col);\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) return pos;\n }\n }", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) nextTab = string.length;\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n return pos + Math.min(skipped, goal - col);\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) return pos;\n }\n }", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) nextTab = string.length;\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n return pos + Math.min(skipped, goal - col);\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) return pos;\n }\n }", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n }", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n }", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n }", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n }", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n }", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n }", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n }", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n }", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n }", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n }", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n }", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n }", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n }", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n }", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n }", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n }", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n }", "function findColumn(string, goal, tabSize) {\r\n for (var pos = 0, col = 0;;) {\r\n var nextTab = string.indexOf(\"\\t\", pos);\r\n if (nextTab == -1) { nextTab = string.length; }\r\n var skipped = nextTab - pos;\r\n if (nextTab == string.length || col + skipped >= goal)\r\n { return pos + Math.min(skipped, goal - col) }\r\n col += nextTab - pos;\r\n col += tabSize - (col % tabSize);\r\n pos = nextTab + 1;\r\n if (col >= goal) { return pos }\r\n }\r\n}", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n\n if (nextTab == -1) {\n nextTab = string.length;\n }\n\n var skipped = nextTab - pos;\n\n if (nextTab == string.length || col + skipped >= goal) {\n return pos + Math.min(skipped, goal - col);\n }\n\n col += nextTab - pos;\n col += tabSize - col % tabSize;\n pos = nextTab + 1;\n\n if (col >= goal) {\n return pos;\n }\n }\n }", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos)\n if (nextTab == -1) { nextTab = string.length }\n var skipped = nextTab - pos\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos\n col += tabSize - (col % tabSize)\n pos = nextTab + 1\n if (col >= goal) { return pos }\n }\n}", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos)\n if (nextTab == -1) { nextTab = string.length }\n var skipped = nextTab - pos\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos\n col += tabSize - (col % tabSize)\n pos = nextTab + 1\n if (col >= goal) { return pos }\n }\n}", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n}", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n}", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n}", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n}", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n}", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n}", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n}", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n}", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n}", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n}", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n}", "function findColumn(string, col, tabSize, strict) {\n for (let i = 0, n = 0;;) {\n if (n >= col)\n return i;\n if (i == string.length)\n break;\n n += string.charCodeAt(i) == 9 ? tabSize - (n % tabSize) : 1;\n i = findClusterBreak(string, i);\n }\n return strict === true ? -1 : string.length;\n}", "indentation() {\n var _a;\n return (_a = this.overrideIndent) !== null && _a !== void 0 ? _a : countCol(this.string, null, this.tabSize);\n }", "function num_indent (line, indent_string) {\n\tvar amt = 0;\n\tvar index = 0;\n\twhile (line.substring(index, index + indent_string.length) == indent_string) {\n\t\tamt += 1;\n\t\tindex += indent_string.length;\n\t}\n\treturn amt;\n}", "function getIndentation(s) {\n let indentation = s.match(/[ \\t]*/)[0];\n indentation = indentation.replace(/\\t/g, INDENT); // replace tabs by INDENT\n return Math.floor(indentation.length / INDENT.length);\n }", "function lineNumberOfCharacterIndex(code, idx) {\n var everythingUpUntilTheIndex = code.substring(0, idx);\n // computer science!\n return everythingUpUntilTheIndex.split('\\n').length;\n}", "function updatePosition(str) {\n const lines = str.match(/\\n/g);\n\n if (lines) {\n lineno += lines.length;\n }\n\n const i = str.lastIndexOf('\\n'); // eslint-disable-next-line no-bitwise\n\n column = ~i ? str.length - i : column + str.length;\n }", "function updatePosition(str) {\n var lines = str.match(/\\n/g);\n if (lines) lineno += lines.length;\n var i = str.lastIndexOf('\\n');\n column = ~i ? str.length - i : column + str.length;\n }", "function updatePosition(str) {\n var lines = str.match(/\\n/g);\n if (lines) lineno += lines.length;\n var i = str.lastIndexOf('\\n');\n column = ~i ? str.length - i : column + str.length;\n }", "function updatePosition(str) {\n var lines = str.match(/\\n/g);\n if (lines) lineno += lines.length;\n var i = str.lastIndexOf('\\n');\n column = ~i ? str.length - i : column + str.length;\n }", "function updatePosition(str) {\n var lines = str.match(/\\n/g);\n if (lines) lineno += lines.length;\n var i = str.lastIndexOf('\\n');\n column = ~i ? str.length - i : column + str.length;\n }" ]
[ "0.78502226", "0.78502226", "0.78502226", "0.78502226", "0.78502226", "0.78502226", "0.7831976", "0.7831976", "0.7831976", "0.7729814", "0.7729814", "0.7729814", "0.7729814", "0.7565417", "0.754758", "0.754758", "0.754189", "0.7519787", "0.7494672", "0.7494672", "0.7494672", "0.7494672", "0.7494672", "0.7494672", "0.7494672", "0.7494672", "0.7494672", "0.7494672", "0.7494672", "0.7474529", "0.7344412", "0.7344412", "0.7302529", "0.6944102", "0.69359416", "0.6896651", "0.6890358", "0.6890358", "0.6890358", "0.6890358", "0.6890358", "0.6890358", "0.6872815", "0.6872815", "0.6872815", "0.6872815", "0.6872815", "0.6872815", "0.6872815", "0.6872815", "0.6872815", "0.6872815", "0.6872815", "0.6872815", "0.6872815", "0.6872815", "0.6872815", "0.6872815", "0.6872815", "0.686333", "0.6846261", "0.68187124", "0.68187124", "0.6812845", "0.6812845", "0.6812845", "0.6812845", "0.6812845", "0.6812845", "0.6812845", "0.6812845", "0.6812845", "0.6812845", "0.6812845", "0.680212", "0.6770894", "0.6571154", "0.6354294", "0.6332464", "0.6295066", "0.6217641", "0.6217641", "0.6217641", "0.6217641" ]
0.7578319
24
The inverse of countColumn find the offset that corresponds to a particular column.
function findColumn(string, goal, tabSize) { for (var pos = 0, col = 0;;) { var nextTab = string.indexOf("\t", pos); if (nextTab == -1) { nextTab = string.length; } var skipped = nextTab - pos; if (nextTab == string.length || col + skipped >= goal) { return pos + Math.min(skipped, goal - col) } col += nextTab - pos; col += tabSize - (col % tabSize); pos = nextTab + 1; if (col >= goal) { return pos } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function firstInColumnLocation(col) {\r\n\t\tvar sets = $['mapsettings'];\r\n\t\tvar point = new Point(sets.columns[col],0);\r\n\t\tvar offset = getRelativePoint(point);\r\n\t\treturn offset.x;\r\n\t}", "function getRelativeColStart(col) {\r\n\t\tvar loc = new Point(sets.columns[col],0);\r\n\t\tvar offset = getRelativePoint(loc);\r\n\t\treturn offset.x;\r\n\t}", "function columnIndex(column) {\n return _.indexOf(columns, column);\n }", "column() {\n if (this.lastColumnPos < this.start) {\n this.lastColumnValue = countCol(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue);\n this.lastColumnPos = this.start;\n }\n return this.lastColumnValue;\n }", "function findColumn(string, col, tabSize, strict) {\n for (let i = 0, n = 0;;) {\n if (n >= col)\n return i;\n if (i == string.length)\n break;\n n += string.charCodeAt(i) == 9 ? tabSize - (n % tabSize) : 1;\n i = findClusterBreak(string, i);\n }\n return strict === true ? -1 : string.length;\n}", "function getColumn(x) {\r\n\t\tvar col = 0;\r\n\t\tx = getAbsolutePoint(new Point(x,0));\r\n\t\tx = x.x+5; // Adds five probably not necessary, but insures x is squarely in the col\r\n\t\t$.each($['mapsettings'].columns, function(i, item) {\r\n\t\t\tif(x>=item) col = i;\r\n\t\t});\r\n\t\treturn col+1; // add one because column count starts from one\r\n\t}", "findSpotForCol(column){\n for(let row = this.height - 1; row >= 0; row--){\n if(!this.board[row][column]){\n return row;\n }\n }\n return null;\n }", "column(pos, bias = 1) {\n let { text, from } = this.lineAt(pos, bias);\n let result = this.countColumn(text, pos - from);\n let override = this.options.overrideIndentation ? this.options.overrideIndentation(from) : -1;\n if (override > -1)\n result += override - this.countColumn(text, text.search(/\\S|$/));\n return result;\n }", "function findSpotForCol(x) {\n // TODO: write the real version of this, rather than always returning 0\n for (let i = board.length-1; i >= 0; i--) {\n if (board[i][x] === null) {\n return i\n }\n }\n //it returns null when the top row is full\n return null;\n}", "private_getActiveColumnFromPosition()\n\t{\n\t\tif (g_mouse.x < this.coords.x || g_mouse.x > this.coords.x + this.size.x)\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\tif (g_mouse.y < this.coords.y || g_mouse.y > this.coords.y + this.size.y)\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\t// Mouse is over the board, so return the column it's in\n\t\tlet columnSize = this.size.x / this.columns;\n\t\tlet distance = g_mouse.x - this.coords.x;\n\t\treturn Math.floor(distance / columnSize);\n\t}", "function findSpotForCol(x) {\n\t// TODO: write the real version of this, rather than always returning 0\n\tfor (let i = HEIGHT - 1; i >= 0; i--) {\n\t\tif (board[i][x] === null) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn null;\n}", "function getIndexFromColumn(column) {\n return column.split('').reduce(function (acc, currentVal) {\n return lettersInAlphabet * acc + lettersArr.indexOf(currentVal);\n }, 0);\n}", "function getColumnIndexByColumnName(columns, columnName) {\n for (var i in columns) {\n if (columns[i] == columnName) {\n return i;\n }\n }\n\n return null;\n }", "function findColumn(string, goal, tabSize) {\n\t\t for (var pos = 0, col = 0;;) {\n\t\t var nextTab = string.indexOf(\"\\t\", pos);\n\t\t if (nextTab == -1) { nextTab = string.length; }\n\t\t var skipped = nextTab - pos;\n\t\t if (nextTab == string.length || col + skipped >= goal)\n\t\t { return pos + Math.min(skipped, goal - col) }\n\t\t col += nextTab - pos;\n\t\t col += tabSize - (col % tabSize);\n\t\t pos = nextTab + 1;\n\t\t if (col >= goal) { return pos }\n\t\t }\n\t\t }", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) nextTab = string.length;\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n return pos + Math.min(skipped, goal - col);\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) return pos;\n }\n }", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) nextTab = string.length;\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n return pos + Math.min(skipped, goal - col);\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) return pos;\n }\n }", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) nextTab = string.length;\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n return pos + Math.min(skipped, goal - col);\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) return pos;\n }\n }", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) nextTab = string.length;\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n return pos + Math.min(skipped, goal - col);\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) return pos;\n }\n }", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) nextTab = string.length;\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n return pos + Math.min(skipped, goal - col);\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) return pos;\n }\n }", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) nextTab = string.length;\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n return pos + Math.min(skipped, goal - col);\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) return pos;\n }\n }", "function col () {\n return index - token.length + 1;\n }", "function findColumn(string, goal, tabSize) {\r\n for (var pos = 0, col = 0;;) {\r\n var nextTab = string.indexOf(\"\\t\", pos);\r\n if (nextTab == -1) nextTab = string.length;\r\n var skipped = nextTab - pos;\r\n if (nextTab == string.length || col + skipped >= goal)\r\n return pos + Math.min(skipped, goal - col);\r\n col += nextTab - pos;\r\n col += tabSize - (col % tabSize);\r\n pos = nextTab + 1;\r\n if (col >= goal) return pos;\r\n }\r\n }", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n\n if (nextTab == -1) {\n nextTab = string.length;\n }\n\n var skipped = nextTab - pos;\n\n if (nextTab == string.length || col + skipped >= goal) {\n return pos + Math.min(skipped, goal - col);\n }\n\n col += nextTab - pos;\n col += tabSize - col % tabSize;\n pos = nextTab + 1;\n\n if (col >= goal) {\n return pos;\n }\n }\n }", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos)\n if (nextTab == -1) { nextTab = string.length }\n var skipped = nextTab - pos\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos\n col += tabSize - (col % tabSize)\n pos = nextTab + 1\n if (col >= goal) { return pos }\n }\n}", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos)\n if (nextTab == -1) { nextTab = string.length }\n var skipped = nextTab - pos\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos\n col += tabSize - (col % tabSize)\n pos = nextTab + 1\n if (col >= goal) { return pos }\n }\n}", "function findSpotForCol(x) {\n // TODO: write the real version of this, rather than always returning 0\n // first click of every column errors but still playable\n for (let i = board.length-1 ;i >= 0; i--){\n if(board[i][x] === null){\n return i;\n }\n }\n return null;\n}", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n}", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n}", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n}", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n}", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n}", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n}", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n}", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n}", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n}", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n}", "function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n}", "function pageOffset () {\n // const offset = indexOfSelected() - (vs.row * vs.cols + vs.col)\n let i = indexOfSelected()\n const pageSize = vs.rows * vs.cols\n const pageNum = Math.floor(indexOfSelected() / pageSize)\n const offset = pageNum * pageSize\n return offset\n }", "function findColumn(string, goal, tabSize) {\r\n for (var pos = 0, col = 0;;) {\r\n var nextTab = string.indexOf(\"\\t\", pos);\r\n if (nextTab == -1) { nextTab = string.length; }\r\n var skipped = nextTab - pos;\r\n if (nextTab == string.length || col + skipped >= goal)\r\n { return pos + Math.min(skipped, goal - col) }\r\n col += nextTab - pos;\r\n col += tabSize - (col % tabSize);\r\n pos = nextTab + 1;\r\n if (col >= goal) { return pos }\r\n }\r\n}", "function lineColumnToIndex(lineColumn, text) {\n let index = 0;\n for (let i = 0; i < lineColumn.line - 1; ++i) {\n index = text.indexOf(\"\\n\", index) + 1;\n if (index === -1) {\n return -1;\n }\n }\n return index + lineColumn.column;\n}", "function findSpotForCol(col) {\n // find the correct row index\n for (let possibleRow = HEIGHT - 1; possibleRow >= 0; possibleRow--) {\n if (board[possibleRow][col] === null) {\n return possibleRow;\n }\n }\n return null;\n}", "function pointToOffset(point) {\n var line = point && point.line\n var column = point && point.column\n\n if (!isNaN(line) && !isNaN(column) && line - 1 in indices) {\n return (indices[line - 2] || 0) + column - 1 || 0\n }\n\n return -1\n }", "static calculateIndex(row, col) {\n\t\treturn (row - 1) * 9 + (col - 1)\n\t}", "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 getCol(position) {\n return (position + 2) % 3;\n}", "get col() {\n return this.pos - this.lineStartPos + Number(this.lastGapPos !== this.pos);\n }", "findSpotForCol(x) {\n for (let y = this.height - 1; y >= 0; y--) {\n if (!this.board[y][x]) {\n return y;\n }\n }\n return null;\n }", "function findSpotForCol(x) {\n\t// TODO: write the real version of this, rather than always returning 0\n\tfor (let y = HEIGHT - 1; y >= 0; y--) {\n\t\tif (!board[y][x]) {\n\t\t\treturn y;\n\t\t}\n\t}\n\treturn null;\n}", "rowColToIndex(row, col) {\n return col + row * this.col;\n }", "function findSpotForCol(x) {\n // TODO: write the real version of this, rather than always returning 0\n for(let y = HEIGHT - 1; y >= 0; y--){\n if(board[x][y] === undefined){\n //due to the way the board array was created, I need to use [x][y] instead of [y][x]\n return y;\n }\n }\n return null;\n}", "function findSpotForCol(x) {\n let yLocation = HEIGHT-1;\n\n // iterate through the column starting from the bottom to find the position of y that contains an empty cell\n for (let i=HEIGHT-1; i >= 0; i--){\n yLocation = (board[i][x] === 1 || board[i][x] === 2) ? yLocation-1 : yLocation;\n // console.log(\"i:\",i,\"yLocation\", yLocation);\n }\n // console.log(\"yLocation\", yLocation, \"board\", board[yLocation][x]);\n yLocation = yLocation < 0 ? null : yLocation;\n return yLocation;\n}", "findSpotForCol(x) {\n for (let y = this.height - 1; y >= 0; y--) {\n if (!this.board[y][x]) {\n return y;\n }\n }\n return null;\n }", "findSpotForCol(x) {\n for (let y = this.HEIGHT - 1; y >= 0; y--) {\n if (!this.board[y][x]) {\n return y;\n }\n }\n return null;\n }", "function _fnVisibleToColumnIndex(oSettings, iMatch) {\n\t\t\tvar iColumn = -1;\n\n\t\t\tfor (var i = 0; i < oSettings.aoColumns.length; i++) {\n\t\t\t\tif (oSettings.aoColumns[i].bVisible === true) {\n\t\t\t\t\tiColumn++;\n\t\t\t\t}\n\n\t\t\t\tif (iColumn == iMatch) {\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}", "function findSpotForCol(x) {\n for (let y = HEIGHT - 1; y >= 0; y--) {\n if (board[y][x] === undefined) {\n return y;\n }\n }\n return null;\n}", "function _get_column(i) { return i % 9; }", "function findSpotForCol(x) {\n // TODO: write the real version of this, rather than always returning 0\n for(let y = HEIGHT - 1; y >= 0; y--){\n if(board[y][x] == null){\n return y;\n }\n }\n return null;\n}", "getColumn (colIdx) {\n\t\treturn this.board.filter((e, idx) => {\n\t\t\treturn position.toCol(idx) === colIdx;\n\t\t});\n\t}", "function pointToOffset(point) {\n var line = point && point.line\n var column = point && point.column\n var offset\n\n if (!isNaN(line) && !isNaN(column) && line - 1 in indices) {\n offset = (indices[line - 2] || 0) + column - 1 || 0\n }\n\n return offset > -1 && offset < indices[indices.length - 1] ? offset : -1\n }", "function pointToOffset(point) {\n var line = point && point.line\n var column = point && point.column\n var offset\n\n if (!isNaN(line) && !isNaN(column) && line - 1 in indices) {\n offset = (indices[line - 2] || 0) + column - 1 || 0\n }\n\n return offset > -1 && offset < indices[indices.length - 1] ? offset : -1\n }", "function findSpotForCol(x) {\n // TODO: write the real version of this, rather than always returning 0\n // return null if none available;\n // starts at x, height is 6\n // access BOARD [height][x], if the coordinate is equal to null, return current height\n for (let y = HEIGHT-1; y >= 0; y--) {\n if (!BOARD[y][x]) {\n return y;\n }\n }\n return null;\n}", "function index(column, row){\n return column + (row * maxColume);\n}", "function pointToOffset(point) {\n var line = point && point.line;\n var column = point && point.column;\n var offset;\n\n if (!isNaN(line) && !isNaN(column) && line - 1 in indices) {\n offset = (indices[line - 2] || 0) + column - 1 || 0;\n }\n\n return offset > -1 && offset < indices[indices.length - 1] ? offset : -1\n }", "function redips_column(std){\n\tvar nrows = std.hall.nrows;\n\treturn nrows - 1 - (std.hall_position.charCodeAt(0) - 65); // 'A' is 65, 'B' is 66, .. Vertical offset -1\n}", "function getColumnLocation(plot, gridpos, numberOfBars) \n { \n var insideheight = plot.grid._height; \n var colheight = insideheight / numberOfBars; \n var column = parseInt(gridpos.y / colheight); \n return (numberOfBars - 1) - column;\n }", "function index(row, col) {\n return row * 8 + col;\n }", "getPageOffset() {\n return this.coord.getPageOffset();\n }", "function findSpotForCol(x) {\n\tfor (let y = HEIGHT - 1; y >= 0; y--) {\n\t\tif (!board[y][x]) return y;\n\t}\n\treturn null;\n}", "get goalColumn() {\n let value = this.flags >> 5 /* RangeFlag.GoalColumnOffset */;\n return value == 33554431 /* RangeFlag.NoGoalColumn */ ? undefined : value;\n }", "function findSpotForCol(x) {\n for (let y = HEIGHT - 1; y >= 0; y--) {\n if (board[y][x] === null) {\n return y;\n }\n }\n return null;\n}", "function findSpotForCol(x) {\n for (let y = HEIGHT - 1; y >= 0; y--) {\n if (board[y][x] === null) {\n return y;\n }\n }\n return null;\n}", "function _fnVisibleToColumnIndex( oSettings, iMatch )\n\t\t{\n\t\t\tvar iColumn = -1;\n\t\t\t\n\t\t\tfor ( var i=0 ; i<oSettings.aoColumns.length ; i++ )\n\t\t\t{\n\t\t\t\tif ( oSettings.aoColumns[i].bVisible === true )\n\t\t\t\t{\n\t\t\t\t\tiColumn++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( iColumn == iMatch )\n\t\t\t\t{\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn null;\n\t\t}", "function _fnVisibleToColumnIndex( oSettings, iMatch )\n\t\t{\n\t\t\tvar iColumn = -1;\n\t\t\t\n\t\t\tfor ( var i=0 ; i<oSettings.aoColumns.length ; i++ )\n\t\t\t{\n\t\t\t\tif ( oSettings.aoColumns[i].bVisible === true )\n\t\t\t\t{\n\t\t\t\t\tiColumn++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( iColumn == iMatch )\n\t\t\t\t{\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn null;\n\t\t}", "col_row_from_offset(offset) {\n return this.col_row_offset_from_offset(offset).map(([index, _]) => index);\n }", "function getColNumber(colObj) {\r\n // checks to see if a cellObj has been parsed as argument.\r\n // if yes, then get the colObj for that cell.\r\n colObj = colObj.hasClass(\"slot\") ? $(colObj[0].parentElement) : colObj;\r\n return parseInt(columns.index(colObj));\r\n }", "function colLookup(sheet, value, row) {\n var rowValues = sheet.getRange(row,1,row,sheet.getLastColumn()).getValues();\n for (var i=0; i<columnValues.length; i++) {\n if (rowValues[i] == value) {\n var colNum = i+1;\n return colNum;\n }\n }\n return rowValues;\n}", "function findInColumn(sheet, col, data) {\n var column = sheet.getRange(col + \":\" + col); // like A:A\n var values = column.getValues(); \n var row = 0;\n while ( values[row] && values[row][0] !== data ) { row++ }\n if (values[row][0] === data) { return row+1 } else { return -1 } \n}", "function getColumnVisiblePostion($firstRow, $cell){\n var tdsFirstRow = $firstRow.children();\n for(var i = 0; i < tdsFirstRow.length; i++){\n if($(tdsFirstRow[i]).data('posx') == $cell.data('posx')){\n return i;\n }\n }\n }", "function findSpotForCol(x) {\n for(let y = HEIGHT-1; y >= 0; y--){\n if(board[y][x] === null){\n return y;\n }\n }\n return null;\n}", "function findSpotForCol(x,gameboard) {\n for (let y = 0; y<HEIGHT;y ++){\n if (gameboard[x][y] === 'E'){\n return y;\n }\n }\n //debugger;\n //console.log(\"No spot found to place a piece in the given column\");\n return null;\n}", "function findSpotForCol(x) {\n // TODO: write the real version of this, rather than always returning 0\n // iterating over each row to check if the cell is empty === null, if null then use that y location for new chip \n for (let y = HEIGHT - 1; y >= 0; y--) {\n if(board[y][x] === null) {\n return y;\n }\n }\n return null;\n}", "countColumn(line, pos = line.length) {\n return state.countColumn(line, this.state.tabSize, pos);\n }", "function findSpotForCol(x) {\n\tlet h = HEIGHT - 1;\n\tfor (let y = h; y >= 0; y--) {\n\t\tif (!board[y][x]) {\n\t\t\treturn y;\n\t\t}\n\t}\n\treturn null;\n}", "function offset_from_location(row, col){\n\t\tvar offset = $('.tile-board').offset();\n\t\toffset.left += (col-1)*tileWidth;\n\t\toffset.top += (row-1)*tileHeight;\n\t\treturn offset;\n\t}" ]
[ "0.70205384", "0.67743564", "0.65456825", "0.6530709", "0.65124434", "0.6411066", "0.6409894", "0.6358597", "0.6343458", "0.62936705", "0.6244902", "0.62293106", "0.62137413", "0.6201901", "0.6193824", "0.6193824", "0.6193824", "0.6193824", "0.6193824", "0.6193824", "0.6157048", "0.6146041", "0.61456794", "0.6127556", "0.6127556", "0.61225563", "0.60897875", "0.60897875", "0.60897875", "0.60897875", "0.60897875", "0.60897875", "0.60897875", "0.60897875", "0.60897875", "0.60897875", "0.60897875", "0.6085466", "0.6036136", "0.60252213", "0.6022775", "0.6018232", "0.6014135", "0.60022056", "0.6001614", "0.5997377", "0.598438", "0.5981262", "0.5970292", "0.59624964", "0.5937723", "0.59367096", "0.59324515", "0.593023", "0.5914107", "0.5902438", "0.5899108", "0.5879172", "0.58765924", "0.58765924", "0.5870349", "0.5858829", "0.5855071", "0.58494365", "0.5843165", "0.58330566", "0.58294284", "0.5824129", "0.5812109", "0.580072", "0.580072", "0.57958955", "0.57958955", "0.5791443", "0.5786291", "0.5783771", "0.5755482", "0.57486624", "0.5746336", "0.57305276", "0.57250845", "0.5723479", "0.5722761", "0.57084024" ]
0.6172094
33
Returns a number from the range [`0`; `str.length`] unless `pos` is outside that range.
function skipExtendingChars(str, pos, dir) { while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) { pos += dir; } return pos }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getStart (pos, len) {\n if (pos == null) return 0;\n return pos < 0 ? (len + (pos % len)) : Math.min(len, pos);\n}", "function getPosAsInt(str) {\n\treturn parseInt(str.substr(0, str.length - 2));\n}", "function collectDigits(input, pos) {\n\t\t'use strict';\n\t\twhile (pos < input.length && input.charCodeAt(pos + 1) >= ZERO && input.charCodeAt(pos + 1) <= NINE) {\n\t\t\tpos += 1;\n\t\t}\n\t\treturn pos;\n\t}", "function getDigit(num, position) {\n const stringNum = String(num);\n const digit = parseInt(stringNum[stringNum.length - 1 - position]);\n return isNaN(digit) ? 0 : digit;\n}", "function startAtNum(str) {\r\n str = str || ''\r\n var match = str.match(/[0-9]/)\r\n return match ? str.slice(match.index).trim() : ''\r\n}", "function getPosLetter(inpt,position)\r\n{\r\n\tvar len=inpt.length;\r\n\tif(position<=len)\r\n\t{\r\n\t\tfinalOutput=inpt.charAt(position-1);\r\n\t\treturn finalOutput;\r\n\t\t \r\n\t}\r\n\telse\r\n\t{\r\n\t\tdocument.write(\"Invalid Position!\");\r\n\t\treturn; \r\n\t}\r\n\t\r\n}", "function findCoord(str, lower, lowerLetter, upper, upperLetter) {\n let result = 0;\n\n // Check range before final value\n for (let i = 0; i < str.length - 1; i++) {\n let midway = Math.floor((upper - lower) / 2);\n if (str[i] === lowerLetter) {\n upper = midway + lower;\n } else {\n lower = upper - midway;\n }\n }\n\n // Check final value\n if (str[str.length - 1] === lowerLetter) {\n result = lower;\n } else {\n result = upper;\n }\n\n return result;\n}", "function validPos(inpt,position)\r\n{\r\n\tif(pos>inpt.length)\r\n\t{\r\n\t\tdocument.write(\"Invalid Position!\");\r\n\t\treturn;\r\n\t}\r\n\telse\r\n\t\treturn 1;\r\n\r\n}", "function position(posNumber) {\n let position = \"\";\n position = (posNumber - 1) * 18 + \"px\";\n // console.log(\"position \" + position);\n return position;\n}", "function getNthPos(endtag,pos)\n{\n if(pos == 0)\n return 0;\n if(pos > getNumUnderscores(endtag))\n return -1; //error. this is not possible.\n\n for(var i=0; i<pos; i++) { //remove 'pos' number of underscores\n endtag = endtag.substring(endtag.indexOf(\"_\")+1, endtag.length);\n }\n\n if(endtag.indexOf(\"_\") == -1) //has no more underscores so just return everything that's left\n return parseInt(endtag);\n else //otherwise, return up to the next underscore\n return parseInt(endtag.substring(0,endtag.indexOf(\"_\")));\n }", "function posToIndex(pos) {\n var row = pos[0];\n var col = pos[1];\n return (row * 4) + col;\n}", "function substringHandleNegativeLengths(base_s, index_s) {\n\n\t\t//Index s is negative to adding will get us to the right start\n\t\tconst newIndex = ctx.mkAdd(base_s.getLength(), index_s);\n\n\t\t//Bound the minimum index by 0\n\t\tconst aboveMin = ctx.mkGe(newIndex, ctx.mkIntVal(0));\n\t\tconst indexOrZero = ctx.mkIte(aboveMin, newIndex, ctx.mkIntVal(0));\n\n\t\treturn ctx.mkIte(ctx.mkGe(index_s, ctx.mkIntVal(0)), index_s, indexOrZero);\n\t}", "function palindromeX(len, pos) {\n let left = (10 ** Math.floor((len - 1) / 2) + pos - 1).toString();\n let right = [...left].reverse().join('').slice(len % 2);\n return Number(left + right);\n}", "function normalizePosition(val) {\n val = parseInt(val);\n if (isNaN(val))\n return undefined;\n else\n return val;\n}", "function normalizePosition(val) {\n val = parseInt(val);\n if (isNaN(val))\n return undefined;\n else\n return val;\n}", "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 codePointAt(str, pos) {\n let code0 = str.charCodeAt(pos);\n if (!surrogateHigh(code0) || pos + 1 == str.length)\n return code0;\n let code1 = str.charCodeAt(pos + 1);\n if (!surrogateLow(code1))\n return code0;\n return ((code0 - 0xd800) << 10) + (code1 - 0xdc00) + 0x10000;\n}", "function textToIndex(pos){\n\n\tvar firstRowLength=114; //Header row length not including new line.\n\n\tvar rowLabelLength=4;\t//Lenght of row labels including new line.\n\n\tvar numberOfCharactersPerGroup=11;\t//Total number of characters in a group including space.\n\n\tvar totalNumberOfCharactersPerLine=114;\t//Total number of characters in a line including row label, spaces, and new Line.\n\n\tvar offset=0;\t//Total offset needed to convert text selection index to a valid index.\n\n\t\n\n\t//Amount for length of Header Row (Row 0) and first row label\n\n\toffset+=firstRowLength+rowLabelLength;\n\n\t\n\n\t//Position selected is in the header or first row labels\n\n\tif(pos<offset){\n\n\t\treturn 0;\n\n\t}\n\n\t\n\n\t//Past the first Line (Rows beyond 1)\n\n\tif(pos>=(firstRowLength+rowLabelLength+totalNumberOfCharactersPerLine)){\n\n\t\t//Calculate number of Row Labels needed (including new line)\n\n\t\toffset+=(Math.floor((pos/(totalNumberOfCharactersPerLine)))-1)*rowLabelLength\n\n\t}\n\n\t\n\n\t//Past First Group in Row 1\n\n\tif(pos>=(numberOfCharactersPerGroup+firstRowLength+rowLabelLength)){\n\n\t\t//Calculate number of spaces needed\n\n\t\toffset+=Math.floor((pos-offset)/numberOfCharactersPerGroup);\n\n\t}\n\n\t//Return Index (Position - Offset)\n\n\treturn pos-offset;\n\n\n\n}", "function palindrome(len, pos) {\n let left = Math.pow(10, Math.ceil(len / 2) - 1) + (pos - 1) + '';\n let right = left.slice(0, Math.floor(len / 2)).split('').reverse().join('');\n return +(left + right);\n}", "function inc(s, pos) {\n\tif (pos===undefined) pos = s.length-1\n\tvar c = s.charCodeAt(pos) + 1\n\tif (c===123) {\n\t\tc = 97\n\t\ts = inc(s,pos-1)\n\t}\n\tvar a = s.split('')\n\ta[pos] = String.fromCharCode(c)\n\treturn a.join('')\n}", "function NumerosLargo(string,largo){\n var out = '';\n var filtro = '1234567890';\n \n for (var i=0; i<string.length; i++){\n if (filtro.indexOf(string.charAt(i)) != -1) {\n if(out.length<(largo)){\n out += string.charAt(i);\n }\n }\n }\n\n return out;\n}", "function leftDigit(str) {\n // write your code here\n // let reg = new RegExp([0-9])\n const reg=/[0-9]/\n let left =str.search(reg);\n // return left;\nreturn str[left];\n \n }", "function getLength(string, index = 0) {\n if(string[index] === undefined) {\n return index;\n }\n return getLength(string, index + 1)\n}", "function positionToChar(position) {\n var counter = 0;\n\n loop:\n for (var i = 1; i <= keyboardDimension[0]; i++) {\n for (var j = 1; j <= keyboardDimension[1]; j++) {\n if (!(i in invalidPositions) || !invalidPositions[i].some(xPosition => xPosition == j)) {\n counter++;\n }\n\n if (position[0] == i && position[1] == j) {\n //We are at the position that is given as the parameter, stop the N(2) loop\n // with the label\n break loop;\n }\n }\n }\n\n if (counter >= 10) {\n return String.fromCharCode(65 + (counter - 10));\n }\n\n return counter;\n}", "function strend(str) {\n\t\t\tlet i;\n\t\t\tfor (let i = 0; i < str.length; i++)\n\t\t\t{\n\t\t\t\tif (ord(str[i]) <= 31) break;\n\t\t\t}\n\t\t\treturn i;\n\t\t}", "function h$jsstringIndexR(i, str) {\n ;\n if(i < 0 || i > str.length) return -1;\n var ch = str.charCodeAt(i);\n return (((ch|1023)===0xDFFF)) ? ((((str.charCodeAt(i-1))-0xD800)<<10)+(ch)-9216) : ch;\n}", "function location(pos){\n return dimension * + Math.floor(-pos[2]) + Math.floor(pos[0]);\n}", "function getCharFromPosition(pos) {\n\t\tvar index = pos.row * 5;\n\t\tindex = index + pos.col;\n\t\treturn keyPhrase.charAt(index);\n\t}", "function h$jsstringIndexR(i, str) {\n ;\n if(i < 0 || i > str.length) return -1;\n var ch = str.charCodeAt(i);\n return (((ch|1023)===0xDFFF)) ? ((((str.charCodeAt(i-1))-0xD800)<<10)+(ch)-9216) : ch;\n}", "function h$jsstringIndexR(i, str) {\n ;\n if(i < 0 || i > str.length) return -1;\n var ch = str.charCodeAt(i);\n return (((ch|1023)===0xDFFF)) ? ((((str.charCodeAt(i-1))-0xD800)<<10)+(ch)-9216) : ch;\n}", "function h$jsstringIndexR(i, str) {\n ;\n if(i < 0 || i > str.length) return -1;\n var ch = str.charCodeAt(i);\n return (((ch|1023)===0xDFFF)) ? ((((str.charCodeAt(i-1))-0xD800)<<10)+(ch)-9216) : ch;\n}", "function cigar2pos(cigar, pos)\n{\n\tvar x = 0, y = 0;\n\tfor (var i = 0; i < cigar.length; ++i) {\n\t\tvar op = cigar[i][0], len = cigar[i][1];\n\t\tif (op == 'M') {\n\t\t\tif (y <= pos && pos < y + len)\n\t\t\t\treturn x + (pos - y);\n\t\t\tx += len, y += len;\n\t\t} else if (op == 'D') {\n\t\t\tx += len;\n\t\t} else if (op == 'I') {\n\t\t\tif (y <= pos && pos < y + len)\n\t\t\t\treturn x;\n\t\t\ty += len;\n\t\t} else if (op == 'S' || op == 'H') {\n\t\t\tif (y <= pos && pos < y + len)\n\t\t\t\treturn -1;\n\t\t\ty += len;\n\t\t}\n\t}\n\treturn -1;\n}", "function ml_z_of_substring_base(base, s, pos, len) {\n s = caml_jsbytes_of_string(s);\n if(pos != 0 || len != s.length) {\n if (s.length - pos < len) {\n caml_invalid_argument(\"Z.of_substring_base: invalid offset or length\");\n }\n s = s.slice(pos,pos+len);\n }\n return jsoo_z_of_js_string_base(base, s);\n}", "function position(letter){\n let alphabet ='abcdefghijklmnopqrstuvwxyz';\nreturn `Position of alphabet: ${alphabet.indexOf(letter)+1}`;\n}", "function re(e){return e.inclusiveLeft?-1:0}", "function GiveACharacter(str, num) {\n if (num >=0) {\n return str[num];\n }\n}", "function _getInt(str, l, minlength, maxlength) {\n for (var m = maxlength; m >= minlength; m--) {\n var _token = str.substring(l, l + m);\n if (_token.length < minlength) {\n return null;\n }\n if (_isInteger(_token)) {\n return _token;\n }\n }\n return null;\n }", "function getPosition(num, str) {\n const result = [];\n num.map((a) => {\n str.map((b) => {\n result.push(`${a}${b}`);\n });\n });\n return result.join(' ');\n}", "function beyond(s) {\n if (s.length === 0) {\n return exports.MAX_WORD;\n }\n var code = s.charCodeAt(s.length - 1);\n return s.slice(0, -1) + String.fromCharCode(code + 1);\n}", "function countOfBalStr(string, position, count = null, total = 0) {\n if (position >= string.length) {\n return total\n }\n \n const letter = string[position]\n const value = letter === 'L' ? 1 : -1 // We can hard code this cause this is a contraint on the question\n count += value\n \n if (count === 0) {\n total++\n }\n \n return countOfBalStr(string, position + 1, count, total)\n}", "function at(position) {\n return value.charAt(position)\n }", "function at(position) {\n return value.charAt(position)\n }", "function at(position) {\n return value.charAt(position)\n }", "function at(position) {\n return value.charAt(position)\n }", "function n(str) {\n if (str == \"\") { return -1; }\n return Number(str);\n }", "function charAt (str='', position) {\n // var strArray = str.split('')\n return str[position]\n}", "function get_int(str, index) {\n var orig = index;\n while (str[index] >= '0' && str[index] <= '9') {\n index++;\n }\n return { value: parseInt(str.slice(orig)), len: index - orig };\n}", "function skipExtendingChars(str, pos, dir) {\r\n while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) { pos += dir; }\r\n return pos\r\n}", "function skipExtendingChars(str, pos, dir) {\n while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) { pos += dir; }\n return pos\n}", "function skipExtendingChars(str, pos, dir) {\n while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) { pos += dir; }\n return pos\n}", "function skipExtendingChars(str, pos, dir) {\n while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) { pos += dir; }\n return pos\n}", "function skipExtendingChars(str, pos, dir) {\n while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) { pos += dir; }\n return pos\n}", "function skipExtendingChars(str, pos, dir) {\n while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) { pos += dir; }\n return pos\n}", "function skipExtendingChars(str, pos, dir) {\n while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) { pos += dir; }\n return pos\n}", "function skipExtendingChars(str, pos, dir) {\n while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) { pos += dir; }\n return pos\n}", "function skipExtendingChars(str, pos, dir) {\n while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) { pos += dir; }\n return pos\n}", "function skipExtendingChars(str, pos, dir) {\n while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) { pos += dir; }\n return pos\n}", "function skipExtendingChars(str, pos, dir) {\n while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) { pos += dir; }\n return pos\n}", "function skipExtendingChars(str, pos, dir) {\n while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) { pos += dir; }\n return pos\n}", "function substring(p0, pos) {\n return filterFunction('substring', 'string', p0, pos);\n}", "function pos2coord(pos) {\n var coord;\n coord = Math.floor(pos / 64);\n return coord;\n}", "function Int_substr(str, a, b) {\n\ta = Int_convertToInt(a);\n\tb = Int_convertToInt(b);\n\n\tvar start = 0;\n\twhile(Int_lt(start, a)) start++;\n\tvar end = 0;\n\twhile(Int_lt(end, b)) end++;\n\treturn str.substring(start,end);\n}", "function deleteNthChar(inputString, position) {\n \"use strict\";\n /*\n * deletes the n-th character of the input string and\n * returns the (now one character shorter) string.\n *\n * n is counted from 0\n */\n if (position > inputString.length) {\n throw new BoundaryException(position, \"deleting char at position\");\n }\n\n var outputString = \"\";\n outputString = inputString.slice(0, position);\n outputString = outputString + inputString.slice(position + 1);\n return outputString;\n}", "function toPosInt(number) {\n return Math.floor(Math.abs(number));\n }", "function at(position) {\n return value.charAt(position);\n }", "convertPointToCharacterPosition(text, point) {\n var position = 0;\n var w = 0;\n for (var i = 0, n = text.length; i < n; i++) {\n\n var charWidth = this.calculateCharacterSize(text.charAt(i))[0];\n var halfWidth = charWidth / 2;\n\n if (i > 0) {\n w = this.calculateSize(text.substr(0, i))[0];\n }\n\n // basic rounding calculation bast on character\n // width\n if (w + halfWidth > point) {\n break;\n }\n\n position++;\n }\n\n return position;\n }", "function displacement(num){\r\n\twhere=1;\r\n\tfor (var i=0; i<incount; ++i){\r\n\t\tif (startin[i] < num){\r\n\t\t\twhere+=lengthin[i]-1;\r\n\t\t}\r\n\t}\r\n\treturn where;\r\n}", "function skipExtendingChars(str, pos, dir) {\n while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) { pos += dir }\n return pos\n}", "function getSubstr(strSource,intStartPosition,intOverPosition,cPosition)\r\n{\r\n\tvar strTarget = \"\";\r\n\tvar cTemp = \"\";\r\n\tvar intLoop = 0;\r\n\tvar intCount = 0;\r\n\ttry\r\n\t{\r\n\t strSource = trim(strSource);\r\n\t\tintCount = strSource.length;\r\n\t\tif (intStartPosition>intCount) intStartPosition = intCount;\r\n\t\tif (intOverPosition>intCount) intOverPosition = intCount;\r\n\t\tif (cPosition==null)\r\n\t\t{\r\n\t\t\tstrTarget = strSource.substring(intStartPosition,intOverPosition);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t if (intStartPosition<=intOverPosition)\r\n\t\t\t{\r\n\t\t\t\tfor (intLoop=intStartPosition;intLoop<intOverPosition;intLoop++)\r\n\t\t\t\t{\r\n\t\t\t\t\tcTemp = strSource.substr(intLoop,1);\r\n\t\t\t\t\tif (cTemp==cPosition) break;\r\n\t\t\t\t\telse strTarget = strTarget + cTemp;\r\n\t\t\t\t}\r\n\t\t }\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tfor (intLoop=intStartPosition-1;intLoop>intOverPosition;intLoop--)\r\n\t\t\t\t{\r\n\t\t\t\t\tcTemp = strSource.substr(intLoop,1);\r\n\t\t\t\t\tif (cTemp==cPosition) break;\r\n\t\t\t\t\telse strTarget = cTemp+strTarget;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tcatch(e)\r\n\t{\r\n\t}\r\n\treturn strTarget;\r\n}", "findIndex(pos, side, end, startAt = 0) {\n let arr = end ? this.to : this.from;\n for (let lo = startAt, hi = arr.length;;) {\n if (lo == hi)\n return lo;\n let mid = (lo + hi) >> 1;\n let diff = arr[mid] - pos || (end ? this.value[mid].endSide : this.value[mid].startSide) - side;\n if (mid == lo)\n return diff >= 0 ? lo : hi;\n if (diff >= 0)\n hi = mid;\n else\n lo = mid + 1;\n }\n }", "function getCharFromPosition(pos) {\n var index = pos.row * 5;\n index = index + pos.col;\n return cipher.key.charAt(index);\n}", "function isPosInt(val)\n{\n return (\n isInt(val) &&\n val > 0\n );\n}", "function lastPositionOcc (s){\n var position;\n for (i = s.length; i<=0; i--){\n if (s[i] === 'a'){\n position = i;\n }else{\n position = -1\n }\n }\n return position;\n}", "function checkIsInt(pos) {\n if (isNaN(pos) || pos > board.length) {\n return false;\n }\n return true;\n}", "function len(str)\r\n{\r\n if (str) {\r\n return len(str.substring(1))+1;\r\n }\r\n else\r\n return 0;\r\n}", "function range(nbr,min,max){if(nbr<min){return min;}else if(nbr>max){return max;}else{return nbr;}}", "function getSpotNumber(s) // paramwret is a string\r\n{\r\n var number = new String('');\r\n \r\n for(var i = 0; i < s.length; i++)\r\n {\r\n if( (s.charAt(i) >= '0') && (s.charAt(i) <= '9') )\r\n number += s.charAt(i);\r\n }\r\n return number; // return a string\r\n}", "function inBounds(number, bound) {\n\tif (number > (bound-1)) {\n\t\tnumber = bound - 1;\n\t}\n\treturn parseInt(number, 10);\n}", "function clampStartIndexFromRight(startIndex, len) {\n return min(len, max(-1, startIndex));\n }", "function xIndexOf(Val, Str, x) {\n 'use strict';\n\n var Ot,\n i;\n\n if (x <= (Str.split(Val).length - 1)) {\n Ot = Str.indexOf(Val);\n if (x > 1) {\n for (i = 1; i < x; i += 1) {\n Ot = Str.indexOf(Val, Ot + 1);\n }\n }\n return Ot;\n } else {\n alert(Val + \" Occurs less than \" + x + \" times\");\n return 0;\n }\n}", "function StrToIntWithDefault( s, n ) {\r\n var onlyNumbers = /[^0-9]/g;\r\n var t = s.replace( onlyNumbers, \"\" );\r\n\tt = parseInt( t );\r\n\tif ( ! isNaN( t ) ) {\r\n n = t;\r\n }\r\n return n;\r\n}", "function randomIndex(str){\n return Math.floor(Math.random() * str.length);\n }", "function h$jsstringIndexR(i, str) {\n ;\n if(i < 0 || i > str.length) return -1;\n var ch = str.charCodeAt(i);\n return (((ch|1023)===0xDFFF)) ? ((((str.charCodeAt(i-1))-0xD800)<<10)+(ch)-0xDC00+0x10000) : ch;\n}", "function clampStartIndexFromRight(startIndex, len) {\n return min(len, max(-1, startIndex));\n }" ]
[ "0.6599332", "0.65338004", "0.615744", "0.5992839", "0.5762691", "0.5724029", "0.5645194", "0.56270653", "0.54611194", "0.5430243", "0.54005027", "0.5377729", "0.5373956", "0.5371918", "0.5371918", "0.5348312", "0.53179735", "0.53129", "0.52632344", "0.5260393", "0.5196242", "0.519047", "0.5148572", "0.51380795", "0.5126333", "0.51128995", "0.5109989", "0.51017964", "0.51014835", "0.51014835", "0.51014835", "0.5070672", "0.5061649", "0.5050139", "0.50477326", "0.504768", "0.5045901", "0.5044195", "0.50384283", "0.5018274", "0.50129575", "0.50129575", "0.50129575", "0.50129575", "0.5009465", "0.50078166", "0.4999371", "0.49815083", "0.49705827", "0.49705827", "0.49705827", "0.49705827", "0.49705827", "0.49705827", "0.49705827", "0.49705827", "0.49705827", "0.49705827", "0.49705827", "0.49688646", "0.4967561", "0.49672058", "0.49601096", "0.4959329", "0.49543434", "0.49422488", "0.49331984", "0.49203056", "0.49188998", "0.49136728", "0.49097422", "0.49063763", "0.48929077", "0.48908278", "0.48841032", "0.4883663", "0.4876572", "0.4874072", "0.48689243", "0.48513258", "0.48513216", "0.48483244", "0.4843139", "0.48402858" ]
0.49218094
82
Returns the value from the range [`from`; `to`] that satisfies `pred` and is closest to `from`. Assumes that at least `to` satisfies `pred`. Supports `from` being greater than `to`.
function findFirst(pred, from, to) { // At any point we are certain `to` satisfies `pred`, don't know // whether `from` does. var dir = from > to ? -1 : 1; for (;;) { if (from == to) { return from } var midF = (from + to) / 2, mid = dir < 0 ? Math.ceil(midF) : Math.floor(midF); if (mid == from) { return pred(mid) ? from : to } if (pred(mid)) { to = mid; } else { from = mid + dir; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findFirst(pred, from, to) {\n // At any point we are certain `to` satisfies `pred`, don't know\n // whether `from` does.\n var dir = from > to ? -1 : 1;\n for (;;) {\n if (from == to) { return from }\n var midF = (from + to) / 2, mid = dir < 0 ? Math.ceil(midF) : Math.floor(midF);\n if (mid == from) { return pred(mid) ? from : to }\n if (pred(mid)) { to = mid; }\n else { from = mid + dir; }\n }\n}", "function findFirst(pred, from, to) {\n // At any point we are certain `to` satisfies `pred`, don't know\n // whether `from` does.\n var dir = from > to ? -1 : 1;\n for (;;) {\n if (from == to) { return from }\n var midF = (from + to) / 2, mid = dir < 0 ? Math.ceil(midF) : Math.floor(midF);\n if (mid == from) { return pred(mid) ? from : to }\n if (pred(mid)) { to = mid; }\n else { from = mid + dir; }\n }\n}", "function findFirst(pred, from, to) {\n // At any point we are certain `to` satisfies `pred`, don't know\n // whether `from` does.\n var dir = from > to ? -1 : 1;\n for (;;) {\n if (from == to) { return from }\n var midF = (from + to) / 2, mid = dir < 0 ? Math.ceil(midF) : Math.floor(midF);\n if (mid == from) { return pred(mid) ? from : to }\n if (pred(mid)) { to = mid; }\n else { from = mid + dir; }\n }\n}", "function findFirst(pred, from, to) {\n // At any point we are certain `to` satisfies `pred`, don't know\n // whether `from` does.\n var dir = from > to ? -1 : 1;\n for (;;) {\n if (from == to) { return from }\n var midF = (from + to) / 2, mid = dir < 0 ? Math.ceil(midF) : Math.floor(midF);\n if (mid == from) { return pred(mid) ? from : to }\n if (pred(mid)) { to = mid; }\n else { from = mid + dir; }\n }\n}", "function findFirst(pred, from, to) {\n // At any point we are certain `to` satisfies `pred`, don't know\n // whether `from` does.\n var dir = from > to ? -1 : 1;\n for (;;) {\n if (from == to) { return from }\n var midF = (from + to) / 2, mid = dir < 0 ? Math.ceil(midF) : Math.floor(midF);\n if (mid == from) { return pred(mid) ? from : to }\n if (pred(mid)) { to = mid; }\n else { from = mid + dir; }\n }\n}", "function findFirst(pred, from, to) {\n // At any point we are certain `to` satisfies `pred`, don't know\n // whether `from` does.\n var dir = from > to ? -1 : 1;\n for (;;) {\n if (from == to) { return from }\n var midF = (from + to) / 2, mid = dir < 0 ? Math.ceil(midF) : Math.floor(midF);\n if (mid == from) { return pred(mid) ? from : to }\n if (pred(mid)) { to = mid; }\n else { from = mid + dir; }\n }\n}", "function findFirst(pred, from, to) {\n // At any point we are certain `to` satisfies `pred`, don't know\n // whether `from` does.\n var dir = from > to ? -1 : 1;\n for (;;) {\n if (from == to) { return from }\n var midF = (from + to) / 2, mid = dir < 0 ? Math.ceil(midF) : Math.floor(midF);\n if (mid == from) { return pred(mid) ? from : to }\n if (pred(mid)) { to = mid; }\n else { from = mid + dir; }\n }\n}", "function findFirst(pred, from, to) {\n // At any point we are certain `to` satisfies `pred`, don't know\n // whether `from` does.\n var dir = from > to ? -1 : 1;\n for (;;) {\n if (from == to) { return from }\n var midF = (from + to) / 2, mid = dir < 0 ? Math.ceil(midF) : Math.floor(midF);\n if (mid == from) { return pred(mid) ? from : to }\n if (pred(mid)) { to = mid; }\n else { from = mid + dir; }\n }\n}", "function findFirst(pred, from, to) {\n // At any point we are certain `to` satisfies `pred`, don't know\n // whether `from` does.\n var dir = from > to ? -1 : 1;\n for (;;) {\n if (from == to) { return from }\n var midF = (from + to) / 2, mid = dir < 0 ? Math.ceil(midF) : Math.floor(midF);\n if (mid == from) { return pred(mid) ? from : to }\n if (pred(mid)) { to = mid; }\n else { from = mid + dir; }\n }\n}", "function findFirst(pred, from, to) {\n // At any point we are certain `to` satisfies `pred`, don't know\n // whether `from` does.\n var dir = from > to ? -1 : 1;\n for (;;) {\n if (from == to) { return from }\n var midF = (from + to) / 2, mid = dir < 0 ? Math.ceil(midF) : Math.floor(midF);\n if (mid == from) { return pred(mid) ? from : to }\n if (pred(mid)) { to = mid; }\n else { from = mid + dir; }\n }\n}", "function findFirst(pred, from, to) {\n for (;;) {\n if (Math.abs(from - to) <= 1) { return pred(from) ? from : to }\n var mid = Math.floor((from + to) / 2)\n if (pred(mid)) { to = mid }\n else { from = mid }\n }\n}", "function findFirst(pred, from, to) {\n for (;;) {\n if (Math.abs(from - to) <= 1) { return pred(from) ? from : to }\n var mid = Math.floor((from + to) / 2);\n if (pred(mid)) { to = mid; }\n else { from = mid; }\n }\n}", "function findFirst(pred, from, to) {\r\n // At any point we are certain `to` satisfies `pred`, don't know\r\n // whether `from` does.\r\n var dir = from > to ? -1 : 1;\r\n for (;;) {\r\n if (from == to) { return from }\r\n var midF = (from + to) / 2, mid = dir < 0 ? Math.ceil(midF) : Math.floor(midF);\r\n if (mid == from) { return pred(mid) ? from : to }\r\n if (pred(mid)) { to = mid; }\r\n else { from = mid + dir; }\r\n }\r\n}", "function findFirst(pred, from, to) {\n\t\t // At any point we are certain `to` satisfies `pred`, don't know\n\t\t // whether `from` does.\n\t\t var dir = from > to ? -1 : 1;\n\t\t for (;;) {\n\t\t if (from == to) { return from }\n\t\t var midF = (from + to) / 2, mid = dir < 0 ? Math.ceil(midF) : Math.floor(midF);\n\t\t if (mid == from) { return pred(mid) ? from : to }\n\t\t if (pred(mid)) { to = mid; }\n\t\t else { from = mid + dir; }\n\t\t }\n\t\t }", "function findFirst(pred, from, to) {\n // At any point we are certain `to` satisfies `pred`, don't know\n // whether `from` does.\n var dir = from > to ? -1 : 1;\n\n for (;;) {\n if (from == to) {\n return from;\n }\n\n var midF = (from + to) / 2,\n mid = dir < 0 ? Math.ceil(midF) : Math.floor(midF);\n\n if (mid == from) {\n return pred(mid) ? from : to;\n }\n\n if (pred(mid)) {\n to = mid;\n } else {\n from = mid + dir;\n }\n }\n } // BIDI HELPERS", "function closest(value, to) {\n return Math.round(value / to) * to;\n }", "function closest(value, to) {\n return Math.round(value / to) * to;\n }", "function closest(value, to) {\n return Math.round(value / to) * to;\n }", "function closest(value, to) {\n return Math.round(value / to) * to;\n }", "function closest(value, to) {\n return Math.round(value / to) * to;\n }", "function closest(value, to) {\n return Math.round(value / to) * to;\n }", "function closest(value, to) {\n return Math.round(value / to) * to;\n }", "function closest ( value, to ) {\r\n\t\treturn Math.round(value / to) * to;\r\n\t}", "function closest ( value, to ) {\r\n\t\treturn Math.round(value / to) * to;\r\n\t}", "function closest(value, to) {\n return Math.round(value / to) * to;\n }", "function closest ( value, to ) {\n\t\treturn Math.round(value / to) * to;\n\t}", "function closest ( value, to ) {\n\t\treturn Math.round(value / to) * to;\n\t}", "function closest ( value, to ) {\n\t\treturn Math.round(value / to) * to;\n\t}", "function closest ( value, to ) {\n\t\treturn Math.round(value / to) * to;\n\t}", "function closest ( value, to ) {\n\t\treturn Math.round(value / to) * to;\n\t}", "function closest ( value, to ) {\n\t\treturn Math.round(value / to) * to;\n\t}", "function closest ( value, to ) {\n\t\treturn Math.round(value / to) * to;\n\t}", "function closest ( value, to ) {\n\t\treturn Math.round(value / to) * to;\n\t}", "function closest ( value, to ) {\n\t\treturn Math.round(value / to) * to;\n\t}", "function closest ( value, to ) {\n\t\treturn Math.round(value / to) * to;\n\t}", "function closest ( value, to ) {\n\t\treturn Math.round(value / to) * to;\n\t}", "function closest ( value, to ) {\n\t\treturn Math.round(value / to) * to;\n\t}", "function closest ( value, to ) {\n\t\treturn Math.round(value / to) * to;\n\t}", "function closest ( value, to ) {\r\n\t\t\treturn Math.round(value / to) * to;\r\n\t\t}", "function closest ( value, to ) {\n\t\t\treturn Math.round(value / to) * to;\n\t\t}", "function C(e,t,a){for(\n // At any point we are certain `to` satisfies `pred`, don't know\n // whether `from` does.\n var n=t>a?-1:1;;){if(t==a)return t;var r=(t+a)/2,f=n<0?Math.ceil(r):Math.floor(r);if(f==t)return e(f)?t:a;e(f)?a=f:t=f+n}}", "function nearest(value, min, max)\n {\n if((value-min)>(max-value))\n {\n return max;\n }\n else\n {\n return min;\n }\n }", "function mapValueInRange(value, fromLow, fromHigh, toLow, toHigh) {\n var fromRangeSize = fromHigh - fromLow;\n var toRangeSize = toHigh - toLow;\n var valueScale = (value - fromLow) / fromRangeSize;\n return toLow + valueScale * toRangeSize;\n}", "function computeCost(x,min,max,from){\n if(x < min){\n return min-x+from-x;\n }else if(x > max){\n return x-max+x-from;\n }else{\n return Math.abs(x-from);\n }\n}", "rangeMapping(value, from, to) {\n return Math.floor(to[0] + (value - from[0]) * (to[1] - to[0]) / (from[1] - from[0]));\n }", "map(value, startRangeLower, startRangeHigher, targetRangeLower, targetRangeHigher)\n {\n let startSpan = startRangeHigher - startRangeLower;\n let targetSpan = targetRangeHigher - targetRangeLower;\n return (((value - startRangeLower) / startSpan) * targetSpan) + targetRangeLower;\n }", "function lowerbound(arr, value, compare, start, to) {\r\n if (start === void 0) { start = 0; }\r\n if (to === void 0) { to = arr.length; }\r\n var count = to - start;\r\n while (0 < count) {\r\n var count2 = (count >> 1);\r\n var mid = start + count2;\r\n if (compare(arr[mid], value)) {\r\n start = mid + 1;\r\n count -= count2 + 1;\r\n }\r\n else {\r\n count = count2;\r\n }\r\n }\r\n return start;\r\n}", "isCloseTo(value, to) {\n return value >= to - VectorMath.TOLERANCE && value <= to + VectorMath.TOLERANCE;\n }", "function nearest(from) {\n\tvar to = indexOfMin(distances[from]);\n\tif (distances[from][to] < infinDist) {\n\t\tdistances[from][to] = distances[to][from]= infinDist;\n\t\treturn to;\n\t}\n\treturn -1;\n}", "function map_range(value, low1, high1, low2, high2) {\n return low2 + (high2 - low2) * (value - low1) / (high1 - low1);\n}", "function map_range(value, low1, high1, low2, high2) {\n return low2 + (high2 - low2) * (value - low1) / (high1 - low1);\n}", "function map_range(value, low1, high1, low2, high2) {\n return low2 + (high2 - low2) * (value - low1) / (high1 - low1);\n}", "function map_range(value, low1, high1, low2, high2) {\n return low2 + (high2 - low2) * (value - low1) / (high1 - low1);\n}", "function map_range(value, low1, high1, low2, high2) {\n return low2 + (high2 - low2) * (value - low1) / (high1 - low1);\n}", "function closest (num, arr) {\n // mid, low and high are the index values of the arr\n let mid;\n let low = 0;\n let high = arr.length - 1;\n while (high - low > 1) {\n mid = Math.floor((low + high) / 2);\n if (arr[mid] < num) {\n low = mid;\n } else {\n high = mid;\n }\n }\n // This condition checks for the smallest difference and prints the result when the low and high are closest to\n // our num. \n // Ex: If our array is [1, 2, 4] and our num = 2, low = 0, high = 1, it will check for \n // (num - arr[low] which is 2 - 1 = 1 <= arr[high] - num which is 4 - 2 = 2)\n // basically 1 <= 2 and the answer is 1\n if (num - arr[low] <= arr[high] - num) {\n return arr[low];\n }\n return arr[high];\n}", "function getBetween(from, to) {\n\tvar resultX = (from[0] + to[0]) / 2;\n\tvar resultY = (from[1] + to[1]) / 2;\n\treturn [resultX, resultY];\n}", "function map(value, fromRangeMin, fromRangeMax, toRangeMin, toRangeMax) {\n return (value - fromRangeMin) * (toRangeMax - toRangeMin) / (fromRangeMax - fromRangeMin) + toRangeMin;\n }", "function guard(low, high, value) {\n return Math.min(Math.max(low, value), high);\n}", "function valueInRange (start, value, finish) {\n return (start <= value) && (value <= finish);\n}", "function valueInRange (start, value, finish) {\n return (start <= value) && (value <= finish);\n}", "function valueMapRange(value, inValueX, inValueY, outValueX, outValueY) {\n return (value - inValueX) * (outValueY - outValueX) / (inValueY - inValueX) + outValueX;\n}", "function approach(value, valueDest, rate) {\n\tif (value < valueDest) {\n\t\tvalue += Math.abs(value - valueDest) / rate;\n\t}\n\telse if (value > valueDest) {\n\t\tvalue -= Math.abs(value - valueDest) / rate;\n\t}\n\n\treturn value;\n}", "mapDataPoint (value, in_min, in_max, out_min, out_max) {\n // Shift negative values up into positive range\n if (in_min < 0 || in_max < 0) {\n in_max = in_max + -in_min\n value = value + -in_min\n in_min = in_min + -in_min\n }\n return out_min + (out_max - out_min) * ((value - in_min) / (in_max - in_min))\n }", "_getAbsoluteValue(val, min = windowDimensions.width * -2, max = 0)\n {\n if (val < min)\n return min\n else if (val > max)\n return max\n else \n return val\n }", "function rangeChecker(op, target, range){\r\n return op < target + range && op > target - range;\r\n}", "function map_range(value, low1, high1, low2, high2) {\r\n return low2 + (high2 - low2) * (value - low1) / (high1 - low1);\r\n }", "function between(value, min, max) {\n return Math.max(min, Math.min(value, max));\n }", "function getRandomInRange(from, to, fixed) {\n return (Math.random() * (to - from) + from).toFixed(fixed) * 1;\n // .toFixed() returns string, so ' * 1' is a trick to convert to number\n}", "function clampBetween(value, lowerBound, upperBound) {\n let result;\n if ( value >= lowerBound && value <= upperBound) {\n result = value;\n } else if (value < lowerBound) {\n result = lowerBound;\n } else if ( value > upperBound) {\n result = upperBound;\n }\n return result;\n}", "static randomLHS(from, to, affinity) {\n\t\tif (typeof to === 'undefined') {\n\t\t\tto = from;\n\t\t\tfrom = 0;\n\t\t}\n\t\tvar random = Math.random() * (to - from),\n\t\t\tresult = (Math.pow(random, 2) / to) + from;\n\t\tif (to < 2) return result;\n\t\treturn Math.floor(result);\n\t}", "function binarySearch(array, pred) {\r\n let lo = -1,\r\n hi = array.length;\r\n while (1 + lo < hi) {\r\n const mi = lo + ((hi - lo) >> 1);\r\n if (pred(array[mi])) {\r\n hi = mi;\r\n } else {\r\n lo = mi;\r\n }\r\n }\r\n return hi;\r\n}", "function between(val, min, max) {\n\t\treturn Math.min(Math.max(min, val), max);\n\t}", "function avance(val, dist) {\n if (val * 100 < dist) return dist - val * 100\n return 0\n}", "function constrain(x,lower,upper) {\n if (x > upper) {\n return upper;\n } else if (x < lower) {\n return lower;\n } else {\n return x;\n }\n }", "between( between, dependentVal){\n if( dependentVal > between[0] && dependentVal < between[1]){\n return true;\n }else{\n return false;\n }\n\n}", "function binarySearch(array, pred) {\n var lo = -1,\n hi = array.length;\n while (1 + lo < hi) {\n var mi = lo + ((hi - lo) >> 1);\n if (pred(array[mi], array, mi)) {\n hi = mi;\n } else {\n lo = mi;\n }\n }\n return hi;\n}", "function lookup(value, ay, low, high) {\r\n if(high <= low) {\r\n return (value > dst[low]) ? (low + 1) : low\r\n }\r\n // Compute mid\r\n let mid = Math.floor((low + high)/2)\r\n // Compare value with ay[mid]\r\n if(value === dst[mid]) {\r\n return mid\r\n }\r\n if(value < dst[mid]){\r\n //check lower half for match\r\n return lookup(value, ay, low, mid-1)\r\n } else {\r\n //check upper half for match\r\n return lookup(value, ay, mid+1, high)\r\n }\r\n // adjust low or high to either mid+1 or mid-1 respectively\r\n // call lookup again and return the value, like this:\r\n\r\n return lookup(value, ay, low, high)\r\n}", "function closestTo (arr, key, isPrev) {\n const offsetIndex = isPrev ? -1 : 1\n const current = arr.indexOf(key)\n return arr[current + offsetIndex]\n}", "findTarget(value) {\n if (value < this.value && this.left) {\n return this.left.findTarget(value);\n } else if (value >= this.value && this.right) {\n return this.right.findTarget(value);\n }\n\n return this;\n }", "function point(min, max){\n return chance.integer({ min: min || -50, max: max || 150 });\n }", "function array_closest(arr,val) {\n\t\t/*\n\t\tvar min_val=-1; var max_val; var min_key; var max_key;\n\t\tfor(var k in arr) {\n\t\t\tif(val==arr[k]) {\n\t\t\t\treturn [k];\n\t\t\t} else if(arr[k]<val) {\n\t\t\t\tif(arr[k]>min_val) {\n\t\t\t\t\tmin_val = arr[k];\n\t\t\t\t\tmin_key = k;\n\t\t\t\t}\n\t\t\t} else if(arr[k]>val) {\n\t\t\t\tif(!max_val||arr[k]<max_val) {\n\t\t\t\t\tmax_val = arr[k];\n\t\t\t\t\tmax_key = k;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn [min_key, max_key];\n*/\n\t\tvar lo = null;\n\t\tvar hi = null;\n\t for(var i in arr) {\n\t \tif(arr[i]==val) {\n\t \t\treturn Array(i);\n\t \t}\n\t if (arr[i] <= val && (lo === null || lo < arr[i])) {\n\t \tlo = arr[i];\n\t \tlo_k = i;\n\t }\n \tif (arr[i] >= val && (hi === null || hi > arr[i])) {\n \t\thi = arr[i];\n \t\thi_k = i;\n \t}\n \t};\n \tif(hi_k!=lo_k+1) {\n \t\tlo_k = hi_k-1;\n \t\t//echo \"hmm... \";\n \t}\n\t return new Array(lo_k, hi_k);\n\t}", "getClosest(arr, val) {\n return arr.reduce(function (prev, curr) {\n return (Math.abs(curr - val) < Math.abs(prev - val) ? curr : prev);\n });\n }", "function map(value, in_min, in_max, out_min, out_max){\n return (value - in_min) * (out_max - out_min) / (in_max - in_min) + out_min\n}", "function point(min, max) {\n return chance.integer({min: min || -100, max: max || 1100})\n }" ]
[ "0.7216477", "0.7216477", "0.7216477", "0.7216477", "0.7216477", "0.7216477", "0.7216477", "0.7216477", "0.7216477", "0.7216477", "0.7190594", "0.71828854", "0.71514124", "0.7010212", "0.65170527", "0.6057039", "0.6018446", "0.6018446", "0.6018446", "0.6018446", "0.6018446", "0.6018446", "0.600167", "0.600167", "0.5998453", "0.5989069", "0.5989069", "0.5989069", "0.5989069", "0.5989069", "0.5989069", "0.5989069", "0.5989069", "0.5989069", "0.5989069", "0.5989069", "0.5989069", "0.5989069", "0.59386736", "0.5910779", "0.58514893", "0.56033814", "0.5385108", "0.52531844", "0.523922", "0.5109425", "0.5030699", "0.5011067", "0.49337596", "0.4919886", "0.4919886", "0.4919886", "0.4919886", "0.4919886", "0.48389125", "0.48331884", "0.48278135", "0.47955522", "0.4780645", "0.4780645", "0.47772262", "0.47369257", "0.47358358", "0.47355163", "0.47155312", "0.46757826", "0.46646598", "0.46577707", "0.46427512", "0.4641149", "0.46394938", "0.4636485", "0.46295673", "0.4598874", "0.4597864", "0.4584713", "0.45698723", "0.4556325", "0.45524824", "0.45494536", "0.4547704", "0.4547091", "0.45431444", "0.45254746" ]
0.7149773
25
Get the bidi ordering for the given line (and cache it). Returns false for lines that are fully lefttoright, and an array of BidiSpan objects otherwise.
function getOrder(line, direction) { var order = line.order; if (order == null) { order = line.order = bidiOrdering(line.text, direction); } return order }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getOrder(line) {\n\t\t var order = line.order;\n\t\t if (order == null) order = line.order = bidiOrdering(line.text);\n\t\t return order;\n\t\t }", "function getOrder(line) {\n\t var order = line.order;\n\t if (order == null) order = line.order = bidiOrdering(line.text);\n\t return order;\n\t }", "function getOrder(line) {\n\t var order = line.order;\n\t if (order == null) order = line.order = bidiOrdering(line.text);\n\t return order;\n\t }", "function getOrder(line) {\n\t var order = line.order;\n\t if (order == null) order = line.order = bidiOrdering(line.text);\n\t return order;\n\t }", "function getOrder(line) {\n var order = line.order;\n if (order == null) order = line.order = bidiOrdering(line.text);\n return order;\n }", "function getOrder(line) {\n var order = line.order;\n if (order == null) order = line.order = bidiOrdering(line.text);\n return order;\n }", "function getOrder(line) {\n var order = line.order;\n if (order == null) order = line.order = bidiOrdering(line.text);\n return order;\n }", "function getOrder(line) {\n var order = line.order;\n if (order == null) order = line.order = bidiOrdering(line.text);\n return order;\n }", "function getOrder(line) {\n var order = line.order;\n if (order == null) order = line.order = bidiOrdering(line.text);\n return order;\n }", "function getOrder(line) {\n var order = line.order;\n if (order == null) order = line.order = bidiOrdering(line.text);\n return order;\n }", "function getOrder(line) {\n var order = line.order;\n if (order == null) order = line.order = bidiOrdering(line.text);\n return order;\n }", "function getOrder(line) {\r\n var order = line.order;\r\n if (order == null) order = line.order = bidiOrdering(line.text);\r\n return order;\r\n }", "function getOrder(line) {\n var order = line.order\n if (order == null) { order = line.order = bidiOrdering(line.text) }\n return order\n}", "function getOrder(line, direction) {\n\t\t var order = line.order;\n\t\t if (order == null) { order = line.order = bidiOrdering(line.text, direction); }\n\t\t return order\n\t\t }", "function getOrder(line, direction) {\r\n var order = line.order;\r\n if (order == null) { order = line.order = bidiOrdering(line.text, direction); }\r\n return order\r\n}", "function getOrder(line, direction) {\n var order = line.order;\n if (order == null) { order = line.order = bidiOrdering(line.text, direction); }\n return order\n}", "function getOrder(line, direction) {\n var order = line.order;\n if (order == null) { order = line.order = bidiOrdering(line.text, direction); }\n return order\n}", "function getOrder(line, direction) {\n var order = line.order;\n if (order == null) { order = line.order = bidiOrdering(line.text, direction); }\n return order\n}", "function getOrder(line, direction) {\n var order = line.order;\n if (order == null) { order = line.order = bidiOrdering(line.text, direction); }\n return order\n}", "function getOrder(line, direction) {\n var order = line.order;\n if (order == null) { order = line.order = bidiOrdering(line.text, direction); }\n return order\n}", "function getOrder(line, direction) {\n var order = line.order;\n if (order == null) { order = line.order = bidiOrdering(line.text, direction); }\n return order\n}", "function getOrder(line, direction) {\n var order = line.order;\n if (order == null) { order = line.order = bidiOrdering(line.text, direction); }\n return order\n}", "function getOrder(line, direction) {\n var order = line.order;\n if (order == null) { order = line.order = bidiOrdering(line.text, direction); }\n return order\n}", "function getOrder(line, direction) {\n var order = line.order;\n if (order == null) { order = line.order = bidiOrdering(line.text, direction); }\n return order\n}", "function getOrder(line, direction) {\n var order = line.order;\n if (order == null) { order = line.order = bidiOrdering(line.text, direction); }\n return order\n}", "function getOrder(line, direction) {\n var order = line.order;\n if (order == null) { order = line.order = bidiOrdering(line.text, direction); }\n return order\n}", "function getOrder(line, direction) {\n var order = line.order\n if (order == null) { order = line.order = bidiOrdering(line.text, direction) }\n return order\n}", "function getOrder(line, direction) {\n var order = line.order;\n\n if (order == null) {\n order = line.order = bidiOrdering(line.text, direction);\n }\n\n return order;\n } // EVENT HANDLING", "reArrangeElementsForRtl(line, isParaBidi) {\n if (line.children.length === 0) {\n return;\n }\n let lastAddedElementIsRtl = false;\n let lastAddedRtlElementIndex = -1;\n let tempElements = [];\n for (let i = 0; i < line.children.length; i++) {\n let element = line.children[i];\n let elementCharacterFormat = undefined;\n if (element.characterFormat) {\n elementCharacterFormat = element.characterFormat;\n }\n let isRtl = false;\n let text = '';\n //let containsSpecchrs: boolean = false;\n if (element instanceof BookmarkElementBox) {\n if (isParaBidi) {\n if (lastAddedElementIsRtl || element.bookmarkType === 0 && element.nextElement\n && element.nextElement.nextElement instanceof TextElementBox\n && this.viewer.textHelper.isRTLText(element.nextElement.nextElement.text)\n || element.bookmarkType === 1 && element.nextElement instanceof TextElementBox\n && this.viewer.textHelper.isRTLText(element.nextElement.text)) {\n tempElements.splice(0, 0, element);\n }\n else {\n tempElements.splice(lastAddedElementIsRtl ? lastAddedRtlElementIndex : lastAddedRtlElementIndex + 1, 0, element);\n }\n lastAddedRtlElementIndex = tempElements.indexOf(element);\n }\n else {\n tempElements.push(element);\n }\n continue;\n }\n if (element instanceof TextElementBox) {\n text = element.text;\n }\n // The list element box shold be added in the last position in line widget for the RTL paragraph \n // and first in the line widget for LTR paragrph.\n if (element instanceof ListTextElementBox) {\n isRtl = isParaBidi;\n }\n else { // For Text element box we need to check the character format and unicode of text to detect the RTL text. \n isRtl = this.viewer.textHelper.isRTLText(text) || elementCharacterFormat.bidi\n || elementCharacterFormat.bdo === 'RTL';\n }\n // If the text element box contains only whitespaces, then need to check the previous and next elements.\n if (!isRtl && !isNullOrUndefined(text) && text !== '' && text.trim() === '') {\n let elements = line.children;\n //Checks whether the langugae is RTL.\n if (elementCharacterFormat.bidi) {\n // If the last added element is rtl then current text element box also considered as RTL for WhiteSpaces.\n if (lastAddedElementIsRtl) {\n isRtl = true;\n // Else, Check for next element.\n }\n else if (i + 1 < line.children.length && line.children[i + 1] instanceof TextElementBox) {\n text = elements[i + 1].text;\n isRtl = this.viewer.textHelper.isRTLText(text) || elements[i + 1].characterFormat.bidi\n || elements[i + 1].characterFormat.bdo === 'RTL';\n } // If the last added element is rtl then current text element box also considered as RTL for WhiteSpaces.\n }\n else if (lastAddedElementIsRtl) {\n isRtl = true;\n }\n }\n // Preserve the isRTL value, to reuse it for navigation and selection.\n element.isRightToLeft = isRtl;\n //Adds the text element to the line\n if (isRtl && elementCharacterFormat.bdo !== 'LTR') {\n if (lastAddedElementIsRtl) {\n tempElements.splice(lastAddedRtlElementIndex, 0, element);\n }\n else {\n if (!isParaBidi) {\n tempElements.push(element);\n }\n else {\n tempElements.splice(0, 0, element);\n }\n lastAddedElementIsRtl = true;\n lastAddedRtlElementIndex = tempElements.indexOf(element);\n }\n }\n else {\n if (lastAddedElementIsRtl && element instanceof ImageElementBox) {\n if (elementCharacterFormat.bidi) {\n tempElements.splice(lastAddedRtlElementIndex + 1, 0, element);\n }\n else {\n tempElements.splice(lastAddedRtlElementIndex, 0, element);\n }\n }\n else {\n if (!isParaBidi) {\n tempElements.push(element);\n }\n else {\n if (lastAddedElementIsRtl) {\n tempElements.splice(0, 0, element);\n }\n else {\n tempElements.splice(lastAddedRtlElementIndex + 1, 0, element);\n }\n lastAddedRtlElementIndex = tempElements.indexOf(element);\n }\n lastAddedElementIsRtl = false;\n }\n }\n }\n // Clear the elemnts and reassign the arranged elements.\n line.children = [];\n line.children = tempElements;\n }", "function moveVisually(line, start, dir, byUnit) {\n var bidi = getOrder(line);\n if (!bidi) return moveLogically(line, start, dir, byUnit);\n var moveOneUnit = byUnit ? function(pos, dir) {\n do pos += dir;\n while (pos > 0 && isExtendingChar.test(line.text.charAt(pos)));\n return pos;\n } : function(pos, dir) { return pos + dir; };\n var linedir = bidi[0].level;\n for (var i = 0; i < bidi.length; ++i) {\n var part = bidi[i], sticky = part.level % 2 == linedir;\n if ((part.from < start && part.to > start) ||\n (sticky && (part.from == start || part.to == start))) break;\n }\n var target = moveOneUnit(start, part.level % 2 ? -dir : dir);\n\n while (target != null) {\n if (part.level % 2 == linedir) {\n if (target < part.from || target > part.to) {\n part = bidi[i += dir];\n target = part && (dir > 0 == part.level % 2 ? moveOneUnit(part.to, -1) : moveOneUnit(part.from, 1));\n } else break;\n } else {\n if (target == bidiLeft(part)) {\n part = bidi[--i];\n target = part && bidiRight(part);\n } else if (target == bidiRight(part)) {\n part = bidi[++i];\n target = part && bidiLeft(part);\n } else break;\n }\n }\n\n return target < 0 || target > line.text.length ? null : target;\n }", "function moveVisually(line, start, dir, byUnit) {\n var bidi = getOrder(line);\n if (!bidi) return moveLogically(line, start, dir, byUnit);\n var moveOneUnit = byUnit ? function(pos, dir) {\n do pos += dir;\n while (pos > 0 && isExtendingChar.test(line.text.charAt(pos)));\n return pos;\n } : function(pos, dir) { return pos + dir; };\n var linedir = bidi[0].level;\n for (var i = 0; i < bidi.length; ++i) {\n var part = bidi[i], sticky = part.level % 2 == linedir;\n if ((part.from < start && part.to > start) ||\n (sticky && (part.from == start || part.to == start))) break;\n }\n var target = moveOneUnit(start, part.level % 2 ? -dir : dir);\n\n while (target != null) {\n if (part.level % 2 == linedir) {\n if (target < part.from || target > part.to) {\n part = bidi[i += dir];\n target = part && (dir > 0 == part.level % 2 ? moveOneUnit(part.to, -1) : moveOneUnit(part.from, 1));\n } else break;\n } else {\n if (target == bidiLeft(part)) {\n part = bidi[--i];\n target = part && bidiRight(part);\n } else if (target == bidiRight(part)) {\n part = bidi[++i];\n target = part && bidiLeft(part);\n } else break;\n }\n }\n\n return target < 0 || target > line.text.length ? null : target;\n }", "function moveVisually(line, start, dir, byUnit) {\n var bidi = getOrder(line);\n if (!bidi) return moveLogically(line, start, dir, byUnit);\n var moveOneUnit = byUnit ? function(pos, dir) {\n do pos += dir;\n while (pos > 0 && isExtendingChar.test(line.text.charAt(pos)));\n return pos;\n } : function(pos, dir) { return pos + dir; };\n var linedir = bidi[0].level;\n for (var i = 0; i < bidi.length; ++i) {\n var part = bidi[i], sticky = part.level % 2 == linedir;\n if ((part.from < start && part.to > start) ||\n (sticky && (part.from == start || part.to == start))) break;\n }\n var target = moveOneUnit(start, part.level % 2 ? -dir : dir);\n\n while (target != null) {\n if (part.level % 2 == linedir) {\n if (target < part.from || target > part.to) {\n part = bidi[i += dir];\n target = part && (dir > 0 == part.level % 2 ? moveOneUnit(part.to, -1) : moveOneUnit(part.from, 1));\n } else break;\n } else {\n if (target == bidiLeft(part)) {\n part = bidi[--i];\n target = part && bidiRight(part);\n } else if (target == bidiRight(part)) {\n part = bidi[++i];\n target = part && bidiLeft(part);\n } else break;\n }\n }\n\n return target < 0 || target > line.text.length ? null : target;\n }", "function bidiSimplify(cm, range) {\n var anchor = range.anchor;\n var head = range.head;\n var anchorLine = getLine(cm.doc, anchor.line);\n\n if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) {\n return range;\n }\n\n var order = getOrder(anchorLine);\n\n if (!order) {\n return range;\n }\n\n var index = getBidiPartAt(order, anchor.ch, anchor.sticky),\n part = order[index];\n\n if (part.from != anchor.ch && part.to != anchor.ch) {\n return range;\n }\n\n var boundary = index + (part.from == anchor.ch == (part.level != 1) ? 0 : 1);\n\n if (boundary == 0 || boundary == order.length) {\n return range;\n } // Compute the relative visual position of the head compared to the\n // anchor (<0 is to the left, >0 to the right)\n\n\n var leftSide;\n\n if (head.line != anchor.line) {\n leftSide = (head.line - anchor.line) * (cm.doc.direction == \"ltr\" ? 1 : -1) > 0;\n } else {\n var headIndex = getBidiPartAt(order, head.ch, head.sticky);\n var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);\n\n if (headIndex == boundary - 1 || headIndex == boundary) {\n leftSide = dir < 0;\n } else {\n leftSide = dir > 0;\n }\n }\n\n var usePart = order[boundary + (leftSide ? -1 : 0)];\n var from = leftSide == (usePart.level == 1);\n var ch = from ? usePart.from : usePart.to,\n sticky = from ? \"after\" : \"before\";\n return anchor.ch == ch && anchor.sticky == sticky ? range : new Range(new Pos(anchor.line, ch, sticky), head);\n } // Determines whether an event happened in the gutter, and fires the", "function bidiSimplify(cm, range) {\n var anchor = range.anchor;\n var head = range.head;\n var anchorLine = getLine(cm.doc, anchor.line);\n if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range }\n var order = getOrder(anchorLine);\n if (!order) { return range }\n var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];\n if (part.from != anchor.ch && part.to != anchor.ch) { return range }\n var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);\n if (boundary == 0 || boundary == order.length) { return range }\n\n // Compute the relative visual position of the head compared to the\n // anchor (<0 is to the left, >0 to the right)\n var leftSide;\n if (head.line != anchor.line) {\n leftSide = (head.line - anchor.line) * (cm.doc.direction == \"ltr\" ? 1 : -1) > 0;\n } else {\n var headIndex = getBidiPartAt(order, head.ch, head.sticky);\n var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);\n if (headIndex == boundary - 1 || headIndex == boundary)\n { leftSide = dir < 0; }\n else\n { leftSide = dir > 0; }\n }\n\n var usePart = order[boundary + (leftSide ? -1 : 0)];\n var from = leftSide == (usePart.level == 1);\n var ch = from ? usePart.from : usePart.to, sticky = from ? \"after\" : \"before\";\n return anchor.ch == ch && anchor.sticky == sticky ? range : new Range(new Pos(anchor.line, ch, sticky), head)\n }", "function bidiSimplify(cm, range) {\n var anchor = range.anchor;\n var head = range.head;\n var anchorLine = getLine(cm.doc, anchor.line);\n if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range }\n var order = getOrder(anchorLine);\n if (!order) { return range }\n var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];\n if (part.from != anchor.ch && part.to != anchor.ch) { return range }\n var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);\n if (boundary == 0 || boundary == order.length) { return range }\n\n // Compute the relative visual position of the head compared to the\n // anchor (<0 is to the left, >0 to the right)\n var leftSide;\n if (head.line != anchor.line) {\n leftSide = (head.line - anchor.line) * (cm.doc.direction == \"ltr\" ? 1 : -1) > 0;\n } else {\n var headIndex = getBidiPartAt(order, head.ch, head.sticky);\n var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);\n if (headIndex == boundary - 1 || headIndex == boundary)\n { leftSide = dir < 0; }\n else\n { leftSide = dir > 0; }\n }\n\n var usePart = order[boundary + (leftSide ? -1 : 0)];\n var from = leftSide == (usePart.level == 1);\n var ch = from ? usePart.from : usePart.to, sticky = from ? \"after\" : \"before\";\n return anchor.ch == ch && anchor.sticky == sticky ? range : new Range(new Pos(anchor.line, ch, sticky), head)\n }", "function bidiSimplify(cm, range) {\n var anchor = range.anchor;\n var head = range.head;\n var anchorLine = getLine(cm.doc, anchor.line);\n if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range }\n var order = getOrder(anchorLine);\n if (!order) { return range }\n var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];\n if (part.from != anchor.ch && part.to != anchor.ch) { return range }\n var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);\n if (boundary == 0 || boundary == order.length) { return range }\n\n // Compute the relative visual position of the head compared to the\n // anchor (<0 is to the left, >0 to the right)\n var leftSide;\n if (head.line != anchor.line) {\n leftSide = (head.line - anchor.line) * (cm.doc.direction == \"ltr\" ? 1 : -1) > 0;\n } else {\n var headIndex = getBidiPartAt(order, head.ch, head.sticky);\n var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);\n if (headIndex == boundary - 1 || headIndex == boundary)\n { leftSide = dir < 0; }\n else\n { leftSide = dir > 0; }\n }\n\n var usePart = order[boundary + (leftSide ? -1 : 0)];\n var from = leftSide == (usePart.level == 1);\n var ch = from ? usePart.from : usePart.to, sticky = from ? \"after\" : \"before\";\n return anchor.ch == ch && anchor.sticky == sticky ? range : new Range(new Pos(anchor.line, ch, sticky), head)\n }", "function bidiSimplify(cm, range) {\n var anchor = range.anchor;\n var head = range.head;\n var anchorLine = getLine(cm.doc, anchor.line);\n if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range }\n var order = getOrder(anchorLine);\n if (!order) { return range }\n var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];\n if (part.from != anchor.ch && part.to != anchor.ch) { return range }\n var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);\n if (boundary == 0 || boundary == order.length) { return range }\n\n // Compute the relative visual position of the head compared to the\n // anchor (<0 is to the left, >0 to the right)\n var leftSide;\n if (head.line != anchor.line) {\n leftSide = (head.line - anchor.line) * (cm.doc.direction == \"ltr\" ? 1 : -1) > 0;\n } else {\n var headIndex = getBidiPartAt(order, head.ch, head.sticky);\n var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);\n if (headIndex == boundary - 1 || headIndex == boundary)\n { leftSide = dir < 0; }\n else\n { leftSide = dir > 0; }\n }\n\n var usePart = order[boundary + (leftSide ? -1 : 0)];\n var from = leftSide == (usePart.level == 1);\n var ch = from ? usePart.from : usePart.to, sticky = from ? \"after\" : \"before\";\n return anchor.ch == ch && anchor.sticky == sticky ? range : new Range(new Pos(anchor.line, ch, sticky), head)\n }", "function bidiSimplify(cm, range) {\n var anchor = range.anchor;\n var head = range.head;\n var anchorLine = getLine(cm.doc, anchor.line);\n if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range }\n var order = getOrder(anchorLine);\n if (!order) { return range }\n var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];\n if (part.from != anchor.ch && part.to != anchor.ch) { return range }\n var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);\n if (boundary == 0 || boundary == order.length) { return range }\n\n // Compute the relative visual position of the head compared to the\n // anchor (<0 is to the left, >0 to the right)\n var leftSide;\n if (head.line != anchor.line) {\n leftSide = (head.line - anchor.line) * (cm.doc.direction == \"ltr\" ? 1 : -1) > 0;\n } else {\n var headIndex = getBidiPartAt(order, head.ch, head.sticky);\n var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);\n if (headIndex == boundary - 1 || headIndex == boundary)\n { leftSide = dir < 0; }\n else\n { leftSide = dir > 0; }\n }\n\n var usePart = order[boundary + (leftSide ? -1 : 0)];\n var from = leftSide == (usePart.level == 1);\n var ch = from ? usePart.from : usePart.to, sticky = from ? \"after\" : \"before\";\n return anchor.ch == ch && anchor.sticky == sticky ? range : new Range(new Pos(anchor.line, ch, sticky), head)\n }", "function bidiSimplify(cm, range) {\n var anchor = range.anchor;\n var head = range.head;\n var anchorLine = getLine(cm.doc, anchor.line);\n if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range }\n var order = getOrder(anchorLine);\n if (!order) { return range }\n var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];\n if (part.from != anchor.ch && part.to != anchor.ch) { return range }\n var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);\n if (boundary == 0 || boundary == order.length) { return range }\n\n // Compute the relative visual position of the head compared to the\n // anchor (<0 is to the left, >0 to the right)\n var leftSide;\n if (head.line != anchor.line) {\n leftSide = (head.line - anchor.line) * (cm.doc.direction == \"ltr\" ? 1 : -1) > 0;\n } else {\n var headIndex = getBidiPartAt(order, head.ch, head.sticky);\n var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);\n if (headIndex == boundary - 1 || headIndex == boundary)\n { leftSide = dir < 0; }\n else\n { leftSide = dir > 0; }\n }\n\n var usePart = order[boundary + (leftSide ? -1 : 0)];\n var from = leftSide == (usePart.level == 1);\n var ch = from ? usePart.from : usePart.to, sticky = from ? \"after\" : \"before\";\n return anchor.ch == ch && anchor.sticky == sticky ? range : new Range(new Pos(anchor.line, ch, sticky), head)\n }", "function bidiSimplify(cm, range) {\n var anchor = range.anchor;\n var head = range.head;\n var anchorLine = getLine(cm.doc, anchor.line);\n if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range }\n var order = getOrder(anchorLine);\n if (!order) { return range }\n var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];\n if (part.from != anchor.ch && part.to != anchor.ch) { return range }\n var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);\n if (boundary == 0 || boundary == order.length) { return range }\n\n // Compute the relative visual position of the head compared to the\n // anchor (<0 is to the left, >0 to the right)\n var leftSide;\n if (head.line != anchor.line) {\n leftSide = (head.line - anchor.line) * (cm.doc.direction == \"ltr\" ? 1 : -1) > 0;\n } else {\n var headIndex = getBidiPartAt(order, head.ch, head.sticky);\n var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);\n if (headIndex == boundary - 1 || headIndex == boundary)\n { leftSide = dir < 0; }\n else\n { leftSide = dir > 0; }\n }\n\n var usePart = order[boundary + (leftSide ? -1 : 0)];\n var from = leftSide == (usePart.level == 1);\n var ch = from ? usePart.from : usePart.to, sticky = from ? \"after\" : \"before\";\n return anchor.ch == ch && anchor.sticky == sticky ? range : new Range(new Pos(anchor.line, ch, sticky), head)\n }", "function bidiSimplify(cm, range) {\n var anchor = range.anchor;\n var head = range.head;\n var anchorLine = getLine(cm.doc, anchor.line);\n if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range }\n var order = getOrder(anchorLine);\n if (!order) { return range }\n var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];\n if (part.from != anchor.ch && part.to != anchor.ch) { return range }\n var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);\n if (boundary == 0 || boundary == order.length) { return range }\n\n // Compute the relative visual position of the head compared to the\n // anchor (<0 is to the left, >0 to the right)\n var leftSide;\n if (head.line != anchor.line) {\n leftSide = (head.line - anchor.line) * (cm.doc.direction == \"ltr\" ? 1 : -1) > 0;\n } else {\n var headIndex = getBidiPartAt(order, head.ch, head.sticky);\n var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);\n if (headIndex == boundary - 1 || headIndex == boundary)\n { leftSide = dir < 0; }\n else\n { leftSide = dir > 0; }\n }\n\n var usePart = order[boundary + (leftSide ? -1 : 0)];\n var from = leftSide == (usePart.level == 1);\n var ch = from ? usePart.from : usePart.to, sticky = from ? \"after\" : \"before\";\n return anchor.ch == ch && anchor.sticky == sticky ? range : new Range(new Pos(anchor.line, ch, sticky), head)\n }", "function moveVisually(line, start, dir, byUnit) {\n\t\t var bidi = getOrder(line);\n\t\t if (!bidi) return moveLogically(line, start, dir, byUnit);\n\t\t var pos = getBidiPartAt(bidi, start), part = bidi[pos];\n\t\t var target = moveInLine(line, start, part.level % 2 ? -dir : dir, byUnit);\n\t\t\n\t\t for (;;) {\n\t\t if (target > part.from && target < part.to) return target;\n\t\t if (target == part.from || target == part.to) {\n\t\t if (getBidiPartAt(bidi, target) == pos) return target;\n\t\t part = bidi[pos += dir];\n\t\t return (dir > 0) == part.level % 2 ? part.to : part.from;\n\t\t } else {\n\t\t part = bidi[pos += dir];\n\t\t if (!part) return null;\n\t\t if ((dir > 0) == part.level % 2)\n\t\t target = moveInLine(line, part.to, -1, byUnit);\n\t\t else\n\t\t target = moveInLine(line, part.from, 1, byUnit);\n\t\t }\n\t\t }\n\t\t }", "function moveVisually(line, start, dir, byUnit) {\n\t var bidi = getOrder(line);\n\t if (!bidi) return moveLogically(line, start, dir, byUnit);\n\t var pos = getBidiPartAt(bidi, start), part = bidi[pos];\n\t var target = moveInLine(line, start, part.level % 2 ? -dir : dir, byUnit);\n\t\n\t for (;;) {\n\t if (target > part.from && target < part.to) return target;\n\t if (target == part.from || target == part.to) {\n\t if (getBidiPartAt(bidi, target) == pos) return target;\n\t part = bidi[pos += dir];\n\t return (dir > 0) == part.level % 2 ? part.to : part.from;\n\t } else {\n\t part = bidi[pos += dir];\n\t if (!part) return null;\n\t if ((dir > 0) == part.level % 2)\n\t target = moveInLine(line, part.to, -1, byUnit);\n\t else\n\t target = moveInLine(line, part.from, 1, byUnit);\n\t }\n\t }\n\t }", "function moveVisually(line, start, dir, byUnit) {\n\t var bidi = getOrder(line);\n\t if (!bidi) return moveLogically(line, start, dir, byUnit);\n\t var pos = getBidiPartAt(bidi, start), part = bidi[pos];\n\t var target = moveInLine(line, start, part.level % 2 ? -dir : dir, byUnit);\n\n\t for (;;) {\n\t if (target > part.from && target < part.to) return target;\n\t if (target == part.from || target == part.to) {\n\t if (getBidiPartAt(bidi, target) == pos) return target;\n\t part = bidi[pos += dir];\n\t return (dir > 0) == part.level % 2 ? part.to : part.from;\n\t } else {\n\t part = bidi[pos += dir];\n\t if (!part) return null;\n\t if ((dir > 0) == part.level % 2)\n\t target = moveInLine(line, part.to, -1, byUnit);\n\t else\n\t target = moveInLine(line, part.from, 1, byUnit);\n\t }\n\t }\n\t }", "function moveVisually(line, start, dir, byUnit) {\n\t var bidi = getOrder(line);\n\t if (!bidi) return moveLogically(line, start, dir, byUnit);\n\t var pos = getBidiPartAt(bidi, start), part = bidi[pos];\n\t var target = moveInLine(line, start, part.level % 2 ? -dir : dir, byUnit);\n\n\t for (;;) {\n\t if (target > part.from && target < part.to) return target;\n\t if (target == part.from || target == part.to) {\n\t if (getBidiPartAt(bidi, target) == pos) return target;\n\t part = bidi[pos += dir];\n\t return (dir > 0) == part.level % 2 ? part.to : part.from;\n\t } else {\n\t part = bidi[pos += dir];\n\t if (!part) return null;\n\t if ((dir > 0) == part.level % 2)\n\t target = moveInLine(line, part.to, -1, byUnit);\n\t else\n\t target = moveInLine(line, part.from, 1, byUnit);\n\t }\n\t }\n\t }", "function moveVisually(line, start, dir, byUnit) {\r\n var bidi = getOrder(line);\r\n if (!bidi) return moveLogically(line, start, dir, byUnit);\r\n var pos = getBidiPartAt(bidi, start), part = bidi[pos];\r\n var target = moveInLine(line, start, part.level % 2 ? -dir : dir, byUnit);\r\n\r\n for (;;) {\r\n if (target > part.from && target < part.to) return target;\r\n if (target == part.from || target == part.to) {\r\n if (getBidiPartAt(bidi, target) == pos) return target;\r\n part = bidi[pos += dir];\r\n return (dir > 0) == part.level % 2 ? part.to : part.from;\r\n } else {\r\n part = bidi[pos += dir];\r\n if (!part) return null;\r\n if ((dir > 0) == part.level % 2)\r\n target = moveInLine(line, part.to, -1, byUnit);\r\n else\r\n target = moveInLine(line, part.from, 1, byUnit);\r\n }\r\n }\r\n }", "function bidiSimplify(cm, range$$1) {\n var anchor = range$$1.anchor;\n var head = range$$1.head;\n var anchorLine = getLine(cm.doc, anchor.line);\n if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range$$1 }\n var order = getOrder(anchorLine);\n if (!order) { return range$$1 }\n var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];\n if (part.from != anchor.ch && part.to != anchor.ch) { return range$$1 }\n var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);\n if (boundary == 0 || boundary == order.length) { return range$$1 }\n\n // Compute the relative visual position of the head compared to the\n // anchor (<0 is to the left, >0 to the right)\n var leftSide;\n if (head.line != anchor.line) {\n leftSide = (head.line - anchor.line) * (cm.doc.direction == \"ltr\" ? 1 : -1) > 0;\n } else {\n var headIndex = getBidiPartAt(order, head.ch, head.sticky);\n var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);\n if (headIndex == boundary - 1 || headIndex == boundary)\n { leftSide = dir < 0; }\n else\n { leftSide = dir > 0; }\n }\n\n var usePart = order[boundary + (leftSide ? -1 : 0)];\n var from = leftSide == (usePart.level == 1);\n var ch = from ? usePart.from : usePart.to, sticky = from ? \"after\" : \"before\";\n return anchor.ch == ch && anchor.sticky == sticky ? range$$1 : new Range(new Pos(anchor.line, ch, sticky), head)\n }", "function bidiSimplify(cm, range$$1) {\n var anchor = range$$1.anchor;\n var head = range$$1.head;\n var anchorLine = getLine(cm.doc, anchor.line);\n if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range$$1 }\n var order = getOrder(anchorLine);\n if (!order) { return range$$1 }\n var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];\n if (part.from != anchor.ch && part.to != anchor.ch) { return range$$1 }\n var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);\n if (boundary == 0 || boundary == order.length) { return range$$1 }\n\n // Compute the relative visual position of the head compared to the\n // anchor (<0 is to the left, >0 to the right)\n var leftSide;\n if (head.line != anchor.line) {\n leftSide = (head.line - anchor.line) * (cm.doc.direction == \"ltr\" ? 1 : -1) > 0;\n } else {\n var headIndex = getBidiPartAt(order, head.ch, head.sticky);\n var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);\n if (headIndex == boundary - 1 || headIndex == boundary)\n { leftSide = dir < 0; }\n else\n { leftSide = dir > 0; }\n }\n\n var usePart = order[boundary + (leftSide ? -1 : 0)];\n var from = leftSide == (usePart.level == 1);\n var ch = from ? usePart.from : usePart.to, sticky = from ? \"after\" : \"before\";\n return anchor.ch == ch && anchor.sticky == sticky ? range$$1 : new Range(new Pos(anchor.line, ch, sticky), head)\n }", "function bidiSimplify(cm, range$$1) {\n var anchor = range$$1.anchor;\n var head = range$$1.head;\n var anchorLine = getLine(cm.doc, anchor.line);\n if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range$$1 }\n var order = getOrder(anchorLine);\n if (!order) { return range$$1 }\n var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];\n if (part.from != anchor.ch && part.to != anchor.ch) { return range$$1 }\n var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);\n if (boundary == 0 || boundary == order.length) { return range$$1 }\n\n // Compute the relative visual position of the head compared to the\n // anchor (<0 is to the left, >0 to the right)\n var leftSide;\n if (head.line != anchor.line) {\n leftSide = (head.line - anchor.line) * (cm.doc.direction == \"ltr\" ? 1 : -1) > 0;\n } else {\n var headIndex = getBidiPartAt(order, head.ch, head.sticky);\n var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);\n if (headIndex == boundary - 1 || headIndex == boundary)\n { leftSide = dir < 0; }\n else\n { leftSide = dir > 0; }\n }\n\n var usePart = order[boundary + (leftSide ? -1 : 0)];\n var from = leftSide == (usePart.level == 1);\n var ch = from ? usePart.from : usePart.to, sticky = from ? \"after\" : \"before\";\n return anchor.ch == ch && anchor.sticky == sticky ? range$$1 : new Range(new Pos(anchor.line, ch, sticky), head)\n }", "function bidiSimplify(cm, range$$1) {\n var anchor = range$$1.anchor;\n var head = range$$1.head;\n var anchorLine = getLine(cm.doc, anchor.line);\n if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range$$1 }\n var order = getOrder(anchorLine);\n if (!order) { return range$$1 }\n var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];\n if (part.from != anchor.ch && part.to != anchor.ch) { return range$$1 }\n var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);\n if (boundary == 0 || boundary == order.length) { return range$$1 }\n\n // Compute the relative visual position of the head compared to the\n // anchor (<0 is to the left, >0 to the right)\n var leftSide;\n if (head.line != anchor.line) {\n leftSide = (head.line - anchor.line) * (cm.doc.direction == \"ltr\" ? 1 : -1) > 0;\n } else {\n var headIndex = getBidiPartAt(order, head.ch, head.sticky);\n var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);\n if (headIndex == boundary - 1 || headIndex == boundary)\n { leftSide = dir < 0; }\n else\n { leftSide = dir > 0; }\n }\n\n var usePart = order[boundary + (leftSide ? -1 : 0)];\n var from = leftSide == (usePart.level == 1);\n var ch = from ? usePart.from : usePart.to, sticky = from ? \"after\" : \"before\";\n return anchor.ch == ch && anchor.sticky == sticky ? range$$1 : new Range(new Pos(anchor.line, ch, sticky), head)\n }", "function bidiSimplify(cm, range$$1) {\n var anchor = range$$1.anchor;\n var head = range$$1.head;\n var anchorLine = getLine(cm.doc, anchor.line);\n if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range$$1 }\n var order = getOrder(anchorLine);\n if (!order) { return range$$1 }\n var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];\n if (part.from != anchor.ch && part.to != anchor.ch) { return range$$1 }\n var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);\n if (boundary == 0 || boundary == order.length) { return range$$1 }\n\n // Compute the relative visual position of the head compared to the\n // anchor (<0 is to the left, >0 to the right)\n var leftSide;\n if (head.line != anchor.line) {\n leftSide = (head.line - anchor.line) * (cm.doc.direction == \"ltr\" ? 1 : -1) > 0;\n } else {\n var headIndex = getBidiPartAt(order, head.ch, head.sticky);\n var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);\n if (headIndex == boundary - 1 || headIndex == boundary)\n { leftSide = dir < 0; }\n else\n { leftSide = dir > 0; }\n }\n\n var usePart = order[boundary + (leftSide ? -1 : 0)];\n var from = leftSide == (usePart.level == 1);\n var ch = from ? usePart.from : usePart.to, sticky = from ? \"after\" : \"before\";\n return anchor.ch == ch && anchor.sticky == sticky ? range$$1 : new Range(new Pos(anchor.line, ch, sticky), head)\n }", "function bidiSimplify(cm, range$$1) {\n var anchor = range$$1.anchor;\n var head = range$$1.head;\n var anchorLine = getLine(cm.doc, anchor.line);\n if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range$$1 }\n var order = getOrder(anchorLine);\n if (!order) { return range$$1 }\n var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];\n if (part.from != anchor.ch && part.to != anchor.ch) { return range$$1 }\n var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);\n if (boundary == 0 || boundary == order.length) { return range$$1 }\n\n // Compute the relative visual position of the head compared to the\n // anchor (<0 is to the left, >0 to the right)\n var leftSide;\n if (head.line != anchor.line) {\n leftSide = (head.line - anchor.line) * (cm.doc.direction == \"ltr\" ? 1 : -1) > 0;\n } else {\n var headIndex = getBidiPartAt(order, head.ch, head.sticky);\n var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);\n if (headIndex == boundary - 1 || headIndex == boundary)\n { leftSide = dir < 0; }\n else\n { leftSide = dir > 0; }\n }\n\n var usePart = order[boundary + (leftSide ? -1 : 0)];\n var from = leftSide == (usePart.level == 1);\n var ch = from ? usePart.from : usePart.to, sticky = from ? \"after\" : \"before\";\n return anchor.ch == ch && anchor.sticky == sticky ? range$$1 : new Range(new Pos(anchor.line, ch, sticky), head)\n }", "function bidiSimplify(cm, range$$1) {\n var anchor = range$$1.anchor;\n var head = range$$1.head;\n var anchorLine = getLine(cm.doc, anchor.line);\n if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range$$1 }\n var order = getOrder(anchorLine);\n if (!order) { return range$$1 }\n var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];\n if (part.from != anchor.ch && part.to != anchor.ch) { return range$$1 }\n var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);\n if (boundary == 0 || boundary == order.length) { return range$$1 }\n\n // Compute the relative visual position of the head compared to the\n // anchor (<0 is to the left, >0 to the right)\n var leftSide;\n if (head.line != anchor.line) {\n leftSide = (head.line - anchor.line) * (cm.doc.direction == \"ltr\" ? 1 : -1) > 0;\n } else {\n var headIndex = getBidiPartAt(order, head.ch, head.sticky);\n var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);\n if (headIndex == boundary - 1 || headIndex == boundary)\n { leftSide = dir < 0; }\n else\n { leftSide = dir > 0; }\n }\n\n var usePart = order[boundary + (leftSide ? -1 : 0)];\n var from = leftSide == (usePart.level == 1);\n var ch = from ? usePart.from : usePart.to, sticky = from ? \"after\" : \"before\";\n return anchor.ch == ch && anchor.sticky == sticky ? range$$1 : new Range(new Pos(anchor.line, ch, sticky), head)\n }", "function bidiSimplify(cm, range$$1) {\n var anchor = range$$1.anchor;\n var head = range$$1.head;\n var anchorLine = getLine(cm.doc, anchor.line);\n if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range$$1 }\n var order = getOrder(anchorLine);\n if (!order) { return range$$1 }\n var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];\n if (part.from != anchor.ch && part.to != anchor.ch) { return range$$1 }\n var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);\n if (boundary == 0 || boundary == order.length) { return range$$1 }\n\n // Compute the relative visual position of the head compared to the\n // anchor (<0 is to the left, >0 to the right)\n var leftSide;\n if (head.line != anchor.line) {\n leftSide = (head.line - anchor.line) * (cm.doc.direction == \"ltr\" ? 1 : -1) > 0;\n } else {\n var headIndex = getBidiPartAt(order, head.ch, head.sticky);\n var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);\n if (headIndex == boundary - 1 || headIndex == boundary)\n { leftSide = dir < 0; }\n else\n { leftSide = dir > 0; }\n }\n\n var usePart = order[boundary + (leftSide ? -1 : 0)];\n var from = leftSide == (usePart.level == 1);\n var ch = from ? usePart.from : usePart.to, sticky = from ? \"after\" : \"before\";\n return anchor.ch == ch && anchor.sticky == sticky ? range$$1 : new Range(new Pos(anchor.line, ch, sticky), head)\n }", "function bidiSimplify(cm, range$$1) {\n var anchor = range$$1.anchor;\n var head = range$$1.head;\n var anchorLine = getLine(cm.doc, anchor.line);\n if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range$$1 }\n var order = getOrder(anchorLine);\n if (!order) { return range$$1 }\n var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];\n if (part.from != anchor.ch && part.to != anchor.ch) { return range$$1 }\n var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);\n if (boundary == 0 || boundary == order.length) { return range$$1 }\n\n // Compute the relative visual position of the head compared to the\n // anchor (<0 is to the left, >0 to the right)\n var leftSide;\n if (head.line != anchor.line) {\n leftSide = (head.line - anchor.line) * (cm.doc.direction == \"ltr\" ? 1 : -1) > 0;\n } else {\n var headIndex = getBidiPartAt(order, head.ch, head.sticky);\n var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);\n if (headIndex == boundary - 1 || headIndex == boundary)\n { leftSide = dir < 0; }\n else\n { leftSide = dir > 0; }\n }\n\n var usePart = order[boundary + (leftSide ? -1 : 0)];\n var from = leftSide == (usePart.level == 1);\n var ch = from ? usePart.from : usePart.to, sticky = from ? \"after\" : \"before\";\n return anchor.ch == ch && anchor.sticky == sticky ? range$$1 : new Range(new Pos(anchor.line, ch, sticky), head)\n }", "reLayoutLine(paragraph, lineIndex, isBidi) {\n if (this.viewer.owner.isDocumentLoaded && this.viewer.owner.editorModule) {\n this.viewer.owner.editorModule.updateWholeListItems(paragraph);\n }\n let lineWidget;\n if (paragraph.paragraphFormat.listFormat && paragraph.paragraphFormat.listFormat.listId !== -1) {\n lineWidget = paragraph.getSplitWidgets()[0].firstChild;\n }\n else {\n lineWidget = paragraph.childWidgets[lineIndex];\n }\n if (!this.isBidiReLayout && (paragraph.paragraphFormat.bidi || this.isContainsRtl(lineWidget))) {\n let newLineIndex = lineIndex <= 0 ? 0 : lineIndex - 1;\n for (let i = newLineIndex; i < paragraph.childWidgets.length; i++) {\n if (isBidi || !(paragraph.paragraphFormat.bidi && this.isContainsRtl(lineWidget))) {\n if (i === lineIndex) {\n continue;\n }\n }\n this.reArrangeElementsForRtl(paragraph.childWidgets[i], paragraph.paragraphFormat.bidi);\n }\n }\n let lineToLayout = lineWidget.previousLine;\n if (isNullOrUndefined(lineToLayout)) {\n lineToLayout = lineWidget;\n }\n let currentParagraph = lineToLayout.paragraph;\n let bodyWidget = paragraph.containerWidget;\n bodyWidget.height -= paragraph.height;\n if (this.viewer.owner.enableHeaderAndFooter || paragraph.isInHeaderFooter) {\n paragraph.bodyWidget.isEmpty = false;\n // tslint:disable-next-line:max-line-length\n this.viewer.updateHCFClientAreaWithTop(paragraph.bodyWidget.sectionFormat, this.viewer.isBlockInHeader(paragraph), bodyWidget.page);\n }\n else {\n this.viewer.updateClientArea(bodyWidget.sectionFormat, bodyWidget.page);\n }\n this.viewer.updateClientAreaForBlock(paragraph, true);\n if (lineToLayout.paragraph.isEmpty()) {\n this.viewer.cutFromTop(paragraph.y);\n this.layoutParagraph(paragraph, 0);\n }\n else {\n this.updateClientAreaForLine(lineToLayout.paragraph, lineToLayout, 0);\n this.layoutListItems(lineToLayout.paragraph);\n if (lineToLayout.isFirstLine() && !isNullOrUndefined(paragraph.paragraphFormat)) {\n let firstLineIndent = -HelperMethods.convertPointToPixel(paragraph.paragraphFormat.firstLineIndent);\n this.viewer.updateClientWidth(firstLineIndent);\n }\n do {\n lineToLayout = this.layoutLine(lineToLayout, 0);\n paragraph = lineToLayout.paragraph;\n lineToLayout = lineToLayout.nextLine;\n } while (lineToLayout);\n this.updateWidgetToPage(this.viewer, paragraph);\n this.viewer.updateClientAreaForBlock(paragraph, false);\n }\n this.layoutNextItemsBlock(paragraph, this.viewer);\n }", "function moveVisually(line, start, dir, byUnit) {\n var bidi = getOrder(line)\n if (!bidi) { return moveLogically(line, start, dir, byUnit) }\n var pos = getBidiPartAt(bidi, start), part = bidi[pos]\n var target = moveInLine(line, start, part.level % 2 ? -dir : dir, byUnit)\n\n for (;;) {\n if (target > part.from && target < part.to) { return target }\n if (target == part.from || target == part.to) {\n if (getBidiPartAt(bidi, target) == pos) { return target }\n part = bidi[pos += dir]\n return (dir > 0) == part.level % 2 ? part.to : part.from\n } else {\n part = bidi[pos += dir]\n if (!part) { return null }\n if ((dir > 0) == part.level % 2)\n { target = moveInLine(line, part.to, -1, byUnit) }\n else\n { target = moveInLine(line, part.from, 1, byUnit) }\n }\n }\n}", "function moveVisually(line, start, dir, byUnit) {\n var bidi = getOrder(line);\n if (!bidi) return moveLogically(line, start, dir, byUnit);\n var pos = getBidiPartAt(bidi, start), part = bidi[pos];\n var target = moveInLine(line, start, part.level % 2 ? -dir : dir, byUnit);\n\n for (;;) {\n if (target > part.from && target < part.to) return target;\n if (target == part.from || target == part.to) {\n if (getBidiPartAt(bidi, target) == pos) return target;\n part = bidi[pos += dir];\n return (dir > 0) == part.level % 2 ? part.to : part.from;\n } else {\n part = bidi[pos += dir];\n if (!part) return null;\n if ((dir > 0) == part.level % 2)\n target = moveInLine(line, part.to, -1, byUnit);\n else\n target = moveInLine(line, part.from, 1, byUnit);\n }\n }\n }", "function moveVisually(line, start, dir, byUnit) {\n var bidi = getOrder(line);\n if (!bidi) return moveLogically(line, start, dir, byUnit);\n var pos = getBidiPartAt(bidi, start), part = bidi[pos];\n var target = moveInLine(line, start, part.level % 2 ? -dir : dir, byUnit);\n\n for (;;) {\n if (target > part.from && target < part.to) return target;\n if (target == part.from || target == part.to) {\n if (getBidiPartAt(bidi, target) == pos) return target;\n part = bidi[pos += dir];\n return (dir > 0) == part.level % 2 ? part.to : part.from;\n } else {\n part = bidi[pos += dir];\n if (!part) return null;\n if ((dir > 0) == part.level % 2)\n target = moveInLine(line, part.to, -1, byUnit);\n else\n target = moveInLine(line, part.from, 1, byUnit);\n }\n }\n }", "function moveVisually(line, start, dir, byUnit) {\n var bidi = getOrder(line);\n if (!bidi) return moveLogically(line, start, dir, byUnit);\n var pos = getBidiPartAt(bidi, start), part = bidi[pos];\n var target = moveInLine(line, start, part.level % 2 ? -dir : dir, byUnit);\n\n for (;;) {\n if (target > part.from && target < part.to) return target;\n if (target == part.from || target == part.to) {\n if (getBidiPartAt(bidi, target) == pos) return target;\n part = bidi[pos += dir];\n return (dir > 0) == part.level % 2 ? part.to : part.from;\n } else {\n part = bidi[pos += dir];\n if (!part) return null;\n if ((dir > 0) == part.level % 2)\n target = moveInLine(line, part.to, -1, byUnit);\n else\n target = moveInLine(line, part.from, 1, byUnit);\n }\n }\n }", "function moveVisually(line, start, dir, byUnit) {\n var bidi = getOrder(line);\n if (!bidi) return moveLogically(line, start, dir, byUnit);\n var pos = getBidiPartAt(bidi, start), part = bidi[pos];\n var target = moveInLine(line, start, part.level % 2 ? -dir : dir, byUnit);\n\n for (;;) {\n if (target > part.from && target < part.to) return target;\n if (target == part.from || target == part.to) {\n if (getBidiPartAt(bidi, target) == pos) return target;\n part = bidi[pos += dir];\n return (dir > 0) == part.level % 2 ? part.to : part.from;\n } else {\n part = bidi[pos += dir];\n if (!part) return null;\n if ((dir > 0) == part.level % 2)\n target = moveInLine(line, part.to, -1, byUnit);\n else\n target = moveInLine(line, part.from, 1, byUnit);\n }\n }\n }", "function moveVisually(line, start, dir, byUnit) {\n var bidi = getOrder(line);\n if (!bidi) return moveLogically(line, start, dir, byUnit);\n var pos = getBidiPartAt(bidi, start), part = bidi[pos];\n var target = moveInLine(line, start, part.level % 2 ? -dir : dir, byUnit);\n\n for (;;) {\n if (target > part.from && target < part.to) return target;\n if (target == part.from || target == part.to) {\n if (getBidiPartAt(bidi, target) == pos) return target;\n part = bidi[pos += dir];\n return (dir > 0) == part.level % 2 ? part.to : part.from;\n } else {\n part = bidi[pos += dir];\n if (!part) return null;\n if ((dir > 0) == part.level % 2)\n target = moveInLine(line, part.to, -1, byUnit);\n else\n target = moveInLine(line, part.from, 1, byUnit);\n }\n }\n }", "function moveVisually(line, start, dir, byUnit) {\n var bidi = getOrder(line);\n if (!bidi) return moveLogically(line, start, dir, byUnit);\n var pos = getBidiPartAt(bidi, start), part = bidi[pos];\n var target = moveInLine(line, start, part.level % 2 ? -dir : dir, byUnit);\n\n for (;;) {\n if (target > part.from && target < part.to) return target;\n if (target == part.from || target == part.to) {\n if (getBidiPartAt(bidi, target) == pos) return target;\n part = bidi[pos += dir];\n return (dir > 0) == part.level % 2 ? part.to : part.from;\n } else {\n part = bidi[pos += dir];\n if (!part) return null;\n if ((dir > 0) == part.level % 2)\n target = moveInLine(line, part.to, -1, byUnit);\n else\n target = moveInLine(line, part.from, 1, byUnit);\n }\n }\n }", "function moveVisually(line, start, dir, byUnit) {\n var bidi = getOrder(line);\n if (!bidi) return moveLogically(line, start, dir, byUnit);\n var pos = getBidiPartAt(bidi, start), part = bidi[pos];\n var target = moveInLine(line, start, part.level % 2 ? -dir : dir, byUnit);\n\n for (;;) {\n if (target > part.from && target < part.to) return target;\n if (target == part.from || target == part.to) {\n if (getBidiPartAt(bidi, target) == pos) return target;\n part = bidi[pos += dir];\n return (dir > 0) == part.level % 2 ? part.to : part.from;\n } else {\n part = bidi[pos += dir];\n if (!part) return null;\n if ((dir > 0) == part.level % 2)\n target = moveInLine(line, part.to, -1, byUnit);\n else\n target = moveInLine(line, part.from, 1, byUnit);\n }\n }\n }", "function moveVisually(line, start, dir, byUnit) {\n var bidi = getOrder(line);\n if (!bidi) return moveLogically(line, start, dir, byUnit);\n var pos = getBidiPartAt(bidi, start), part = bidi[pos];\n var target = moveInLine(line, start, part.level % 2 ? -dir : dir, byUnit);\n\n for (;;) {\n if (target > part.from && target < part.to) return target;\n if (target == part.from || target == part.to) {\n if (getBidiPartAt(bidi, target) == pos) return target;\n part = bidi[pos += dir];\n return (dir > 0) == part.level % 2 ? part.to : part.from;\n } else {\n part = bidi[pos += dir];\n if (!part) return null;\n if ((dir > 0) == part.level % 2)\n target = moveInLine(line, part.to, -1, byUnit);\n else\n target = moveInLine(line, part.from, 1, byUnit);\n }\n }\n }", "function moveVisually(line, start, dir, byUnit) {\n var bidi = getOrder(line);\n if (!bidi) return moveLogically(line, start, dir, byUnit);\n var pos = getBidiPartAt(bidi, start), part = bidi[pos];\n var target = moveInLine(line, start, part.level % 2 ? -dir : dir, byUnit);\n\n for (;;) {\n if (target > part.from && target < part.to) return target;\n if (target == part.from || target == part.to) {\n if (getBidiPartAt(bidi, target) == pos) return target;\n part = bidi[pos += dir];\n return (dir > 0) == part.level % 2 ? part.to : part.from;\n } else {\n part = bidi[pos += dir];\n if (!part) return null;\n if ((dir > 0) == part.level % 2)\n target = moveInLine(line, part.to, -1, byUnit);\n else\n target = moveInLine(line, part.from, 1, byUnit);\n }\n }\n }", "function moveVisually(line, start, dir, byUnit) {\n var bidi = getOrder(line);\n if (!bidi) return moveLogically(line, start, dir, byUnit);\n var pos = getBidiPartAt(bidi, start), part = bidi[pos];\n var target = moveInLine(line, start, part.level % 2 ? -dir : dir, byUnit);\n\n for (;;) {\n if (target > part.from && target < part.to) return target;\n if (target == part.from || target == part.to) {\n if (getBidiPartAt(bidi, target) == pos) return target;\n part = bidi[pos += dir];\n return (dir > 0) == part.level % 2 ? part.to : part.from;\n } else {\n part = bidi[pos += dir];\n if (!part) return null;\n if ((dir > 0) == part.level % 2)\n target = moveInLine(line, part.to, -1, byUnit);\n else\n target = moveInLine(line, part.from, 1, byUnit);\n }\n }\n }", "function moveVisually(line, start, dir, byUnit) {\n var bidi = getOrder(line);\n if (!bidi) return moveLogically(line, start, dir, byUnit);\n var pos = getBidiPartAt(bidi, start), part = bidi[pos];\n var target = moveInLine(line, start, part.level % 2 ? -dir : dir, byUnit);\n\n for (;;) {\n if (target > part.from && target < part.to) return target;\n if (target == part.from || target == part.to) {\n if (getBidiPartAt(bidi, target) == pos) return target;\n part = bidi[pos += dir];\n return (dir > 0) == part.level % 2 ? part.to : part.from;\n } else {\n part = bidi[pos += dir];\n if (!part) return null;\n if ((dir > 0) == part.level % 2)\n target = moveInLine(line, part.to, -1, byUnit);\n else\n target = moveInLine(line, part.from, 1, byUnit);\n }\n }\n }", "getElementsBackward(lineWidget, startElement, endElement, bidi) {\n let elements = [];\n while (bidi && startElement && startElement.previousElement && (!startElement.isRightToLeft\n || startElement instanceof TextElementBox && this.viewer.textHelper.isRTLText(startElement.text))) {\n startElement = startElement.previousElement;\n }\n let elementIndex = lineWidget.children.indexOf(startElement);\n while (elementIndex >= 0) {\n for (let i = elementIndex; i > -1 && i < lineWidget.children.length; bidi ? i++ : i--) {\n let inlineElement = lineWidget.children[i];\n if (inlineElement.line === lineWidget) {\n elements.push(inlineElement);\n }\n else {\n elementIndex = -1;\n break;\n }\n }\n // inline = inline !== null && inline.NextNode !== null ? (inline.NextNode as Inline).GetNextRenderedInline() : null;\n elementIndex = -1;\n }\n return elements;\n }", "function bidiSimplify(cm, range) {\n\t\t var anchor = range.anchor;\n\t\t var head = range.head;\n\t\t var anchorLine = getLine(cm.doc, anchor.line);\n\t\t if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range }\n\t\t var order = getOrder(anchorLine);\n\t\t if (!order) { return range }\n\t\t var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];\n\t\t if (part.from != anchor.ch && part.to != anchor.ch) { return range }\n\t\t var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);\n\t\t if (boundary == 0 || boundary == order.length) { return range }\n\n\t\t // Compute the relative visual position of the head compared to the\n\t\t // anchor (<0 is to the left, >0 to the right)\n\t\t var leftSide;\n\t\t if (head.line != anchor.line) {\n\t\t leftSide = (head.line - anchor.line) * (cm.doc.direction == \"ltr\" ? 1 : -1) > 0;\n\t\t } else {\n\t\t var headIndex = getBidiPartAt(order, head.ch, head.sticky);\n\t\t var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);\n\t\t if (headIndex == boundary - 1 || headIndex == boundary)\n\t\t { leftSide = dir < 0; }\n\t\t else\n\t\t { leftSide = dir > 0; }\n\t\t }\n\n\t\t var usePart = order[boundary + (leftSide ? -1 : 0)];\n\t\t var from = leftSide == (usePart.level == 1);\n\t\t var ch = from ? usePart.from : usePart.to, sticky = from ? \"after\" : \"before\";\n\t\t return anchor.ch == ch && anchor.sticky == sticky ? range : new Range(new Pos(anchor.line, ch, sticky), head)\n\t\t }", "function bidiSimplify(cm, range$$1) {\r\n var anchor = range$$1.anchor;\r\n var head = range$$1.head;\r\n var anchorLine = getLine(cm.doc, anchor.line);\r\n if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range$$1 }\r\n var order = getOrder(anchorLine);\r\n if (!order) { return range$$1 }\r\n var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];\r\n if (part.from != anchor.ch && part.to != anchor.ch) { return range$$1 }\r\n var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);\r\n if (boundary == 0 || boundary == order.length) { return range$$1 }\r\n\r\n // Compute the relative visual position of the head compared to the\r\n // anchor (<0 is to the left, >0 to the right)\r\n var leftSide;\r\n if (head.line != anchor.line) {\r\n leftSide = (head.line - anchor.line) * (cm.doc.direction == \"ltr\" ? 1 : -1) > 0;\r\n } else {\r\n var headIndex = getBidiPartAt(order, head.ch, head.sticky);\r\n var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);\r\n if (headIndex == boundary - 1 || headIndex == boundary)\r\n { leftSide = dir < 0; }\r\n else\r\n { leftSide = dir > 0; }\r\n }\r\n\r\n var usePart = order[boundary + (leftSide ? -1 : 0)];\r\n var from = leftSide == (usePart.level == 1);\r\n var ch = from ? usePart.from : usePart.to, sticky = from ? \"after\" : \"before\";\r\n return anchor.ch == ch && anchor.sticky == sticky ? range$$1 : new Range(new Pos(anchor.line, ch, sticky), head)\r\n}", "function bidiSimplify(cm, range$$1) {\n var anchor = range$$1.anchor;\n var head = range$$1.head;\n var anchorLine = getLine(cm.doc, anchor.line);\n if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range$$1 }\n var order = getOrder(anchorLine);\n if (!order) { return range$$1 }\n var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];\n if (part.from != anchor.ch && part.to != anchor.ch) { return range$$1 }\n var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);\n if (boundary == 0 || boundary == order.length) { return range$$1 }\n\n // Compute the relative visual position of the head compared to the\n // anchor (<0 is to the left, >0 to the right)\n var leftSide;\n if (head.line != anchor.line) {\n leftSide = (head.line - anchor.line) * (cm.doc.direction == \"ltr\" ? 1 : -1) > 0;\n } else {\n var headIndex = getBidiPartAt(order, head.ch, head.sticky);\n var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);\n if (headIndex == boundary - 1 || headIndex == boundary)\n { leftSide = dir < 0; }\n else\n { leftSide = dir > 0; }\n }\n\n var usePart = order[boundary + (leftSide ? -1 : 0)];\n var from = leftSide == (usePart.level == 1);\n var ch = from ? usePart.from : usePart.to, sticky = from ? \"after\" : \"before\";\n return anchor.ch == ch && anchor.sticky == sticky ? range$$1 : new Range(new Pos(anchor.line, ch, sticky), head)\n}", "function bidiSimplify(cm, range$$1) {\n var anchor = range$$1.anchor;\n var head = range$$1.head;\n var anchorLine = getLine(cm.doc, anchor.line);\n if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range$$1 }\n var order = getOrder(anchorLine);\n if (!order) { return range$$1 }\n var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];\n if (part.from != anchor.ch && part.to != anchor.ch) { return range$$1 }\n var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);\n if (boundary == 0 || boundary == order.length) { return range$$1 }\n\n // Compute the relative visual position of the head compared to the\n // anchor (<0 is to the left, >0 to the right)\n var leftSide;\n if (head.line != anchor.line) {\n leftSide = (head.line - anchor.line) * (cm.doc.direction == \"ltr\" ? 1 : -1) > 0;\n } else {\n var headIndex = getBidiPartAt(order, head.ch, head.sticky);\n var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);\n if (headIndex == boundary - 1 || headIndex == boundary)\n { leftSide = dir < 0; }\n else\n { leftSide = dir > 0; }\n }\n\n var usePart = order[boundary + (leftSide ? -1 : 0)];\n var from = leftSide == (usePart.level == 1);\n var ch = from ? usePart.from : usePart.to, sticky = from ? \"after\" : \"before\";\n return anchor.ch == ch && anchor.sticky == sticky ? range$$1 : new Range(new Pos(anchor.line, ch, sticky), head)\n}", "function bidiSimplify(cm, range$$1) {\n var anchor = range$$1.anchor;\n var head = range$$1.head;\n var anchorLine = getLine(cm.doc, anchor.line);\n if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range$$1 }\n var order = getOrder(anchorLine);\n if (!order) { return range$$1 }\n var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];\n if (part.from != anchor.ch && part.to != anchor.ch) { return range$$1 }\n var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);\n if (boundary == 0 || boundary == order.length) { return range$$1 }\n\n // Compute the relative visual position of the head compared to the\n // anchor (<0 is to the left, >0 to the right)\n var leftSide;\n if (head.line != anchor.line) {\n leftSide = (head.line - anchor.line) * (cm.doc.direction == \"ltr\" ? 1 : -1) > 0;\n } else {\n var headIndex = getBidiPartAt(order, head.ch, head.sticky);\n var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);\n if (headIndex == boundary - 1 || headIndex == boundary)\n { leftSide = dir < 0; }\n else\n { leftSide = dir > 0; }\n }\n\n var usePart = order[boundary + (leftSide ? -1 : 0)];\n var from = leftSide == (usePart.level == 1);\n var ch = from ? usePart.from : usePart.to, sticky = from ? \"after\" : \"before\";\n return anchor.ch == ch && anchor.sticky == sticky ? range$$1 : new Range(new Pos(anchor.line, ch, sticky), head)\n}", "function bidiSimplify(cm, range$$1) {\n var anchor = range$$1.anchor;\n var head = range$$1.head;\n var anchorLine = getLine(cm.doc, anchor.line);\n if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range$$1 }\n var order = getOrder(anchorLine);\n if (!order) { return range$$1 }\n var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];\n if (part.from != anchor.ch && part.to != anchor.ch) { return range$$1 }\n var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);\n if (boundary == 0 || boundary == order.length) { return range$$1 }\n\n // Compute the relative visual position of the head compared to the\n // anchor (<0 is to the left, >0 to the right)\n var leftSide;\n if (head.line != anchor.line) {\n leftSide = (head.line - anchor.line) * (cm.doc.direction == \"ltr\" ? 1 : -1) > 0;\n } else {\n var headIndex = getBidiPartAt(order, head.ch, head.sticky);\n var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);\n if (headIndex == boundary - 1 || headIndex == boundary)\n { leftSide = dir < 0; }\n else\n { leftSide = dir > 0; }\n }\n\n var usePart = order[boundary + (leftSide ? -1 : 0)];\n var from = leftSide == (usePart.level == 1);\n var ch = from ? usePart.from : usePart.to, sticky = from ? \"after\" : \"before\";\n return anchor.ch == ch && anchor.sticky == sticky ? range$$1 : new Range(new Pos(anchor.line, ch, sticky), head)\n}", "function bidiSimplify(cm, range$$1) {\n var anchor = range$$1.anchor;\n var head = range$$1.head;\n var anchorLine = getLine(cm.doc, anchor.line);\n if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range$$1 }\n var order = getOrder(anchorLine);\n if (!order) { return range$$1 }\n var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];\n if (part.from != anchor.ch && part.to != anchor.ch) { return range$$1 }\n var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);\n if (boundary == 0 || boundary == order.length) { return range$$1 }\n\n // Compute the relative visual position of the head compared to the\n // anchor (<0 is to the left, >0 to the right)\n var leftSide;\n if (head.line != anchor.line) {\n leftSide = (head.line - anchor.line) * (cm.doc.direction == \"ltr\" ? 1 : -1) > 0;\n } else {\n var headIndex = getBidiPartAt(order, head.ch, head.sticky);\n var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);\n if (headIndex == boundary - 1 || headIndex == boundary)\n { leftSide = dir < 0; }\n else\n { leftSide = dir > 0; }\n }\n\n var usePart = order[boundary + (leftSide ? -1 : 0)];\n var from = leftSide == (usePart.level == 1);\n var ch = from ? usePart.from : usePart.to, sticky = from ? \"after\" : \"before\";\n return anchor.ch == ch && anchor.sticky == sticky ? range$$1 : new Range(new Pos(anchor.line, ch, sticky), head)\n}", "function bidiSimplify(cm, range$$1) {\n var anchor = range$$1.anchor;\n var head = range$$1.head;\n var anchorLine = getLine(cm.doc, anchor.line);\n if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range$$1 }\n var order = getOrder(anchorLine);\n if (!order) { return range$$1 }\n var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];\n if (part.from != anchor.ch && part.to != anchor.ch) { return range$$1 }\n var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);\n if (boundary == 0 || boundary == order.length) { return range$$1 }\n\n // Compute the relative visual position of the head compared to the\n // anchor (<0 is to the left, >0 to the right)\n var leftSide;\n if (head.line != anchor.line) {\n leftSide = (head.line - anchor.line) * (cm.doc.direction == \"ltr\" ? 1 : -1) > 0;\n } else {\n var headIndex = getBidiPartAt(order, head.ch, head.sticky);\n var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);\n if (headIndex == boundary - 1 || headIndex == boundary)\n { leftSide = dir < 0; }\n else\n { leftSide = dir > 0; }\n }\n\n var usePart = order[boundary + (leftSide ? -1 : 0)];\n var from = leftSide == (usePart.level == 1);\n var ch = from ? usePart.from : usePart.to, sticky = from ? \"after\" : \"before\";\n return anchor.ch == ch && anchor.sticky == sticky ? range$$1 : new Range(new Pos(anchor.line, ch, sticky), head)\n}", "function bidiSimplify(cm, range$$1) {\n var anchor = range$$1.anchor;\n var head = range$$1.head;\n var anchorLine = getLine(cm.doc, anchor.line);\n if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range$$1 }\n var order = getOrder(anchorLine);\n if (!order) { return range$$1 }\n var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];\n if (part.from != anchor.ch && part.to != anchor.ch) { return range$$1 }\n var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);\n if (boundary == 0 || boundary == order.length) { return range$$1 }\n\n // Compute the relative visual position of the head compared to the\n // anchor (<0 is to the left, >0 to the right)\n var leftSide;\n if (head.line != anchor.line) {\n leftSide = (head.line - anchor.line) * (cm.doc.direction == \"ltr\" ? 1 : -1) > 0;\n } else {\n var headIndex = getBidiPartAt(order, head.ch, head.sticky);\n var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);\n if (headIndex == boundary - 1 || headIndex == boundary)\n { leftSide = dir < 0; }\n else\n { leftSide = dir > 0; }\n }\n\n var usePart = order[boundary + (leftSide ? -1 : 0)];\n var from = leftSide == (usePart.level == 1);\n var ch = from ? usePart.from : usePart.to, sticky = from ? \"after\" : \"before\";\n return anchor.ch == ch && anchor.sticky == sticky ? range$$1 : new Range(new Pos(anchor.line, ch, sticky), head)\n}", "function bidiSimplify(cm, range$$1) {\n var anchor = range$$1.anchor;\n var head = range$$1.head;\n var anchorLine = getLine(cm.doc, anchor.line);\n if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range$$1 }\n var order = getOrder(anchorLine);\n if (!order) { return range$$1 }\n var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];\n if (part.from != anchor.ch && part.to != anchor.ch) { return range$$1 }\n var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);\n if (boundary == 0 || boundary == order.length) { return range$$1 }\n\n // Compute the relative visual position of the head compared to the\n // anchor (<0 is to the left, >0 to the right)\n var leftSide;\n if (head.line != anchor.line) {\n leftSide = (head.line - anchor.line) * (cm.doc.direction == \"ltr\" ? 1 : -1) > 0;\n } else {\n var headIndex = getBidiPartAt(order, head.ch, head.sticky);\n var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);\n if (headIndex == boundary - 1 || headIndex == boundary)\n { leftSide = dir < 0; }\n else\n { leftSide = dir > 0; }\n }\n\n var usePart = order[boundary + (leftSide ? -1 : 0)];\n var from = leftSide == (usePart.level == 1);\n var ch = from ? usePart.from : usePart.to, sticky = from ? \"after\" : \"before\";\n return anchor.ch == ch && anchor.sticky == sticky ? range$$1 : new Range(new Pos(anchor.line, ch, sticky), head)\n}", "function bidiSimplify(cm, range$$1) {\n var anchor = range$$1.anchor;\n var head = range$$1.head;\n var anchorLine = getLine(cm.doc, anchor.line);\n if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range$$1 }\n var order = getOrder(anchorLine);\n if (!order) { return range$$1 }\n var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];\n if (part.from != anchor.ch && part.to != anchor.ch) { return range$$1 }\n var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);\n if (boundary == 0 || boundary == order.length) { return range$$1 }\n\n // Compute the relative visual position of the head compared to the\n // anchor (<0 is to the left, >0 to the right)\n var leftSide;\n if (head.line != anchor.line) {\n leftSide = (head.line - anchor.line) * (cm.doc.direction == \"ltr\" ? 1 : -1) > 0;\n } else {\n var headIndex = getBidiPartAt(order, head.ch, head.sticky);\n var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);\n if (headIndex == boundary - 1 || headIndex == boundary)\n { leftSide = dir < 0; }\n else\n { leftSide = dir > 0; }\n }\n\n var usePart = order[boundary + (leftSide ? -1 : 0)];\n var from = leftSide == (usePart.level == 1);\n var ch = from ? usePart.from : usePart.to, sticky = from ? \"after\" : \"before\";\n return anchor.ch == ch && anchor.sticky == sticky ? range$$1 : new Range(new Pos(anchor.line, ch, sticky), head)\n}", "function bidiSimplify(cm, range$$1) {\n var anchor = range$$1.anchor;\n var head = range$$1.head;\n var anchorLine = getLine(cm.doc, anchor.line);\n if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range$$1 }\n var order = getOrder(anchorLine);\n if (!order) { return range$$1 }\n var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];\n if (part.from != anchor.ch && part.to != anchor.ch) { return range$$1 }\n var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);\n if (boundary == 0 || boundary == order.length) { return range$$1 }\n\n // Compute the relative visual position of the head compared to the\n // anchor (<0 is to the left, >0 to the right)\n var leftSide;\n if (head.line != anchor.line) {\n leftSide = (head.line - anchor.line) * (cm.doc.direction == \"ltr\" ? 1 : -1) > 0;\n } else {\n var headIndex = getBidiPartAt(order, head.ch, head.sticky);\n var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);\n if (headIndex == boundary - 1 || headIndex == boundary)\n { leftSide = dir < 0; }\n else\n { leftSide = dir > 0; }\n }\n\n var usePart = order[boundary + (leftSide ? -1 : 0)];\n var from = leftSide == (usePart.level == 1);\n var ch = from ? usePart.from : usePart.to, sticky = from ? \"after\" : \"before\";\n return anchor.ch == ch && anchor.sticky == sticky ? range$$1 : new Range(new Pos(anchor.line, ch, sticky), head)\n}", "get bidiLevel() {\n let level = this.flags & 3 /* RangeFlag.BidiLevelMask */;\n return level == 3 ? null : level;\n }", "isContainsRtl(lineWidget) {\n let isContainsRTL = false;\n for (let i = 0; i < lineWidget.children.length; i++) {\n if (lineWidget.children[i] instanceof TextElementBox) {\n isContainsRTL = lineWidget.children[i].characterFormat.bidi || lineWidget.children[i].characterFormat.bdo === 'RTL'\n || this.viewer.textHelper.isRTLText(lineWidget.children[i].text);\n if (isContainsRTL) {\n break;\n }\n }\n }\n return isContainsRTL;\n }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }" ]
[ "0.76190144", "0.75846356", "0.75846356", "0.75846356", "0.757759", "0.757759", "0.757759", "0.757759", "0.757759", "0.757759", "0.757759", "0.75555116", "0.7471128", "0.72241294", "0.70990753", "0.7073878", "0.7073878", "0.7073878", "0.7073878", "0.7073878", "0.7073878", "0.7073878", "0.7073878", "0.7073878", "0.7073878", "0.7073878", "0.7055904", "0.7009629", "0.5762277", "0.55300546", "0.55300546", "0.55300546", "0.53035706", "0.53009415", "0.53009415", "0.53009415", "0.53009415", "0.53009415", "0.53009415", "0.53009415", "0.53009415", "0.5290472", "0.52480865", "0.5237227", "0.5237227", "0.52238715", "0.5201022", "0.5201022", "0.5201022", "0.5201022", "0.5201022", "0.5201022", "0.5201022", "0.5201022", "0.5201022", "0.51905626", "0.5185374", "0.5170588", "0.5170588", "0.5170588", "0.5170588", "0.5170588", "0.5170588", "0.5170588", "0.5170588", "0.5170588", "0.5170588", "0.5170588", "0.51595944", "0.51341003", "0.51263595", "0.51156384", "0.51156384", "0.51156384", "0.51156384", "0.51156384", "0.51156384", "0.51156384", "0.51156384", "0.51156384", "0.51156384", "0.49332663", "0.48337138", "0.47231883" ]
0.7135159
25
The DOM events that CodeMirror handles can be overridden by registering a (nonDOM) handler on the editor for the event name, and preventDefaulting the event in that handler.
function signalDOMEvent(cm, e, override) { if (typeof e == "string") { e = {type: e, preventDefault: function() { this.defaultPrevented = true; }}; } signal(cm, override || e.type, cm, e); return e_defaultPrevented(e) || e.codemirrorIgnore }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function signalDOMEvent(cm, e, override) {\n\t\t if (typeof e == \"string\")\n\t\t { e = {type: e, preventDefault: function() { this.defaultPrevented = true; }}; }\n\t\t signal(cm, override || e.type, cm, e);\n\t\t return e_defaultPrevented(e) || e.codemirrorIgnore\n\t\t }", "function signalDOMEvent(cm, e, override) {\n\t\t if (typeof e == \"string\")\n\t\t e = {type: e, preventDefault: function() { this.defaultPrevented = true; }};\n\t\t signal(cm, override || e.type, cm, e);\n\t\t return e_defaultPrevented(e) || e.codemirrorIgnore;\n\t\t }", "function signalDOMEvent(cm, e, override) {\n if (typeof e == \"string\")\n { e = {type: e, preventDefault: function() { this.defaultPrevented = true }} }\n signal(cm, override || e.type, cm, e)\n return e_defaultPrevented(e) || e.codemirrorIgnore\n}", "function signalDOMEvent(cm, e, override) {\n if (typeof e == \"string\")\n { e = {type: e, preventDefault: function() { this.defaultPrevented = true }} }\n signal(cm, override || e.type, cm, e)\n return e_defaultPrevented(e) || e.codemirrorIgnore\n}", "function signalDOMEvent(cm, e, override) {\n\t if (typeof e == \"string\")\n\t e = {type: e, preventDefault: function() { this.defaultPrevented = true; }};\n\t signal(cm, override || e.type, cm, e);\n\t return e_defaultPrevented(e) || e.codemirrorIgnore;\n\t }", "function signalDOMEvent(cm, e, override) {\n\t if (typeof e == \"string\")\n\t e = {type: e, preventDefault: function() { this.defaultPrevented = true; }};\n\t signal(cm, override || e.type, cm, e);\n\t return e_defaultPrevented(e) || e.codemirrorIgnore;\n\t }", "function signalDOMEvent(cm, e, override) {\n\t if (typeof e == \"string\")\n\t e = {type: e, preventDefault: function() { this.defaultPrevented = true; }};\n\t signal(cm, override || e.type, cm, e);\n\t return e_defaultPrevented(e) || e.codemirrorIgnore;\n\t }", "function signalDOMEvent(cm, e, override) {\r\n if (typeof e == \"string\")\r\n { e = {type: e, preventDefault: function() { this.defaultPrevented = true; }}; }\r\n signal(cm, override || e.type, cm, e);\r\n return e_defaultPrevented(e) || e.codemirrorIgnore\r\n}", "function signalDOMEvent(cm, e, override) {\n if (typeof e == \"string\")\n { e = {type: e, preventDefault: function() { this.defaultPrevented = true; }}; }\n signal(cm, override || e.type, cm, e);\n return e_defaultPrevented(e) || e.codemirrorIgnore\n}", "function signalDOMEvent(cm, e, override) {\n if (typeof e == \"string\")\n { e = {type: e, preventDefault: function() { this.defaultPrevented = true; }}; }\n signal(cm, override || e.type, cm, e);\n return e_defaultPrevented(e) || e.codemirrorIgnore\n}", "function signalDOMEvent(cm, e, override) {\n if (typeof e == \"string\")\n { e = {type: e, preventDefault: function() { this.defaultPrevented = true; }}; }\n signal(cm, override || e.type, cm, e);\n return e_defaultPrevented(e) || e.codemirrorIgnore\n}", "function signalDOMEvent(cm, e, override) {\n if (typeof e == \"string\")\n { e = {type: e, preventDefault: function() { this.defaultPrevented = true; }}; }\n signal(cm, override || e.type, cm, e);\n return e_defaultPrevented(e) || e.codemirrorIgnore\n}", "function signalDOMEvent(cm, e, override) {\n if (typeof e == \"string\")\n { e = {type: e, preventDefault: function() { this.defaultPrevented = true; }}; }\n signal(cm, override || e.type, cm, e);\n return e_defaultPrevented(e) || e.codemirrorIgnore\n}", "function signalDOMEvent(cm, e, override) {\n if (typeof e == \"string\")\n { e = {type: e, preventDefault: function() { this.defaultPrevented = true; }}; }\n signal(cm, override || e.type, cm, e);\n return e_defaultPrevented(e) || e.codemirrorIgnore\n}", "function signalDOMEvent(cm, e, override) {\n if (typeof e == \"string\")\n { e = {type: e, preventDefault: function() { this.defaultPrevented = true; }}; }\n signal(cm, override || e.type, cm, e);\n return e_defaultPrevented(e) || e.codemirrorIgnore\n}", "function signalDOMEvent(cm, e, override) {\n if (typeof e == \"string\")\n { e = {type: e, preventDefault: function() { this.defaultPrevented = true; }}; }\n signal(cm, override || e.type, cm, e);\n return e_defaultPrevented(e) || e.codemirrorIgnore\n}", "function signalDOMEvent(cm, e, override) {\n if (typeof e == \"string\")\n { e = {type: e, preventDefault: function() { this.defaultPrevented = true; }}; }\n signal(cm, override || e.type, cm, e);\n return e_defaultPrevented(e) || e.codemirrorIgnore\n}", "function signalDOMEvent(cm, e, override) {\n if (typeof e == \"string\")\n { e = {type: e, preventDefault: function() { this.defaultPrevented = true; }}; }\n signal(cm, override || e.type, cm, e);\n return e_defaultPrevented(e) || e.codemirrorIgnore\n}", "function signalDOMEvent(cm, e, override) {\n if (typeof e == \"string\")\n { e = {type: e, preventDefault: function() { this.defaultPrevented = true; }}; }\n signal(cm, override || e.type, cm, e);\n return e_defaultPrevented(e) || e.codemirrorIgnore\n}", "function signalDOMEvent(cm, e, override) {\n if (typeof e == \"string\")\n e = {type: e, preventDefault: function() { this.defaultPrevented = true; }};\n signal(cm, override || e.type, cm, e);\n return e_defaultPrevented(e) || e.codemirrorIgnore;\n }", "function signalDOMEvent(cm, e, override) {\n if (typeof e == \"string\")\n e = {type: e, preventDefault: function() { this.defaultPrevented = true; }};\n signal(cm, override || e.type, cm, e);\n return e_defaultPrevented(e) || e.codemirrorIgnore;\n }", "function signalDOMEvent(cm, e, override) {\n if (typeof e == \"string\")\n e = {type: e, preventDefault: function() { this.defaultPrevented = true; }};\n signal(cm, override || e.type, cm, e);\n return e_defaultPrevented(e) || e.codemirrorIgnore;\n }", "function signalDOMEvent(cm, e, override) {\n if (typeof e == \"string\")\n e = {type: e, preventDefault: function() { this.defaultPrevented = true; }};\n signal(cm, override || e.type, cm, e);\n return e_defaultPrevented(e) || e.codemirrorIgnore;\n }", "function signalDOMEvent(cm, e, override) {\n if (typeof e == \"string\")\n e = {type: e, preventDefault: function() { this.defaultPrevented = true; }};\n signal(cm, override || e.type, cm, e);\n return e_defaultPrevented(e) || e.codemirrorIgnore;\n }", "function signalDOMEvent(cm, e, override) {\r\n signal(cm, override || e.type, cm, e);\r\n return e_defaultPrevented(e) || e.codemirrorIgnore;\r\n }", "function signalDOMEvent(cm, e, override) {\n signal(cm, override || e.type, cm, e);\n return e_defaultPrevented(e) || e.codemirrorIgnore;\n }", "function signalDOMEvent(cm, e, override) {\n signal(cm, override || e.type, cm, e);\n return e_defaultPrevented(e) || e.codemirrorIgnore;\n }", "function signalDOMEvent(cm, e, override) {\n if (typeof e == \"string\") {\n e = {\n type: e,\n preventDefault: function preventDefault() {\n this.defaultPrevented = true;\n }\n };\n }\n\n signal(cm, override || e.type, cm, e);\n return e_defaultPrevented(e) || e.codemirrorIgnore;\n }", "function disableEditorMouseClicks(editor) {\n editor.on(\"mousedown\", (instance, e) => {\n // focus on the editor when it get's clicked\n editor.focus();\n\n // do not allow any other normal click behaviors to happen\n e.preventDefault();\n });\n}", "function Ne(e,t,a){return\"string\"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Te(e,a||t.type,e,t),Le(t)||t.codemirrorIgnore}", "handleEvent(event) {\n if (this.isHidden || !this._editor) {\n return;\n }\n switch (event.type) {\n case 'keydown':\n this._evtKeydown(event);\n break;\n case 'mousedown':\n this._evtMousedown(event);\n break;\n case 'scroll':\n this._evtScroll(event);\n break;\n default:\n break;\n }\n }", "preventDefault() {\n\t\tthis.domEvent.preventDefault();\n\t}", "preventDefault() {\n\t\tthis.domEvent.preventDefault();\n\t}", "_initEvents() {\n window.addEventListener(\"submitCommand\", event => this._processInput(event.detail));\n this.input.editableNode.onkeypress = () => {\n if (this.mode == Editor.MODE_INSERT)\n this.modificationSaved = false;\n };\n this.input.editableNode.onkeydown = event => {\n let keycode = event.keyCode;\n if (this.mode != Editor.MODE_INSERT && keycode !== 37 && keycode !== 38 && keycode !== 39 && keycode !== 40) {\n if (keycode !== Editor.KEY_TOGGLE_MODE_COMMAND)\n event.preventDefault();\n }\n }\n }", "_editorChanged() {\n this.dispatchEvent(\n new CustomEvent(\"editor-change\", {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: this,\n })\n );\n }", "customeCodeEditEvent() {\n this.menuHandler(MenuChoices.null);\n }", "function _registerHandlers(editor) {\n $(editor).on(\"keyEvent\", _cursorHandler);\n $(editor.document).one(\"change\", _handler);\n editor.document.addRef();\n }", "function keyboardPreventDefault(e) {\n if (e.target.tagName !== 'TEXTAREA') {\n e.preventDefault();\n }\n}", "_editorChange(e,deselect=!1){let root=this,editorChange=root.editor!==e.detail.editor,toolbarChange=root.toolbar!==e.detail.toolbar;if(deselect||editorChange||toolbarChange){let sel=window.getSelection();sel.removeAllRanges();root.editor=e.detail.editor;root.toolbar=e.detail.toolbar;if(root.observer)root.observer.disconnect();if(!deselect&&e.detail.editor){root.observer=new MutationObserver(evt=>{root.range=root.getRange()});root.observer.observe(e.detail.editor,{attributes:!1,childList:!0,subtree:!0,characterData:!1})}}}", "function\n setEditorMode( bEnable )\n {\n document.body[ bEnable? 'addEventListener': 'removeEventListener']( 'click',clickInEditMode,true );\n document.body[ bEnable? 'addEventListener': 'removeEventListener']( 'input',inputInEditMode,true );\n document.body[ bEnable? 'addEventListener': 'removeEventListener']( 'blur' , blurInEditMode,true );\n bEnable || document.body.querySelectorAll('*[contentEditable]').forEach( el=> el.removeAttribute('contentEditable'));\n }", "ready(){super.ready();let root=this;root.addEventListener(\"mousedown\",function(e){e.preventDefault()});root.addEventListener(\"keypress\",function(e){e.preventDefault()})}", "function setEditorSilent(){\n silcentEditorEvents = true;\n aceEditorHtml.setValue($renderedHtml.innerHTML.trim(), -1);\n setTimeout(function(){\n silcentEditorEvents = false;\n },100);\n }", "function preventDefault(ev){ev.preventDefault();}", "function handleClickEvent() {\n event.preventDefault();\n}", "handleKeyDown(ev) {\n const {vimMode} = this.props;\n const _handleKeyDown = vimMode ? this._handleKeyDownVim : this._handleKeyDown;\n\n if (ev.target.tagName === 'INPUT' || ev.metaKey || ev.ctrlKey) {\n return;\n }\n if (_handleKeyDown(ev.key, ev.shiftKey, ev.altKey)) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n }", "function defaultEventHandler(evt) {\n\t evt.stopPropagation();\n }", "function handleDomEvent () {\n\t \tthis._ractive.binding.handleChange();\n\t }", "activateCodeMirror(event) {\n let target = event.target;\n while (target && target.parentElement) {\n if (target.classList.contains(CODE_SNIPPET_EDITOR_MIRROR)) {\n break;\n }\n target = target.parentElement;\n }\n const editor = document.querySelector(`.${CODE_SNIPPET_EDITOR}-${this._codeSnippetEditorMetaData.id} #code-${this._codeSnippetEditorMetaData.id}`);\n if (target.classList.contains(CODE_SNIPPET_EDITOR_MIRROR)) {\n if (!editor.classList.contains('active')) {\n editor.classList.add('active');\n }\n }\n }", "function Browser_BlockEvent(event)\n{\n\t//cancel\n\tevent.cancelBubble = true;\n\t//and block\n\tevent.returnValue = false;\n\t//reset key code\n\tevent.keyCode = 0;\n\t//has prevent default?\n\tif (event.preventDefault)\n\t{\n\t\t//trigger it\n\t\tevent.preventDefault();\n\t}\n\t//has propagation?\n\tif (event.stopPropagation)\n\t{\n\t\t//stop it as well\n\t\tevent.stopPropagation();\n\t}\n\t//if we have designer controller\n\tif (__DESIGNER_CONTROLLER)\n\t{\n\t\t//notify selection\n\t\tWI4_PlugIn_Generic_ForwardEvent(event);\n\t}\n\t//return false\n\treturn false;\n}", "function registerEventHandlers(cm) {\n var d = cm.display;\n on(d.scroller, \"mousedown\", operation(cm, onMouseDown));\n // Older IE's will not fire a second mousedown for a double click\n if (ie && ie_version < 11)\n on(d.scroller, \"dblclick\", operation(cm, function(e) {\n if (signalDOMEvent(cm, e)) return;\n var pos = posFromMouse(cm, e);\n if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) return;\n e_preventDefault(e);\n var word = cm.findWordAt(pos);\n extendSelection(cm.doc, word.anchor, word.head);\n }));\n else\n on(d.scroller, \"dblclick\", function(e) { signalDOMEvent(cm, e) || e_preventDefault(e); });\n // Prevent normal selection in the editor (we handle our own)\n on(d.lineSpace, \"selectstart\", function(e) {\n if (!eventInWidget(d, e)) e_preventDefault(e);\n });\n // Some browsers fire contextmenu *after* opening the menu, at\n // which point we can't mess with it anymore. Context menu is\n // handled in onMouseDown for these browsers.\n if (!captureRightClick) on(d.scroller, \"contextmenu\", function(e) {onContextMenu(cm, e);});\n\n // Sync scrolling between fake scrollbars and real scrollable\n // area, ensure viewport is updated when scrolling.\n on(d.scroller, \"scroll\", function() {\n if (d.scroller.clientHeight) {\n setScrollTop(cm, d.scroller.scrollTop);\n setScrollLeft(cm, d.scroller.scrollLeft, true);\n signal(cm, \"scroll\", cm);\n }\n });\n\n // Listen to wheel events in order to try and update the viewport on time.\n on(d.scroller, \"mousewheel\", function(e){onScrollWheel(cm, e);});\n on(d.scroller, \"DOMMouseScroll\", function(e){onScrollWheel(cm, e);});\n\n // Prevent wrapper from ever scrolling\n on(d.wrapper, \"scroll\", function() { d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; });\n\n on(d.input, \"keyup\", function(e) { onKeyUp.call(cm, e); });\n on(d.input, \"input\", function() {\n if (ie && ie_version >= 9 && cm.display.inputHasSelection) cm.display.inputHasSelection = null;\n readInput(cm);\n });\n on(d.input, \"keydown\", operation(cm, onKeyDown));\n on(d.input, \"keypress\", operation(cm, onKeyPress));\n on(d.input, \"focus\", bind(onFocus, cm));\n on(d.input, \"blur\", bind(onBlur, cm));\n\n function drag_(e) {\n if (!signalDOMEvent(cm, e)) e_stop(e);\n }\n if (cm.options.dragDrop) {\n on(d.scroller, \"dragstart\", function(e){onDragStart(cm, e);});\n on(d.scroller, \"dragenter\", drag_);\n on(d.scroller, \"dragover\", drag_);\n on(d.scroller, \"drop\", operation(cm, onDrop));\n }\n on(d.scroller, \"paste\", function(e) {\n if (eventInWidget(d, e)) return;\n cm.state.pasteIncoming = true;\n focusInput(cm);\n fastPoll(cm);\n });\n on(d.input, \"paste\", function() {\n // Workaround for webkit bug https://bugs.webkit.org/show_bug.cgi?id=90206\n // Add a char to the end of textarea before paste occur so that\n // selection doesn't span to the end of textarea.\n if (webkit && !cm.state.fakedLastChar && !(new Date - cm.state.lastMiddleDown < 200)) {\n var start = d.input.selectionStart, end = d.input.selectionEnd;\n d.input.value += \"$\";\n // The selection end needs to be set before the start, otherwise there\n // can be an intermediate non-empty selection between the two, which\n // can override the middle-click paste buffer on linux and cause the\n // wrong thing to get pasted.\n d.input.selectionEnd = end;\n d.input.selectionStart = start;\n cm.state.fakedLastChar = true;\n }\n cm.state.pasteIncoming = true;\n fastPoll(cm);\n });\n\n function prepareCopyCut(e) {\n if (cm.somethingSelected()) {\n lastCopied = cm.getSelections();\n if (d.inaccurateSelection) {\n d.prevInput = \"\";\n d.inaccurateSelection = false;\n d.input.value = lastCopied.join(\"\\n\");\n selectInput(d.input);\n }\n } else {\n var text = [], ranges = [];\n for (var i = 0; i < cm.doc.sel.ranges.length; i++) {\n var line = cm.doc.sel.ranges[i].head.line;\n var lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)};\n ranges.push(lineRange);\n text.push(cm.getRange(lineRange.anchor, lineRange.head));\n }\n if (e.type == \"cut\") {\n cm.setSelections(ranges, null, sel_dontScroll);\n } else {\n d.prevInput = \"\";\n d.input.value = text.join(\"\\n\");\n selectInput(d.input);\n }\n lastCopied = text;\n }\n if (e.type == \"cut\") cm.state.cutIncoming = true;\n }\n on(d.input, \"cut\", prepareCopyCut);\n on(d.input, \"copy\", prepareCopyCut);\n\n // Needed to handle Tab key in KHTML\n if (khtml) on(d.sizer, \"mouseup\", function() {\n if (activeElt() == d.input) d.input.blur();\n focusInput(cm);\n });\n }", "function registerEventHandlers(cm) {\n var d = cm.display;\n on(d.scroller, \"mousedown\", operation(cm, onMouseDown));\n // Older IE's will not fire a second mousedown for a double click\n if (ie && ie_version < 11)\n on(d.scroller, \"dblclick\", operation(cm, function(e) {\n if (signalDOMEvent(cm, e)) return;\n var pos = posFromMouse(cm, e);\n if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) return;\n e_preventDefault(e);\n var word = cm.findWordAt(pos);\n extendSelection(cm.doc, word.anchor, word.head);\n }));\n else\n on(d.scroller, \"dblclick\", function(e) { signalDOMEvent(cm, e) || e_preventDefault(e); });\n // Prevent normal selection in the editor (we handle our own)\n on(d.lineSpace, \"selectstart\", function(e) {\n if (!eventInWidget(d, e)) e_preventDefault(e);\n });\n // Some browsers fire contextmenu *after* opening the menu, at\n // which point we can't mess with it anymore. Context menu is\n // handled in onMouseDown for these browsers.\n if (!captureRightClick) on(d.scroller, \"contextmenu\", function(e) {onContextMenu(cm, e);});\n\n // Sync scrolling between fake scrollbars and real scrollable\n // area, ensure viewport is updated when scrolling.\n on(d.scroller, \"scroll\", function() {\n if (d.scroller.clientHeight) {\n setScrollTop(cm, d.scroller.scrollTop);\n setScrollLeft(cm, d.scroller.scrollLeft, true);\n signal(cm, \"scroll\", cm);\n }\n });\n\n // Listen to wheel events in order to try and update the viewport on time.\n on(d.scroller, \"mousewheel\", function(e){onScrollWheel(cm, e);});\n on(d.scroller, \"DOMMouseScroll\", function(e){onScrollWheel(cm, e);});\n\n // Prevent wrapper from ever scrolling\n on(d.wrapper, \"scroll\", function() { d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; });\n\n on(d.input, \"keyup\", function(e) { onKeyUp.call(cm, e); });\n on(d.input, \"input\", function() {\n if (ie && ie_version >= 9 && cm.display.inputHasSelection) cm.display.inputHasSelection = null;\n readInput(cm);\n });\n on(d.input, \"keydown\", operation(cm, onKeyDown));\n on(d.input, \"keypress\", operation(cm, onKeyPress));\n on(d.input, \"focus\", bind(onFocus, cm));\n on(d.input, \"blur\", bind(onBlur, cm));\n\n function drag_(e) {\n if (!signalDOMEvent(cm, e)) e_stop(e);\n }\n if (cm.options.dragDrop) {\n on(d.scroller, \"dragstart\", function(e){onDragStart(cm, e);});\n on(d.scroller, \"dragenter\", drag_);\n on(d.scroller, \"dragover\", drag_);\n on(d.scroller, \"drop\", operation(cm, onDrop));\n }\n on(d.scroller, \"paste\", function(e) {\n if (eventInWidget(d, e)) return;\n cm.state.pasteIncoming = true;\n focusInput(cm);\n fastPoll(cm);\n });\n on(d.input, \"paste\", function() {\n // Workaround for webkit bug https://bugs.webkit.org/show_bug.cgi?id=90206\n // Add a char to the end of textarea before paste occur so that\n // selection doesn't span to the end of textarea.\n if (webkit && !cm.state.fakedLastChar && !(new Date - cm.state.lastMiddleDown < 200)) {\n var start = d.input.selectionStart, end = d.input.selectionEnd;\n d.input.value += \"$\";\n // The selection end needs to be set before the start, otherwise there\n // can be an intermediate non-empty selection between the two, which\n // can override the middle-click paste buffer on linux and cause the\n // wrong thing to get pasted.\n d.input.selectionEnd = end;\n d.input.selectionStart = start;\n cm.state.fakedLastChar = true;\n }\n cm.state.pasteIncoming = true;\n fastPoll(cm);\n });\n\n function prepareCopyCut(e) {\n if (cm.somethingSelected()) {\n lastCopied = cm.getSelections();\n if (d.inaccurateSelection) {\n d.prevInput = \"\";\n d.inaccurateSelection = false;\n d.input.value = lastCopied.join(\"\\n\");\n selectInput(d.input);\n }\n } else {\n var text = [], ranges = [];\n for (var i = 0; i < cm.doc.sel.ranges.length; i++) {\n var line = cm.doc.sel.ranges[i].head.line;\n var lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)};\n ranges.push(lineRange);\n text.push(cm.getRange(lineRange.anchor, lineRange.head));\n }\n if (e.type == \"cut\") {\n cm.setSelections(ranges, null, sel_dontScroll);\n } else {\n d.prevInput = \"\";\n d.input.value = text.join(\"\\n\");\n selectInput(d.input);\n }\n lastCopied = text;\n }\n if (e.type == \"cut\") cm.state.cutIncoming = true;\n }\n on(d.input, \"cut\", prepareCopyCut);\n on(d.input, \"copy\", prepareCopyCut);\n\n // Needed to handle Tab key in KHTML\n if (khtml) on(d.sizer, \"mouseup\", function() {\n if (activeElt() == d.input) d.input.blur();\n focusInput(cm);\n });\n }", "_inputChangeHandler(event) {\n event.stopPropagation();\n event.preventDefault();\n }", "onClick_document(event) {\n if(event.defaultPrevented) {\n return\n }\n\n this.onClick_cancel()\n }", "function preventDefault(ev) {\n\tev.preventDefault();\n}", "function preventDefault(ev) {\n\tev.preventDefault();\n}", "function preventDefault(ev) {\n\tev.preventDefault();\n}", "function preventDefault(ev) {\n\tev.preventDefault();\n}", "function preventDefault(ev) {\n\tev.preventDefault();\n}", "function preventDefault(ev) {\n\tev.preventDefault();\n}", "function preventDefault(ev) {\n\tev.preventDefault();\n}", "function preventDefault(ev) {\n ev.preventDefault();\n}", "function preventDefault(ev) {\n ev.preventDefault();\n}", "function preventDefault(ev) {\n ev.preventDefault();\n}", "function preventDefault(ev) {\n ev.preventDefault();\n}", "function preventDefault(ev) {\n ev.preventDefault();\n}", "function preventDefault(e){e.preventDefault();}", "__preventDefaults (e) {\n e.preventDefault();\n e.stopPropagation();\n }", "function preventDefault(){\n\t }", "_initEvent() {\n this.cm.getWrapperElement().addEventListener('click', () => {\n this.eventManager.emit('click', {\n source: 'markdown'\n });\n });\n\n this.cm.on('beforeChange', (cm, ev) => {\n if (ev.origin === 'paste') {\n this.eventManager.emit('pasteBefore', {\n source: 'markdown',\n data: ev\n });\n }\n });\n\n this.cm.on('change', (cm, cmEvent) => {\n this._refreshCodeMirrorMarks(cmEvent);\n this._emitMarkdownEditorChangeEvent(cmEvent);\n });\n\n this.cm.on('focus', () => {\n this.eventManager.emit('focus', {\n source: 'markdown'\n });\n });\n\n this.cm.on('blur', () => {\n this.eventManager.emit('blur', {\n source: 'markdown'\n });\n });\n\n this.cm.on('scroll', (cm, eventData) => {\n this.eventManager.emit('scroll', {\n source: 'markdown',\n data: eventData\n });\n });\n\n this.cm.on('keydown', (cm, keyboardEvent) => {\n this.eventManager.emit('keydown', {\n source: 'markdown',\n data: keyboardEvent\n });\n\n this.eventManager.emit('keyMap', {\n source: 'markdown',\n keyMap: keyMapper.convert(keyboardEvent),\n data: keyboardEvent\n });\n });\n\n this.cm.on('keyup', (cm, keyboardEvent) => {\n this.eventManager.emit('keyup', {\n source: 'markdown',\n data: keyboardEvent\n });\n });\n\n this.cm.on('copy', (cm, ev) => {\n this.eventManager.emit('copy', {\n source: 'markdown',\n data: ev\n });\n });\n\n this.cm.on('cut', (cm, ev) => {\n this.eventManager.emit('cut', {\n source: 'markdown',\n data: ev\n });\n });\n\n this.cm.on('paste', (cm, clipboardEvent) => {\n this.eventManager.emit('paste', {\n source: 'markdown',\n data: clipboardEvent\n });\n });\n\n this.cm.on('drop', (cm, eventData) => {\n eventData.preventDefault();\n\n this.eventManager.emit('drop', {\n source: 'markdown',\n data: eventData\n });\n });\n\n this.cm.on('cursorActivity', () => this._onChangeCursorActivity());\n }", "function preventDefault(ev) {\n ev.preventDefault();\n }", "_documentUpHandler(event) {\n const that = this;\n\n if (!that._pressed || that.readonly) {\n return;\n }\n\n if (that.clickMode === 'press') {\n event.preventDefault();\n event.stopPropagation();\n that._pressed = false;\n return;\n }\n\n super._documentUpHandler(event);\n that.indeterminate = false;\n that._updateHidenInputNameAndValue();\n that._pressed = false;\n }", "_preventDefault(e) {\n e.preventDefault();\n }", "function addEditorMethods(CodeMirror) {\n var optionHandlers = CodeMirror.optionHandlers;\n var helpers = CodeMirror.helpers = {};\n CodeMirror.prototype = {\n constructor: CodeMirror,\n focus: function focus() {\n window.focus();\n this.display.input.focus();\n },\n setOption: function setOption(option, value) {\n var options = this.options,\n old = options[option];\n\n if (options[option] == value && option != \"mode\") {\n return;\n }\n\n options[option] = value;\n\n if (optionHandlers.hasOwnProperty(option)) {\n operation(this, optionHandlers[option])(this, value, old);\n }\n\n signal(this, \"optionChange\", this, option);\n },\n getOption: function getOption(option) {\n return this.options[option];\n },\n getDoc: function getDoc() {\n return this.doc;\n },\n addKeyMap: function addKeyMap(map, bottom) {\n this.state.keyMaps[bottom ? \"push\" : \"unshift\"](getKeyMap(map));\n },\n removeKeyMap: function removeKeyMap(map) {\n var maps = this.state.keyMaps;\n\n for (var i = 0; i < maps.length; ++i) {\n if (maps[i] == map || maps[i].name == map) {\n maps.splice(i, 1);\n return true;\n }\n }\n },\n addOverlay: methodOp(function (spec, options) {\n var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec);\n\n if (mode.startState) {\n throw new Error(\"Overlays may not be stateful.\");\n }\n\n insertSorted(this.state.overlays, {\n mode: mode,\n modeSpec: spec,\n opaque: options && options.opaque,\n priority: options && options.priority || 0\n }, function (overlay) {\n return overlay.priority;\n });\n this.state.modeGen++;\n regChange(this);\n }),\n removeOverlay: methodOp(function (spec) {\n var overlays = this.state.overlays;\n\n for (var i = 0; i < overlays.length; ++i) {\n var cur = overlays[i].modeSpec;\n\n if (cur == spec || typeof spec == \"string\" && cur.name == spec) {\n overlays.splice(i, 1);\n this.state.modeGen++;\n regChange(this);\n return;\n }\n }\n }),\n indentLine: methodOp(function (n, dir, aggressive) {\n if (typeof dir != \"string\" && typeof dir != \"number\") {\n if (dir == null) {\n dir = this.options.smartIndent ? \"smart\" : \"prev\";\n } else {\n dir = dir ? \"add\" : \"subtract\";\n }\n }\n\n if (isLine(this.doc, n)) {\n indentLine(this, n, dir, aggressive);\n }\n }),\n indentSelection: methodOp(function (how) {\n var ranges = this.doc.sel.ranges,\n end = -1;\n\n for (var i = 0; i < ranges.length; i++) {\n var range = ranges[i];\n\n if (!range.empty()) {\n var from = range.from(),\n to = range.to();\n var start = Math.max(end, from.line);\n end = Math.min(this.lastLine(), to.line - (to.ch ? 0 : 1)) + 1;\n\n for (var j = start; j < end; ++j) {\n indentLine(this, j, how);\n }\n\n var newRanges = this.doc.sel.ranges;\n\n if (from.ch == 0 && ranges.length == newRanges.length && newRanges[i].from().ch > 0) {\n replaceOneSelection(this.doc, i, new Range(from, newRanges[i].to()), sel_dontScroll);\n }\n } else if (range.head.line > end) {\n indentLine(this, range.head.line, how, true);\n end = range.head.line;\n\n if (i == this.doc.sel.primIndex) {\n ensureCursorVisible(this);\n }\n }\n }\n }),\n // Fetch the parser token for a given character. Useful for hacks\n // that want to inspect the mode state (say, for completion).\n getTokenAt: function getTokenAt(pos, precise) {\n return takeToken(this, pos, precise);\n },\n getLineTokens: function getLineTokens(line, precise) {\n return takeToken(this, Pos(line), precise, true);\n },\n getTokenTypeAt: function getTokenTypeAt(pos) {\n pos = _clipPos(this.doc, pos);\n var styles = getLineStyles(this, getLine(this.doc, pos.line));\n var before = 0,\n after = (styles.length - 1) / 2,\n ch = pos.ch;\n var type;\n\n if (ch == 0) {\n type = styles[2];\n } else {\n for (;;) {\n var mid = before + after >> 1;\n\n if ((mid ? styles[mid * 2 - 1] : 0) >= ch) {\n after = mid;\n } else if (styles[mid * 2 + 1] < ch) {\n before = mid + 1;\n } else {\n type = styles[mid * 2 + 2];\n break;\n }\n }\n }\n\n var cut = type ? type.indexOf(\"overlay \") : -1;\n return cut < 0 ? type : cut == 0 ? null : type.slice(0, cut - 1);\n },\n getModeAt: function getModeAt(pos) {\n var mode = this.doc.mode;\n\n if (!mode.innerMode) {\n return mode;\n }\n\n return CodeMirror.innerMode(mode, this.getTokenAt(pos).state).mode;\n },\n getHelper: function getHelper(pos, type) {\n return this.getHelpers(pos, type)[0];\n },\n getHelpers: function getHelpers(pos, type) {\n var found = [];\n\n if (!helpers.hasOwnProperty(type)) {\n return found;\n }\n\n var help = helpers[type],\n mode = this.getModeAt(pos);\n\n if (typeof mode[type] == \"string\") {\n if (help[mode[type]]) {\n found.push(help[mode[type]]);\n }\n } else if (mode[type]) {\n for (var i = 0; i < mode[type].length; i++) {\n var val = help[mode[type][i]];\n\n if (val) {\n found.push(val);\n }\n }\n } else if (mode.helperType && help[mode.helperType]) {\n found.push(help[mode.helperType]);\n } else if (help[mode.name]) {\n found.push(help[mode.name]);\n }\n\n for (var i$1 = 0; i$1 < help._global.length; i$1++) {\n var cur = help._global[i$1];\n\n if (cur.pred(mode, this) && indexOf(found, cur.val) == -1) {\n found.push(cur.val);\n }\n }\n\n return found;\n },\n getStateAfter: function getStateAfter(line, precise) {\n var doc = this.doc;\n line = clipLine(doc, line == null ? doc.first + doc.size - 1 : line);\n return getContextBefore(this, line + 1, precise).state;\n },\n cursorCoords: function cursorCoords(start, mode) {\n var pos,\n range = this.doc.sel.primary();\n\n if (start == null) {\n pos = range.head;\n } else if (_typeof(start) == \"object\") {\n pos = _clipPos(this.doc, start);\n } else {\n pos = start ? range.from() : range.to();\n }\n\n return _cursorCoords(this, pos, mode || \"page\");\n },\n charCoords: function charCoords(pos, mode) {\n return _charCoords(this, _clipPos(this.doc, pos), mode || \"page\");\n },\n coordsChar: function coordsChar(coords, mode) {\n coords = fromCoordSystem(this, coords, mode || \"page\");\n return _coordsChar(this, coords.left, coords.top);\n },\n lineAtHeight: function lineAtHeight(height, mode) {\n height = fromCoordSystem(this, {\n top: height,\n left: 0\n }, mode || \"page\").top;\n return _lineAtHeight(this.doc, height + this.display.viewOffset);\n },\n heightAtLine: function heightAtLine(line, mode, includeWidgets) {\n var end = false,\n lineObj;\n\n if (typeof line == \"number\") {\n var last = this.doc.first + this.doc.size - 1;\n\n if (line < this.doc.first) {\n line = this.doc.first;\n } else if (line > last) {\n line = last;\n end = true;\n }\n\n lineObj = getLine(this.doc, line);\n } else {\n lineObj = line;\n }\n\n return intoCoordSystem(this, lineObj, {\n top: 0,\n left: 0\n }, mode || \"page\", includeWidgets || end).top + (end ? this.doc.height - _heightAtLine(lineObj) : 0);\n },\n defaultTextHeight: function defaultTextHeight() {\n return textHeight(this.display);\n },\n defaultCharWidth: function defaultCharWidth() {\n return charWidth(this.display);\n },\n getViewport: function getViewport() {\n return {\n from: this.display.viewFrom,\n to: this.display.viewTo\n };\n },\n addWidget: function addWidget(pos, node, scroll, vert, horiz) {\n var display = this.display;\n pos = _cursorCoords(this, _clipPos(this.doc, pos));\n var top = pos.bottom,\n left = pos.left;\n node.style.position = \"absolute\";\n node.setAttribute(\"cm-ignore-events\", \"true\");\n this.display.input.setUneditable(node);\n display.sizer.appendChild(node);\n\n if (vert == \"over\") {\n top = pos.top;\n } else if (vert == \"above\" || vert == \"near\") {\n var vspace = Math.max(display.wrapper.clientHeight, this.doc.height),\n hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth); // Default to positioning above (if specified and possible); otherwise default to positioning below\n\n if ((vert == 'above' || pos.bottom + node.offsetHeight > vspace) && pos.top > node.offsetHeight) {\n top = pos.top - node.offsetHeight;\n } else if (pos.bottom + node.offsetHeight <= vspace) {\n top = pos.bottom;\n }\n\n if (left + node.offsetWidth > hspace) {\n left = hspace - node.offsetWidth;\n }\n }\n\n node.style.top = top + \"px\";\n node.style.left = node.style.right = \"\";\n\n if (horiz == \"right\") {\n left = display.sizer.clientWidth - node.offsetWidth;\n node.style.right = \"0px\";\n } else {\n if (horiz == \"left\") {\n left = 0;\n } else if (horiz == \"middle\") {\n left = (display.sizer.clientWidth - node.offsetWidth) / 2;\n }\n\n node.style.left = left + \"px\";\n }\n\n if (scroll) {\n scrollIntoView(this, {\n left: left,\n top: top,\n right: left + node.offsetWidth,\n bottom: top + node.offsetHeight\n });\n }\n },\n triggerOnKeyDown: methodOp(onKeyDown),\n triggerOnKeyPress: methodOp(onKeyPress),\n triggerOnKeyUp: onKeyUp,\n triggerOnMouseDown: methodOp(onMouseDown),\n execCommand: function execCommand(cmd) {\n if (commands.hasOwnProperty(cmd)) {\n return commands[cmd].call(null, this);\n }\n },\n triggerElectric: methodOp(function (text) {\n triggerElectric(this, text);\n }),\n findPosH: function findPosH(from, amount, unit, visually) {\n var dir = 1;\n\n if (amount < 0) {\n dir = -1;\n amount = -amount;\n }\n\n var cur = _clipPos(this.doc, from);\n\n for (var i = 0; i < amount; ++i) {\n cur = _findPosH(this.doc, cur, dir, unit, visually);\n\n if (cur.hitSide) {\n break;\n }\n }\n\n return cur;\n },\n moveH: methodOp(function (dir, unit) {\n var this$1 = this;\n this.extendSelectionsBy(function (range) {\n if (this$1.display.shift || this$1.doc.extend || range.empty()) {\n return _findPosH(this$1.doc, range.head, dir, unit, this$1.options.rtlMoveVisually);\n } else {\n return dir < 0 ? range.from() : range.to();\n }\n }, sel_move);\n }),\n deleteH: methodOp(function (dir, unit) {\n var sel = this.doc.sel,\n doc = this.doc;\n\n if (sel.somethingSelected()) {\n doc.replaceSelection(\"\", null, \"+delete\");\n } else {\n deleteNearSelection(this, function (range) {\n var other = _findPosH(doc, range.head, dir, unit, false);\n\n return dir < 0 ? {\n from: other,\n to: range.head\n } : {\n from: range.head,\n to: other\n };\n });\n }\n }),\n findPosV: function findPosV(from, amount, unit, goalColumn) {\n var dir = 1,\n x = goalColumn;\n\n if (amount < 0) {\n dir = -1;\n amount = -amount;\n }\n\n var cur = _clipPos(this.doc, from);\n\n for (var i = 0; i < amount; ++i) {\n var coords = _cursorCoords(this, cur, \"div\");\n\n if (x == null) {\n x = coords.left;\n } else {\n coords.left = x;\n }\n\n cur = _findPosV(this, coords, dir, unit);\n\n if (cur.hitSide) {\n break;\n }\n }\n\n return cur;\n },\n moveV: methodOp(function (dir, unit) {\n var this$1 = this;\n var doc = this.doc,\n goals = [];\n var collapse = !this.display.shift && !doc.extend && doc.sel.somethingSelected();\n doc.extendSelectionsBy(function (range) {\n if (collapse) {\n return dir < 0 ? range.from() : range.to();\n }\n\n var headPos = _cursorCoords(this$1, range.head, \"div\");\n\n if (range.goalColumn != null) {\n headPos.left = range.goalColumn;\n }\n\n goals.push(headPos.left);\n\n var pos = _findPosV(this$1, headPos, dir, unit);\n\n if (unit == \"page\" && range == doc.sel.primary()) {\n addToScrollTop(this$1, _charCoords(this$1, pos, \"div\").top - headPos.top);\n }\n\n return pos;\n }, sel_move);\n\n if (goals.length) {\n for (var i = 0; i < doc.sel.ranges.length; i++) {\n doc.sel.ranges[i].goalColumn = goals[i];\n }\n }\n }),\n // Find the word at the given position (as returned by coordsChar).\n findWordAt: function findWordAt(pos) {\n var doc = this.doc,\n line = getLine(doc, pos.line).text;\n var start = pos.ch,\n end = pos.ch;\n\n if (line) {\n var helper = this.getHelper(pos, \"wordChars\");\n\n if ((pos.sticky == \"before\" || end == line.length) && start) {\n --start;\n } else {\n ++end;\n }\n\n var startChar = line.charAt(start);\n var check = isWordChar(startChar, helper) ? function (ch) {\n return isWordChar(ch, helper);\n } : /\\s/.test(startChar) ? function (ch) {\n return /\\s/.test(ch);\n } : function (ch) {\n return !/\\s/.test(ch) && !isWordChar(ch);\n };\n\n while (start > 0 && check(line.charAt(start - 1))) {\n --start;\n }\n\n while (end < line.length && check(line.charAt(end))) {\n ++end;\n }\n }\n\n return new Range(Pos(pos.line, start), Pos(pos.line, end));\n },\n toggleOverwrite: function toggleOverwrite(value) {\n if (value != null && value == this.state.overwrite) {\n return;\n }\n\n if (this.state.overwrite = !this.state.overwrite) {\n addClass(this.display.cursorDiv, \"CodeMirror-overwrite\");\n } else {\n rmClass(this.display.cursorDiv, \"CodeMirror-overwrite\");\n }\n\n signal(this, \"overwriteToggle\", this, this.state.overwrite);\n },\n hasFocus: function hasFocus() {\n return this.display.input.getField() == activeElt();\n },\n isReadOnly: function isReadOnly() {\n return !!(this.options.readOnly || this.doc.cantEdit);\n },\n scrollTo: methodOp(function (x, y) {\n scrollToCoords(this, x, y);\n }),\n getScrollInfo: function getScrollInfo() {\n var scroller = this.display.scroller;\n return {\n left: scroller.scrollLeft,\n top: scroller.scrollTop,\n height: scroller.scrollHeight - scrollGap(this) - this.display.barHeight,\n width: scroller.scrollWidth - scrollGap(this) - this.display.barWidth,\n clientHeight: displayHeight(this),\n clientWidth: displayWidth(this)\n };\n },\n scrollIntoView: methodOp(function (range, margin) {\n if (range == null) {\n range = {\n from: this.doc.sel.primary().head,\n to: null\n };\n\n if (margin == null) {\n margin = this.options.cursorScrollMargin;\n }\n } else if (typeof range == \"number\") {\n range = {\n from: Pos(range, 0),\n to: null\n };\n } else if (range.from == null) {\n range = {\n from: range,\n to: null\n };\n }\n\n if (!range.to) {\n range.to = range.from;\n }\n\n range.margin = margin || 0;\n\n if (range.from.line != null) {\n scrollToRange(this, range);\n } else {\n scrollToCoordsRange(this, range.from, range.to, range.margin);\n }\n }),\n setSize: methodOp(function (width, height) {\n var this$1 = this;\n\n var interpret = function interpret(val) {\n return typeof val == \"number\" || /^\\d+$/.test(String(val)) ? val + \"px\" : val;\n };\n\n if (width != null) {\n this.display.wrapper.style.width = interpret(width);\n }\n\n if (height != null) {\n this.display.wrapper.style.height = interpret(height);\n }\n\n if (this.options.lineWrapping) {\n clearLineMeasurementCache(this);\n }\n\n var lineNo = this.display.viewFrom;\n this.doc.iter(lineNo, this.display.viewTo, function (line) {\n if (line.widgets) {\n for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].noHScroll) {\n regLineChange(this$1, lineNo, \"widget\");\n break;\n }\n }\n }\n\n ++lineNo;\n });\n this.curOp.forceUpdate = true;\n signal(this, \"refresh\", this);\n }),\n operation: function operation(f) {\n return runInOp(this, f);\n },\n startOperation: function startOperation() {\n return _startOperation(this);\n },\n endOperation: function endOperation() {\n return _endOperation(this);\n },\n refresh: methodOp(function () {\n var oldHeight = this.display.cachedTextHeight;\n regChange(this);\n this.curOp.forceUpdate = true;\n clearCaches(this);\n scrollToCoords(this, this.doc.scrollLeft, this.doc.scrollTop);\n updateGutterSpace(this.display);\n\n if (oldHeight == null || Math.abs(oldHeight - textHeight(this.display)) > .5 || this.options.lineWrapping) {\n estimateLineHeights(this);\n }\n\n signal(this, \"refresh\", this);\n }),\n swapDoc: methodOp(function (doc) {\n var old = this.doc;\n old.cm = null; // Cancel the current text selection if any (#5821)\n\n if (this.state.selectingText) {\n this.state.selectingText();\n }\n\n attachDoc(this, doc);\n clearCaches(this);\n this.display.input.reset();\n scrollToCoords(this, doc.scrollLeft, doc.scrollTop);\n this.curOp.forceScroll = true;\n signalLater(this, \"swapDoc\", this, old);\n return old;\n }),\n phrase: function phrase(phraseText) {\n var phrases = this.options.phrases;\n return phrases && Object.prototype.hasOwnProperty.call(phrases, phraseText) ? phrases[phraseText] : phraseText;\n },\n getInputField: function getInputField() {\n return this.display.input.getField();\n },\n getWrapperElement: function getWrapperElement() {\n return this.display.wrapper;\n },\n getScrollerElement: function getScrollerElement() {\n return this.display.scroller;\n },\n getGutterElement: function getGutterElement() {\n return this.display.gutters;\n }\n };\n eventMixin(CodeMirror);\n\n CodeMirror.registerHelper = function (type, name, value) {\n if (!helpers.hasOwnProperty(type)) {\n helpers[type] = CodeMirror[type] = {\n _global: []\n };\n }\n\n helpers[type][name] = value;\n };\n\n CodeMirror.registerGlobalHelper = function (type, name, predicate, value) {\n CodeMirror.registerHelper(type, name, value);\n\n helpers[type]._global.push({\n pred: predicate,\n val: value\n });\n };\n } // Used for horizontal relative motion. Dir is -1 or 1 (left or", "function preventDefault(ev) {\n ev.preventDefault();\n }", "function preventDefault(ev) {\n ev.preventDefault();\n }", "function preventDefault(ev) {\n ev.preventDefault();\n }", "function preventDefault(ev) {\n ev.preventDefault();\n }", "function handler(e) {\n e.stopPropagation();\n e.preventDefault();\n}", "function preventDefault () {\n this.originalEvent.preventDefault();\n }", "function ContextMenuEvent(ev) {\n\t// Ignore if the cursor isn't locked.\n\tif (!document.pointerLockElement) {\n\t\treturn;\n\t}\n\n\t// Ignore default handlers.\n\tev.preventDefault();\n\tev.stopPropagation();\n}", "_documentDownHandler(event) {\n const that = this,\n target = that.shadowRoot || that.isInShadowDOM ? event.originalEvent.composedPath()[0] : event.originalEvent.target;\n\n if ((target.shadowParent && target.shadowParent.closest('.jqx-input-drop-down-menu')) || target.closest('.jqx-input-drop-down-menu') || that.$.conditionsMenu.contains(target)) {\n return;\n }\n\n const isDropDown = target.closest('.jqx-drop-down');\n\n if (target.getRootNode().host === that || target.closest('jqx-query-builder') === that || (isDropDown && that.contains(isDropDown.ownerElement))) {\n that._clickHandler(event.originalEvent);\n return;\n }\n\n if (that._editorIsOpen && !that._scrollBarDown) {\n that._closeEditor();\n }\n\n delete that._scrollBarDown;\n }", "function preventDefault(ev) {\n\t\tev.preventDefault();\n\t}", "function pseudoDragEvent(editor)\n\t{\n\t\tvar isDrag=false,isTDrag=false,\n\t\t\tdivX,divY,eX,eY,obj,ix=\"\",iy=\"\",\n\t\t\tframeBody=editor.$frame.contents().find(\"body\"),\n\t\t\tframeDocument=editor.$frame.contents();\n\n\t\t//mouse down event\n\t\t$(frameBody).on(\"dblclick\",function(e){\n\t\t\t\t//icon\n\t\t\t\t$(frameDocument).find(e.target).css(\"cursor\",\"move\");\n\n\t\t\t\t//image or text area\n\t\t\t\tif($(e.target).is(\"img\") || $(e.target).is(\"textarea\") ) Mousedown(e,e.target);\n\n\t\t\t\t//decorated text\n\t\t\t\tif($(e.target).is(\"span\") )\n\t\t\t\t{\n\t\t\t\t\tif($(e.target).css(\"position\")==\"static\") \n\t\t\t\t\t\t$(e.target).css(\"position\",editor.options.position);\n\t\t\t\t\tif(e.originalEvent.shiftKey==true)//shift key\n\t\t\t\t\t\tMousedown(e,e.target);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//table\n\t\t\t\tif($(e.target).is(\"table\") || $(e.target).is(\"td\") || $(e.target).is(\"th\")) tdown(e,e.target);\n\t\t\t});\n\t\t\t\n\t\t///textarea///\n\t\t//fire when mouse down\n\t\tfunction Mousedown(e,target) {\n\t\t\tisDrag=true;\n\n\t\t\tif(positionX==\"\" && positionY==\"\")\n\t\t\t{\n\t\t\t\t//get position\n\t\t\t\tpositionX=$(target).css(\"left\")!=\"auto\" ? parseFloat($(target).css(\"left\")) : 0;\n\t\t\t\tpositionY=$(target).css(\"top\")!=\"auto\" ? parseFloat($(target).css(\"top\")) : 0;\n\t\t\t\tx = e.pageX - positionX;\n\t\t\t\ty = e.pageY - positionY;\n\n\t\t\t}\n\t\t\t//move event\n\t\t\t$(frameDocument).off(\"mousemove\").on(\"mousemove\",target,function(e){Mousemove(e,target)});\n\t\t}\n\t\t\n\t\t//fire when mouse move\n\t\tfunction Mousemove(e,target) {\n\t\t\tif(isDrag==true)\n\t\t\t{\n\t\t\t\t//prevent default event\n\t\t\t\te.preventDefault();\n\n\t\t\t\t//trace mouse\n\t\t\t\t$(target).css({\"top\":e.pageY - y + \"px\",\"left\":e.pageX - x + \"px\"});\n\t\t\t\t\n\t\t\t\t//mouse up or mouse leave event\n\t\t\t\t$(frameDocument).off(\"mouseup\").on(\"mouseup\",target,function(e){Mouseup(e,target)});\n\t\t\t\t$(frameDocument).off(\"mouseleave\").on(\"mouseleave\",target,function(e){Mouseup(e,target)});\n\t\t\t}\n\t\t}\n\n\t\t//fire when mouse up\n\t\tfunction Mouseup(e,target) {\n\t\t\t//remove event handler\n\t\t\t$(frameDocument).off(\"mousemove\",target,Mousemove);\n\t\t\t$(frameDocument).off(\"mouseleave\",target,Mouseup);\n\t\t\t$(frameDocument).off(\"mouseup\",target,Mouseup);\n\t\t\tisDrag=false;\n\t\t\tpositionX=positionY=\"\";\n\t\t\t\n\t\t\t//icon\n\t\t\t$(target).css(\"cursor\",\"default\");\n\t\t\t$(frameDocument).css(\"cursor\",\"default\");\n\t\t\ttarget=\"\";\n\t\t\t\n\t\t\teditor.updateTextArea();//update iframe\n\t\t}\n\t\t\n\t\t///table///\n\t\t//fire when mouse down\n\t\tfunction tdown(e,target) {\n\t\t\tisTDrag=true;\n\n\t\t\tif(ix==\"\" || iy==\"\" )\n\t\t\t{\n\t\t\t\tobj=$(target).is(\"table\") ? target : $(target).closest(\"table\");\n\t\t\t\tdivX=$(obj).offset().left;\n\t\t\t\tdivY=$(obj).offset().top;\n\t\t\t\tvar divW=$(obj).width(),\n\t\t\t\t\tdivH=$(obj).height(),\n\t\t\t\t\tdivZ=$(obj).css(\"z-index\");\n\t\t\t\tvar html=\"<div class='divTable' style='position:absolute;top:\"+divY+\"px;left:\"+divX+\"px;width:\"\n\t\t\t\t\t+divW+\"px;height:\"+divH+\"px;border:2px solid blue;opacity:0.6;background-color:blue'></div>\";\n\t\t\t\t$(frameBody).append(html);\n\t\t\t\tif(divZ!=\"auto\") $(frameBody).find(\".divTable\").css(\"z-index\",divZ+1);\n\t\t\t\t\n\t\t\t\t//get relative position\n\t\t\t\tix=$(obj).css(\"left\")!=\"auto\" ? parseInt($(obj).css(\"left\")) : 0;\n\t\t\t\tiy=$(obj).css(\"top\")!=\"auto\" ? parseInt($(obj).css(\"top\")) : 0;\n\t\t\t\tx = e.pageX;\n\t\t\t\ty = e.pageY;\n\t\t\t\t\n\t\t\t}\n\t\t\t//move event\n\t\t\t$(frameDocument).on(\"mousemove\",\".divTable\",function(e){tmove(e,$(frameBody).find(\".divTable\"))});\n\t\t\t\n\t\t}\n\n\t\t//fire when mouse move\n\t\tfunction tmove(e,target) {\n\t\t\tif(isTDrag==true)\n\t\t\t{\n\t\t\t\t//prevent default event\n\t\t\t\te.preventDefault();\n\t\t\t\t\n\t\t\t\t//to prevent display error dialog in ie11\n\t\t\t\tif(iege11) $(obj).trigger('mouseup');\n\n\t\t\t\t//trace mouse\n\t\t\t\t$(target).css({\"top\":e.pageY - y + divY +\"px\",\"left\":e.pageX - x + divX + \"px\"});\n\t\t\t\teX=e.pageX;\n\t\t\t\teY=e.pageY;\n\t\t\t\t\n\t\t\t\t//mouse up or mouse leave event\n\t\t\t\t$(target).on(\"mouseup\",function(e){tup(e,target)});\n\t\t\t\t$(frameDocument).on(\"mouseleave\",\".divTable\",function(e){tup(e,target)});\n\t\t\t}\n\t\t}\n\n\t\t//fire when mouse up\n\t\tfunction tup(e,target) \n\t\t{\n\t\t\tif(isTDrag==true)\n\t\t\t{\n\t\t\t\t//remove event handler\n\t\t\t\t$(frameDocument).off(\"mousemove\",tmove);\n\t\t\t\t$(frameDocument).off(\"mouseleave\",tup);\n\t\t\t\t$(target).off(\"mouseup\",tup);\n\t\t\t\tisTDrag=false;\n\t\t\t\t$(obj).css({\"left\":eX-x+ix+\"px\",\"top\":eY-y+iy+\"px\"});\n\t\t\t\t\n\t\t\t\tix=iy=\"\";\n\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t$(frameBody).find(\".divTable\").remove();\n\t\t\t\t\t\n\t\t\t\t\teditor.updateTextArea();//update iframe\n\t\t\t\t\t//focusedObj=prevObj=$(obj);\n\t\t\t\t},10);\n\t\t\t}\n\t\t}\n\t}", "function registerEventHandlers(cm) {\n var d = cm.display;\n on(d.scroller, \"mousedown\", operation(cm, onMouseDown));\n // Older IE's will not fire a second mousedown for a double click\n if (ie && ie_version < 11)\n on(d.scroller, \"dblclick\", operation(cm, function(e) {\n if (signalDOMEvent(cm, e)) return;\n var pos = posFromMouse(cm, e);\n if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) return;\n e_preventDefault(e);\n var word = findWordAt(cm, pos);\n extendSelection(cm.doc, word.anchor, word.head);\n }));\n else\n on(d.scroller, \"dblclick\", function(e) { signalDOMEvent(cm, e) || e_preventDefault(e); });\n // Prevent normal selection in the editor (we handle our own)\n on(d.lineSpace, \"selectstart\", function(e) {\n if (!eventInWidget(d, e)) e_preventDefault(e);\n });\n // Some browsers fire contextmenu *after* opening the menu, at\n // which point we can't mess with it anymore. Context menu is\n // handled in onMouseDown for these browsers.\n if (!captureRightClick) on(d.scroller, \"contextmenu\", function(e) {onContextMenu(cm, e);});\n\n // Sync scrolling between fake scrollbars and real scrollable\n // area, ensure viewport is updated when scrolling.\n on(d.scroller, \"scroll\", function() {\n if (d.scroller.clientHeight) {\n setScrollTop(cm, d.scroller.scrollTop);\n setScrollLeft(cm, d.scroller.scrollLeft, true);\n signal(cm, \"scroll\", cm);\n }\n });\n on(d.scrollbarV, \"scroll\", function() {\n if (d.scroller.clientHeight) setScrollTop(cm, d.scrollbarV.scrollTop);\n });\n on(d.scrollbarH, \"scroll\", function() {\n if (d.scroller.clientHeight) setScrollLeft(cm, d.scrollbarH.scrollLeft);\n });\n\n // Listen to wheel events in order to try and update the viewport on time.\n on(d.scroller, \"mousewheel\", function(e){onScrollWheel(cm, e);});\n on(d.scroller, \"DOMMouseScroll\", function(e){onScrollWheel(cm, e);});\n\n // Prevent clicks in the scrollbars from killing focus\n function reFocus() { if (cm.state.focused) setTimeout(bind(focusInput, cm), 0); }\n on(d.scrollbarH, \"mousedown\", reFocus);\n on(d.scrollbarV, \"mousedown\", reFocus);\n // Prevent wrapper from ever scrolling\n on(d.wrapper, \"scroll\", function() { d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; });\n\n on(d.input, \"keyup\", operation(cm, onKeyUp));\n on(d.input, \"input\", function() {\n if (ie && ie_version >= 9 && cm.display.inputHasSelection) cm.display.inputHasSelection = null;\n fastPoll(cm);\n });\n on(d.input, \"keydown\", operation(cm, onKeyDown));\n on(d.input, \"keypress\", operation(cm, onKeyPress));\n on(d.input, \"focus\", bind(onFocus, cm));\n on(d.input, \"blur\", bind(onBlur, cm));\n\n function drag_(e) {\n if (!signalDOMEvent(cm, e)) e_stop(e);\n }\n if (cm.options.dragDrop) {\n on(d.scroller, \"dragstart\", function(e){onDragStart(cm, e);});\n on(d.scroller, \"dragenter\", drag_);\n on(d.scroller, \"dragover\", drag_);\n on(d.scroller, \"drop\", operation(cm, onDrop));\n }\n on(d.scroller, \"paste\", function(e) {\n if (eventInWidget(d, e)) return;\n cm.state.pasteIncoming = true;\n focusInput(cm);\n fastPoll(cm);\n });\n on(d.input, \"paste\", function() {\n // Workaround for webkit bug https://bugs.webkit.org/show_bug.cgi?id=90206\n // Add a char to the end of textarea before paste occur so that\n // selection doesn't span to the end of textarea.\n if (webkit && !cm.state.fakedLastChar && !(new Date - cm.state.lastMiddleDown < 200)) {\n var start = d.input.selectionStart, end = d.input.selectionEnd;\n d.input.value += \"$\";\n // The selection end needs to be set before the start, otherwise there\n // can be an intermediate non-empty selection between the two, which\n // can override the middle-click paste buffer on linux and cause the\n // wrong thing to get pasted.\n d.input.selectionEnd = end;\n d.input.selectionStart = start;\n cm.state.fakedLastChar = true;\n }\n cm.state.pasteIncoming = true;\n fastPoll(cm);\n });\n\n function prepareCopyCut(e) {\n if (cm.somethingSelected()) {\n if (d.inaccurateSelection) {\n d.prevInput = \"\";\n d.inaccurateSelection = false;\n d.input.value = cm.getSelection();\n selectInput(d.input);\n }\n } else {\n var text = \"\", ranges = [];\n for (var i = 0; i < cm.doc.sel.ranges.length; i++) {\n var line = cm.doc.sel.ranges[i].head.line;\n var lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)};\n ranges.push(lineRange);\n text += cm.getRange(lineRange.anchor, lineRange.head);\n }\n if (e.type == \"cut\") {\n cm.setSelections(ranges, null, sel_dontScroll);\n } else {\n d.prevInput = \"\";\n d.input.value = text;\n selectInput(d.input);\n }\n }\n if (e.type == \"cut\") cm.state.cutIncoming = true;\n }\n on(d.input, \"cut\", prepareCopyCut);\n on(d.input, \"copy\", prepareCopyCut);\n\n // Needed to handle Tab key in KHTML\n if (khtml) on(d.sizer, \"mouseup\", function() {\n if (activeElt() == d.input) d.input.blur();\n focusInput(cm);\n });\n }" ]
[ "0.7128738", "0.71111244", "0.6913718", "0.6913718", "0.6910328", "0.6910328", "0.6910328", "0.6901468", "0.68783", "0.68783", "0.68783", "0.68783", "0.68783", "0.68783", "0.68783", "0.68783", "0.68783", "0.68783", "0.68783", "0.68238217", "0.68238217", "0.68238217", "0.68238217", "0.68238217", "0.6817406", "0.6776234", "0.6776234", "0.6765821", "0.6386669", "0.63705957", "0.6111378", "0.61057377", "0.61057377", "0.6057752", "0.6055039", "0.5967385", "0.57846886", "0.5756221", "0.57172185", "0.569919", "0.56927997", "0.56645876", "0.5632317", "0.5617644", "0.5599354", "0.5596511", "0.5588282", "0.55854034", "0.5557076", "0.55544543", "0.55544543", "0.55497366", "0.5510664", "0.5482368", "0.5482368", "0.5482368", "0.5482368", "0.5482368", "0.5482368", "0.5482368", "0.5469862", "0.5469862", "0.5469862", "0.5469862", "0.5469862", "0.54640436", "0.54510653", "0.5439521", "0.5437359", "0.54372627", "0.54335207", "0.54166293", "0.5412379", "0.5411055", "0.5411055", "0.5411055", "0.5411055", "0.5410645", "0.5383104", "0.53773856", "0.53733927", "0.5365799", "0.535381", "0.5341225" ]
0.68800914
20
Add on and off methods to a constructor's prototype, to make registering events on such objects more convenient.
function eventMixin(ctor) { ctor.prototype.on = function(type, f) {on(this, type, f);}; ctor.prototype.off = function(type, f) {off(this, type, f);}; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 eventMixin(ctor) {\n\t\t ctor.prototype.on = function(type, f) {on(this, type, f);};\n\t\t ctor.prototype.off = function(type, f) {off(this, type, f);};\n\t\t }", "function eventMixin(ctor) {\n\t\t ctor.prototype.on = function(type, f) {on(this, type, f);};\n\t\t ctor.prototype.off = function(type, f) {off(this, type, f);};\n\t\t }", "function eventMixin(ctor) {\n\t ctor.prototype.on = function(type, f) {on(this, type, f);};\n\t ctor.prototype.off = function(type, f) {off(this, type, f);};\n\t }", "function eventMixin(ctor) {\n\t ctor.prototype.on = function(type, f) {on(this, type, f);};\n\t ctor.prototype.off = function(type, f) {off(this, type, f);};\n\t }", "function eventMixin(ctor) {\n\t ctor.prototype.on = function(type, f) {on(this, type, f);};\n\t ctor.prototype.off = function(type, f) {off(this, type, f);};\n\t }", "function eventMixin(ctor) {\r\n ctor.prototype.on = function(type, f) {on(this, type, f);};\r\n ctor.prototype.off = function(type, f) {off(this, type, f);};\r\n }", "function eventMixin(ctor) {\r\n ctor.prototype.on = function(type, f) {on(this, type, f);};\r\n ctor.prototype.off = function(type, f) {off(this, type, f);};\r\n}", "function eventMixin(ctor) {\n ctor.prototype.on = function (type, f) {\n on(this, type, f);\n };\n\n ctor.prototype.off = function (type, f) {\n off(this, type, f);\n };\n } // Due to the fact that we still support jurassic IE versions, some", "function eventMixin(ctor) {\n ctor.prototype.on = function(type, f) {on(this, type, f);};\n ctor.prototype.off = function(type, f) {off(this, type, f);};\n}", "function eventMixin(ctor) {\n ctor.prototype.on = function(type, f) {on(this, type, f);};\n ctor.prototype.off = function(type, f) {off(this, type, f);};\n}", "function eventMixin(ctor) {\n ctor.prototype.on = function(type, f) {on(this, type, f);};\n ctor.prototype.off = function(type, f) {off(this, type, f);};\n}", "function eventMixin(ctor) {\n ctor.prototype.on = function(type, f) {on(this, type, f);};\n ctor.prototype.off = function(type, f) {off(this, type, f);};\n}", "function eventMixin(ctor) {\n ctor.prototype.on = function(type, f) {on(this, type, f);};\n ctor.prototype.off = function(type, f) {off(this, type, f);};\n}", "function eventMixin(ctor) {\n ctor.prototype.on = function(type, f) {on(this, type, f);};\n ctor.prototype.off = function(type, f) {off(this, type, f);};\n}", "function eventMixin(ctor) {\n ctor.prototype.on = function(type, f) {on(this, type, f);};\n ctor.prototype.off = function(type, f) {off(this, type, f);};\n}", "function eventMixin(ctor) {\n ctor.prototype.on = function(type, f) {on(this, type, f);};\n ctor.prototype.off = function(type, f) {off(this, type, f);};\n}", "function eventMixin(ctor) {\n ctor.prototype.on = function(type, f) {on(this, type, f);};\n ctor.prototype.off = function(type, f) {off(this, type, f);};\n}", "function eventMixin(ctor) {\n ctor.prototype.on = function(type, f) {on(this, type, f);};\n ctor.prototype.off = function(type, f) {off(this, type, f);};\n}", "function eventMixin(ctor) {\n ctor.prototype.on = function(type, f) {on(this, type, f);};\n ctor.prototype.off = function(type, f) {off(this, type, f);};\n}", "function eventMixin(ctor) {\n ctor.prototype.on = function(type, f) {on(this, type, f)}\n ctor.prototype.off = function(type, f) {off(this, type, f)}\n}", "function eventMixin(ctor) {\n ctor.prototype.on = function(type, f) {on(this, type, f)}\n ctor.prototype.off = function(type, f) {off(this, type, f)}\n}", "function De(e){e.prototype.on=function(e,t){ni(this,e,t)},e.prototype.off=function(e,t){ke(this,e,t)}}", "function defineOnPrototype(ctor, methods) {\n var proto = ctor.prototype;\n forEachProperty(methods, function(val, key) {\n proto[key] = val;\n });\n }", "on() {\r\n throw new Error('Abstract method \"on\" must be implemented');\r\n }", "static events(...events) {\n return (target) => {\n Object.defineProperty(target.prototype, \"events\", {\n value: events\n });\n };\n }", "function PrototypeBasedClass () {\n}", "function EventClass() {}", "addEventListeners() {\n // Empty in base class.\n }", "constructor (...args) {\n super(...args);\n\n const { constructor } = this;\n\n // Used for the ready() function so it knows when it can call its callback.\n this[$created] = true;\n\n // TODO refactor to not cater to Safari < 10. This means we can depend on\n // built-in property descriptors.\n // Must be defined on constructor and not from a superclass\n if (!constructor.hasOwnProperty($ctorCreateInitProps)) {\n setCtorNativeProperty(constructor, $ctorCreateInitProps, createInitProps(constructor));\n }\n\n // Set up a renderer that is debounced for property sets to call directly.\n this[$rendererDebounced] = debounce(this[$renderer].bind(this));\n\n // Set up property lifecycle.\n const propDefsCount = getPropNamesAndSymbols(getPropsMap(constructor)).length;\n if (propDefsCount && constructor[$ctorCreateInitProps]) {\n constructor[$ctorCreateInitProps](this);\n }\n\n // DEPRECATED\n //\n // static render()\n // Note that renderCallback is an optional method!\n if (!this.renderCallback && constructor.render) {\n DEBUG && deprecated(this, 'static render', 'renderCallback');\n this.renderCallback = constructor.render.bind(constructor, this);\n }\n\n // DEPRECATED\n //\n // static created()\n //\n // Props should be set up before calling this.\n const { created } = constructor;\n if (isFunction(created)) {\n DEBUG && deprecated(this, 'static created', 'constructor');\n created(this);\n }\n\n // DEPRECATED\n //\n // Feature has rarely been used.\n //\n // Created should be set before invoking the ready listeners.\n const elemData = data(this);\n const readyCallbacks = elemData.readyCallbacks;\n if (readyCallbacks) {\n readyCallbacks.forEach(cb => cb(this));\n delete elemData.readyCallbacks;\n }\n }", "constructor (...args) {\n super(...args);\n\n const { constructor } = this;\n\n // Used for the ready() function so it knows when it can call its callback.\n this[created] = true;\n\n // TODO refactor to not cater to Safari < 10. This means we can depend on\n // built-in property descriptors.\n // Must be defined on constructor and not from a superclass\n if (!constructor.hasOwnProperty(ctorCreateInitProps)) {\n setCtorNativeProperty(constructor, ctorCreateInitProps, createInitProps(constructor));\n }\n\n // Set up a renderer that is debounced for property sets to call directly.\n this[rendererDebounced] = debounce(this[renderer].bind(this));\n\n // Set up property lifecycle.\n const propDefsCount = getPropNamesAndSymbols(getPropsMap(constructor)).length;\n if (propDefsCount && constructor[ctorCreateInitProps]) {\n constructor[ctorCreateInitProps](this);\n }\n\n // DEPRECATED\n //\n // static render()\n // Note that renderCallback is an optional method!\n if (!this.renderCallback && constructor.render) {\n deprecated(this, 'static render', 'renderCallback');\n this.renderCallback = constructor.render.bind(constructor, this);\n }\n\n // DEPRECATED\n //\n // static created()\n //\n // Props should be set up before calling this.\n const { created: created$$1 } = constructor;\n if (isFunction(created$$1)) {\n deprecated(this, 'static created', 'constructor');\n created$$1(this);\n }\n\n // DEPRECATED\n //\n // Feature has rarely been used.\n //\n // Created should be set before invoking the ready listeners.\n const elemData = data(this);\n const readyCallbacks = elemData.readyCallbacks;\n if (readyCallbacks) {\n readyCallbacks.forEach(cb => cb(this));\n delete elemData.readyCallbacks;\n }\n }", "function Eventable()\n{\n\n}", "get prototype() {}", "on() {\n control.on.apply(this, [].slice.call(arguments));\n }", "constructor() {\n this._events = Object.create(null)\n }", "set prototype(value) {}", "function Evented() {\n // summary:\n // A class that can be used as a mixin or base class,\n // to add on() and emit() methods to a class\n // for listening for events and emitting events:\n //\n // | define([\"cbtree/Evented\"], function(Evented){\n // | var EventedWidget = dojo.declare([Evented, dijit._Widget], {...});\n // | widget = new EventedWidget();\n // | widget.on(\"open\", function(event){\n // | ... do something with event\n // | });\n // |\n // | widget.emit(\"open\", {name:\"some event\", ...});\n\n this.on = function(type, listener) {\n\n function onMethod( target, type ) {\n\t\t\t\tvar ctor = target.constructor;\n\t\t\t\tvar onMap = ctor._onMap;\n\t\t\t\tif(!onMap){\n\t\t\t\t\tonMap = (ctor._onMap = {});\n\t\t\t\t\tfor(var attr in ctor.prototype){\n\t\t\t\t\t\tif(/^on/.test(attr)){\n\t\t\t\t\t\t\tonMap[attr.replace(/^on/, \"\").toLowerCase()] = attr;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tvar method = onMap[type.toLowerCase()] || \"on\" + type;\n\t\t\t\treturn method;\n }\n\n return on.parse(this, type, listener, function(target, type){\n return aspect.after(target, onMethod(target, type), listener, true);\n });\n };\n\n this.emit = function(type, event){\n var args = [this];\n if (!event.type) event.type = type;\n args.push.apply(args, arguments);\n return on.emit.apply(on, args);\n };\n\n }", "function constructor(properties) {\n\t\t\t// if no properties are passed, we're creating a prototype for a subclass,\n\t\t\t//\tso just bail immediately\n\t\t\tif (arguments[0] == $.SKIP) return;\n\t\t\t\n\t\t\t// extend the instance with all arguments passed in\n\t\t\tif (arguments.length) {\n\t\t\t\tproperties = this.extend.apply(this, arguments);\n\t\t\t}\n\n\t\t\t// call the initialize routine\n\t\t\tthis.initialize.apply(this, arguments);\n\t\t\t\n\t\t\t// and broadcast that we have been created\n\t\t\tthis.notify(\"onCreate\", properties);\t\n\t\t}", "function on(){return(on=Object.assign||function(g){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var A in e)Object.prototype.hasOwnProperty.call(e,A)&&(g[A]=e[A])}return g}).apply(this,arguments)}", "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 }", "onConstructed() {}", "onConstructed() {}", "constructor(){\n\t\tif (new.target === Observer) {\n\t\t\tthrow new TypeError(\"Cannot construct Interface Classes\");\n\t\t}\n\t}", "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 }", "init() {\n module_utils.patchModule(\n 'bunyan',\n '_emit',\n emitWrapper,\n bunyan => bunyan.prototype\n );\n }", "function mixin(ctor,methods){var keyCopier=function keyCopier(key){ctor.prototype[key]=methods[key];};Object.keys(methods).forEach(keyCopier);Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(methods).forEach(keyCopier);return ctor;}", "function mixin(ctor,methods){var keyCopier=function keyCopier(key){ctor.prototype[key]=methods[key];};Object.keys(methods).forEach(keyCopier);Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(methods).forEach(keyCopier);return ctor;}", "function mixin(ctor,methods){var keyCopier=function keyCopier(key){ctor.prototype[key]=methods[key];};Object.keys(methods).forEach(keyCopier);Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(methods).forEach(keyCopier);return ctor;}", "constructor() {\n super('OBS', ['OnOBSSwitchScenes', 'OnOBSTransitionTo', 'OnOBSStreamStarted', 'OnOBSStreamStopped', 'OnOBSCustomMessage']);\n this.onSwitch = [];\n this.onSwitchTrigger = {};\n this.onTransitionTo = [];\n this.onTransitionToTrigger = {};\n this.onStartTrigger = [];\n this.onStopTrigger = [];\n this.onCustom = [];\n this.onCustomTrigger = {};\n }", "function Prototype() {\n }", "constructor() {\n super(...arguments);\n var prototype = Object.getPrototypeOf(this);\n }", "constructor() {\n super(...arguments);\n var prototype = Object.getPrototypeOf(this);\n }", "init (...args) {\n this._super(...args)\n // Initialize the listeners array.\n this.set('listeners', [])\n }", "function Events() {} //", "function Events() {} //", "function Events() {} //", "function Events() {} //", "function Events() {} //", "function Events() {} //", "constructor() {\n this._listeners = {\n // debug: [],\n };\n for (const key in EVENTS) { // eslint-disable-line guard-for-in\n this._listeners[EVENTS[key]] = [];\n }\n\n this.on = this.addListener;\n this.off = this.removeListener;\n\n const indoorAtlasEventEmitter = new NativeEventEmitter(NativeIndoorAtlas);\n\n Object.keys(this._listeners).forEach(eventName => {\n const propertyName = \"_\" + eventName + \"Subscription\";\n const listener = this._handleIndoorAtlasEvent.bind(this, eventName);\n this[propertyName] = indoorAtlasEventEmitter.addListener(eventName, listener);\n });\n }", "function InstanceConstructor(instance_seed) {\n return {\n getElement : _getElement, \t\t\t// method affecting static class vars\n setElement : _setElement, \t\t\t// get the shared static value\n\t\t\tprintElement: function(){ \t\t\t// Sample function to test the code. Just a stub.\n\t\t\t\tvar tElement = new Element;\n\t\t\t\tvar vElement = new Element;\n\t\t\t\ttElement.setElement('Common Element');\n\t\t\t\talert('tElement\\'s: ' + tElement.getElement());\n\t\t\t\talert('vElement\\'s: ' + vElement.getElement());\n\t\t\t\t\n\t\t\t},\n\t\t\tattachClickEvent: attach, \t\t\t// attach click event to mini add-on\n\t\t\tdetachClickEvent: detach, \t\t\t// when disabled remove the click event.\n\t\t\tsetStateOfAddon: _setStateOfAddon,\t// set the state of the add-on whether it be minified or expanded.\n\t\t\tgetStateOfAddon: _getStateOfAddon,\n\t\t\t_toggle: toggle,\n\t\t\tattachHoverEvent : attachhoverevent,\n\t\t\tattachMouseOutEvent: attachmouseoutevent\n\t\t}\n }", "function constructorDecorator(...args) {\n const instance = new OriginalClass(...args);\n\n // Decorator for the _create() method.\n // We save the decorated _create() and we will use it if type != 'auto_segmentation'\n const decoratedCreate = instance._create;\n instance._create = () => {\n if (instance._type !== 'auto_segmentation') {\n decoratedCreate.call(instance);\n return;\n }\n\n instance._drawInstance = instance._frameContent.polyline().draw({ snapToGrid: 0.1 }).addClass('shapeCreation').attr({\n 'stroke-width': 0,\n z_order: Number.MAX_SAFE_INTEGER,\n });\n instance._createPolyEvents();\n\n /* the _createPolyEvents method have added \"drawdone\"\n * event handler which invalid for this case\n * because of that reason we remove the handler and\n * create the valid handler instead\n */\n instance._drawInstance.off('drawdone').on('drawdone', (e) => {\n let actualPoints = window.cvat.translate.points.canvasToActual(e.target.getAttribute('points'));\n actualPoints = PolyShapeModel.convertStringToNumberArray(actualPoints);\n\n if (actualPoints.length < 4) {\n showMessage('It is need to specify minimum four extreme points for an object');\n instance._controller.switchCreateMode(true);\n return;\n }\n\n const { frameWidth } = window.cvat.player.geometry;\n const { frameHeight } = window.cvat.player.geometry;\n for (let idx = 0; idx < actualPoints.length; idx += 1) {\n const point = actualPoints[idx];\n point.x = Math.clamp(point.x, 0, frameWidth);\n point.y = Math.clamp(point.y, 0, frameHeight);\n }\n\n e.target.setAttribute('points',\n window.cvat.translate.points.actualToCanvas(\n PolyShapeModel.convertNumberArrayToString(actualPoints),\n ));\n\n const polybox = e.target.getBBox();\n const area = polybox.width * polybox.height;\n\n if (area > AREA_TRESHOLD) {\n $.ajax({\n url: `/dextr/create/${window.cvat.job.id}`,\n type: 'POST',\n data: JSON.stringify({\n frame: window.cvat.player.frames.current,\n points: actualPoints,\n }),\n contentType: 'application/json',\n success: () => {\n function intervalCallback() {\n $.ajax({\n url: `/dextr/check/${window.cvat.job.id}`,\n type: 'GET',\n success: (jobData) => {\n if (['queued', 'started'].includes(jobData.status)) {\n if (jobData.status === 'queued') {\n dextrCancelButton.prop('disabled', false);\n }\n setTimeout(intervalCallback, 1000);\n } else {\n dextrOverlay.addClass('hidden');\n if (jobData.status === 'finished') {\n if (jobData.result) {\n instance._controller.finish({ points: jobData.result }, 'polygon');\n }\n } else if (jobData.status === 'failed') {\n const message = `Segmentation has fallen. Error: '${jobData.stderr}'`;\n showMessage(message);\n } else {\n let message = `Check segmentation request returned \"${jobData.status}\" status.`;\n if (jobData.stderr) {\n message += ` Error: ${jobData.stderr}`;\n }\n showMessage(message);\n }\n }\n },\n error: (errorData) => {\n dextrOverlay.addClass('hidden');\n const message = `Can not check segmentation. Code: ${errorData.status}.`\n + ` Message: ${errorData.responseText || errorData.statusText}`;\n showMessage(message);\n },\n });\n }\n\n dextrCancelButton.prop('disabled', true);\n dextrOverlay.removeClass('hidden');\n setTimeout(intervalCallback, 1000);\n },\n error: (errorData) => {\n const message = `Can not cancel ReID process. Code: ${errorData.status}.`\n + ` Message: ${errorData.responseText || errorData.statusText}`;\n showMessage(message);\n },\n });\n }\n\n instance._controller.switchCreateMode(true);\n }); // end of \"drawdone\" handler\n }; // end of _create() method\n\n return instance;\n } // end of constructorDecorator()", "off() {\r\n throw new Error('Abstract method \"off\" must be implemented');\r\n }", "constructor(ctor = globalThis.WebSocket) {\n this.reset();\n\n Object.defineProperties(\n this,\n [\n ['ctor', ctor],\n ['receiveDataQueue', []],\n ['receiveCallbacksQueue', []],\n ['closeEvent', null]\n ].reduce(\n (acc, [name, value]) => ({\n ...acc,\n [name]: { value, enumerable: false }\n }),\n {}\n )\n );\n }", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}", "function Events() {}" ]
[ "0.68008655", "0.6739639", "0.6739639", "0.6707064", "0.6707064", "0.6707064", "0.66955423", "0.66900265", "0.66089475", "0.6582923", "0.6582923", "0.6582923", "0.6582923", "0.6582923", "0.6582923", "0.6582923", "0.6582923", "0.6582923", "0.6582923", "0.6582923", "0.6528967", "0.6528967", "0.63861126", "0.6097543", "0.5980263", "0.5896563", "0.58617914", "0.5758389", "0.5668003", "0.56671417", "0.56641835", "0.56045616", "0.55927634", "0.5586044", "0.5580712", "0.55744016", "0.55704856", "0.5568658", "0.5548335", "0.5539019", "0.55206454", "0.55206454", "0.55168146", "0.54976404", "0.549663", "0.5472371", "0.5472371", "0.5472371", "0.54659337", "0.5453233", "0.5428229", "0.5428229", "0.542664", "0.5387283", "0.5387283", "0.5387283", "0.5387283", "0.5387283", "0.5387283", "0.53850496", "0.5370874", "0.53572464", "0.5328996", "0.53187674", "0.53131115", "0.53131115", "0.53131115", "0.53131115", "0.53131115", "0.53131115", "0.53131115", "0.53131115", "0.53131115", "0.53131115", "0.53131115", "0.53131115", "0.53131115" ]
0.66600436
26
Due to the fact that we still support jurassic IE versions, some compatibility wrappers are needed.
function e_preventDefault(e) { if (e.preventDefault) { e.preventDefault(); } else { e.returnValue = false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compIE(){\r\n\tvar agent = navigator.userAgent;\r\n\tif(agent.indexOf(\"MSIE 7.0\") > -1 || agent.indexOf(\"MSIE 8.0\") > - 1 || agent.indexOf(\"Trident 4.0\") > -1 || document.documentMode && document.documentMode <= 5)\r\n\t\treturn true;\r\n\treturn false;\r\n}", "function IEcompatibility() {\n\t// Only do anything if this is IE\n\tif(Browser.ie){\n\t\tvar __fix = $$(\"#kbbcode-size-options\", \"#kbbcode-size-options span\", \n\t\t\t\t\t\t\"#kbbcode-colortable\", \"#kbbcode-colortable td\");\n\t\tif (__fix) {\n\t\t\t__fix.setProperty('unselectable', 'on');\n\t\t}\n\t}\n}", "function mg_is_old_IE() {\r\n\t\tif( navigator.appVersion.indexOf(\"MSIE 8.\") != -1 ) {return true;}\r\n\t\telse {return false;}\r\n\t}", "function podPress_is_modern_ie() {\r\n\t\tif ( -1 != navigator.userAgent.search(/Trident\\/([0-9]+\\.[0-9]+)/gi) && true == podPress_is_v1_gtoreq_v2(RegExp.$1, '5') && -1 != navigator.userAgent.search(/MSIE\\s([0-9]+\\.[0-9]+)/gi) && true == podPress_is_v1_gtoreq_v2(RegExp.$1, '9') ) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "function seven_isIE () {\n\t\t\tvar myNav = navigator.userAgent.toLowerCase();\n\t\t\treturn (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false;\n\t\t}", "function less_IE8() {\n if (/msie [1-8]{1}[^0-9]/.test(navigator.userAgent.toLowerCase())) {\n return true;\n }\n}", "function supportOldIE() {\n var oldIeVersion = document && (function() {\n var version = 3,\n div = document.createElement('div'),\n iElems = div.getElementsByTagName('i');\n\n // Keep constructing conditional HTML blocks until we hit one that resolves to an empty fragment\n while (\n div.innerHTML = '<!--[if gt IE ' + (++version) + ']><i></i><![endif]-->',\n iElems[0]\n ) {}\n return version > 4 ? version : undefined;\n }());\n\n if (oldIeVersion < 9) {\n // Support old IE by patching ko.components.register to ensure that we have called\n // document.createElement(componentName) at least once before trying to parse any\n // markup that might use a custom element with that name\n var allCustomComponentNames = [];\n ko.components.register = (function(underlyingRegisterFunc) {\n return function(componentName) {\n allCustomComponentNames.push(componentName);\n underlyingRegisterFunc.apply(this, arguments);\n document.createElement(componentName);\n };\n })(ko.components.register);\n\n // Also to enable custom elements on old IE, we have to call document.createElement(name)\n // on every document fragment that ever gets created. This is especially important\n // if you're also using jQuery, because its parseHTML code works by setting .innerHTML\n // on some element inside a temporary document fragment.\n // It would be nicer if jQuery exposed some API for registering custom element names,\n // but it doesn't.\n document.createDocumentFragment = (function(originalDocumentCreateDocumentFragment) {\n return function() {\n // Note that you *can't* do originalDocumentCreateDocumentFragment.apply(this, arguments)\n // because IE6/7 complain \"object doesn't support this method\". Fortunately the function\n // doesn't take any parameters, and doesn't need a \"this\" value.\n var docFrag = originalDocumentCreateDocumentFragment();\n ko.utils.arrayForEach(allCustomComponentNames, docFrag.createElement.bind(docFrag));\n return docFrag;\n };\n })(document.createDocumentFragment);\n }\n }", "function isLowIE9() {\r\n var e = window.navigator.userAgent.toString().toUpperCase();\r\n var flag = false;\r\n if (e.indexOf(\"MSIE\") >= 0) {\r\n\r\n if (e.indexOf(\"MSIE 6.0\") > 0) flag = true;\r\n if (e.indexOf(\"MSIE 7.0\") > 0) flag = true;\r\n if (e.indexOf(\"MSIE 8.0\") > 0) flag = true;\r\n\r\n }\r\n\r\n\r\n return flag;\r\n\r\n }", "function detectIE() {\n\tvar isie = false;\n\tvar ua = window.navigator.userAgent;\n\tvar msie = ua.indexOf('MSIE ');\n\tvar trident = ua.indexOf('Trident/');\n\tvar edge = ua.indexOf('Edge/');\n\tif (msie > 0) {\n\t\t// IE 10 or older\n\t\tisie = true;\n\t\tvar ieVer = parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n\t} else if (trident > 0) {\n\t\t// IE 11\n\t\tisie = true;\n\t\tvar rv = ua.indexOf('rv:');\n\t\tvar ieVer = parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n\t} else if (edge > 0) {\n\t\t// Edge (IE 12+)\n\t\tisie = true;\n\t\tvar ieVer = parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n\t}\n\tif (isie == true) {\n\t\t$('html').addClass('ie');\n\t\tif (ieVer == 11) $('html').addClass('ie11');\n\t}\n}", "function msieversion() {\n var ua = window.navigator.userAgent;\n var msie = ua.indexOf(\"MSIE \");\n if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\\:11\\./)) { \n var ieVersion = parseInt(ua.substring(msie + 5, ua.indexOf(\".\", msie)));\n if (ieVersion === 9) {$('body').addClass('no-js ie' + ieVersion);}\n return ieVersion;\n }\n else { return false; }\n }", "function msieversion() {\n var ua = window.navigator.userAgent;\n var msie = ua.indexOf(\"MSIE \");\n if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\\:11\\./)) { \n var ieVersion = parseInt(ua.substring(msie + 5, ua.indexOf(\".\", msie)));\n if (ieVersion === 9) {$('body').addClass('no-js ie' + ieVersion);}\n return ieVersion;\n }\n else { return false; }\n }", "function isIE() {\n return navigator.userAgent.toLowerCase().indexOf(\"trident\") > 0;\n }", "function isIE() {\n return navigator.userAgent.toLowerCase().indexOf(\"trident\") > 0;\n }", "function msieversion() {\r\n var ua = window.navigator.userAgent;\r\n var msie = ua.indexOf(\"MSIE \");\r\n if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\\:11\\./)) {\r\n var ieVersion = parseInt(ua.substring(msie + 5, ua.indexOf(\".\", msie)));\r\n if (ieVersion === 9) {\r\n $('body').addClass('no-js ie' + ieVersion);\r\n }\r\n return ieVersion;\r\n } else {\r\n return false;\r\n }\r\n }", "function ie() {\n var ua = window.navigator.userAgent;\n var msie = ua.indexOf(\"MSIE \");\n if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\\:11\\./))\n return true;\n else\n return false;\n}", "function detectIE() {\n if (navigator.userAgent.indexOf(\"MSIE\") >= 0) {\n window.location = \"/static/badbrowser.html\";\n }\n return false;\n}", "function checkIeVersion() {\n var ie = gees.tools.internetExplorerVersion();\n if (ie == 7 || ie == 8 || ie == 9) {\n gees.dom.get('name_field').value = 'name';\n gees.dom.get('text_field').value = 'description';\n }\n}", "function fixIE() {\n if (!Array.indexOf) {\n Array.prototype.indexOf = function(arg) {\n var index = -1;\n for (var i = 0; i < this.length; i++){\n var value = this[i];\n if (value == arg) {\n index = i;\n break;\n } \n }\n return index;\n };\n }\n\n if (!window.console) {\n window.console = {};\n window.console.log = window.console.debug = function(message) {\n return;\n var body = document.getElementsByTagName('body')[0];\n var messageDiv = document.createElement('div');\n messageDiv.innerHTML = message;\n body.insertBefore(messageDiv, body.lastChild);\n };\n } \n}", "function isIE() {\n\t\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t\t}", "function needsLayeringShim() {\n return isIE && (isWinXP || isWinVista || isWin7);\n}", "function fixIeFlexbox() {\r\n\t\t\t\t\tvar ua = window.navigator.userAgent,\r\n\t\t\t\t\tmsie = ua.indexOf(\"MSIE \");\r\n\t\t\t\t\t(msie > 0 || navigator.userAgent.match(/Trident.*rv\\:11\\./)) && $(\".vc_row-o-full-height\").each(function () {\r\n\t\t\t\t\t\t\"flex\" === $(this).find('> .span_12').css(\"display\") && $(this).wrap('<div class=\"vc_ie-flexbox-fixer\"></div>')\r\n\t\t\t\t\t})\r\n\t\t\t\t}", "function isIE() {\r\n return (navigator.userAgent.toLowerCase().indexOf('msie ') != -1) || (!!navigator.userAgent.match(/Trident.*rv[:]*11\\./));\r\n}", "function isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}", "function isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}", "function isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}", "function isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}", "function isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}", "function isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}", "function isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}", "function isIE() { //ie?\n if (!!window.ActiveXObject || \"ActiveXObject\" in window)\n return true;\n else\n return false;\n}", "function isCompatible()\n{\n\tvar ua = window.navigator.userAgent;\n\tvar msie = ua.indexOf(\"MSIE \");\n\tvar isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);\n\tvar isSafari = /Safari/.test(navigator.userAgent) && /Apple Computer/.test(navigator.vendor);\n\tvar isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;\n\tvar isMSIE = ((msie > 0) || (!!navigator.userAgent.match(/Trident.*rv\\:11\\./)));\n\t\n\tif(isChrome || isSafari)\n\t\treturn true;\n\telse\n\t\treturn false;\n}", "function lpPatch_IE8(){\n\tif (typeof Array.prototype.indexOf !== 'function') {\n\t\tArray.prototype.indexOf = function(obj, start) {\n\t\t for (var i = (start || 0), j = this.length; i < j; i++) {\n\t\t if (this[i] === obj) { return i; }\n\t\t }\n\t\t return -1;\n\t\t} \n\t}\n\t\n\tif(typeof String.prototype.trim !== 'function') {\n\t\tString.prototype.trim = function() {\n\t \treturn this.replace(/^\\s+|\\s+$/g, ''); \n\t\t}\n\t}\t\n}", "function isIE() {\n return (navigator.userAgent.toLowerCase().indexOf('msie ') != -1) || (!!navigator.userAgent.match(/Trident.*rv[:]*11\\./));\n}", "function fixIESelect() {\n return false;\n }", "function vpb_IE_detected()\n{\n var ua = window.navigator.userAgent;\n var old_ie = ua.indexOf('MSIE ');\n var new_ie = ua.indexOf('Trident/');\n\n if ((old_ie > -1) || (new_ie > -1)) \n\t{\n return true;\n } else {\n\t\treturn false;\n\t}\n}", "function detectIE() {\r\n var ua = window.navigator.userAgent;\r\n\r\n // Test values; Uncomment to check result …\r\n\r\n // IE 10\r\n // ua = 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)';\r\n\r\n // IE 11\r\n // ua = 'Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko';\r\n\r\n // Edge 12 (Spartan)\r\n // ua = 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0';\r\n\r\n // Edge 13\r\n // ua = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586';\r\n\r\n var msie = ua.indexOf('MSIE ');\r\n if (msie > 0) {\r\n // IE 10 or older => return version number\r\n return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\r\n }\r\n\r\n var trident = ua.indexOf('Trident/');\r\n if (trident > 0) {\r\n // IE 11 => return version number\r\n var rv = ua.indexOf('rv:');\r\n return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\r\n }\r\n\r\n var edge = ua.indexOf('Edge/');\r\n if (edge > 0) {\r\n // Edge (IE 12+) => return version number\r\n return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\r\n }\r\n\r\n // other browser\r\n return false;\r\n }", "function isIE() {\n return (navigator.appName == \"Microsoft Internet Explorer\");\n}", "function is_IE()\n{\n\tif (navigator.userAgent.indexOf(\"MSIE\")>-1) return true;\n\treturn false\n}", "function isMsieSevenOrNewer() {\n\t\tif (typeof window.XMLHttpRequest !== 'undefined') {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "isIE() {\n return Boolean(\n (Object.getOwnPropertyDescriptor && Object.getOwnPropertyDescriptor(window, 'ActiveXObject')) ||\n 'ActiveXObject' in window\n )\n }", "function is_IE() {\n return (window.navigator.userAgent.match(/MSIE|Trident/) !== null);\n}", "function isIE()\n{\n return document.all;\n}", "function msieversion() \n{\n\ttry{\n\t var ua = window.navigator.userAgent;\n\t var msie = ua.indexOf(\"MSIE \");\n\t\n\t if (msie > 0) // Check for Internet Explorer\n\t {\n\t \tvar version = parseInt(ua.substring(msie + 5, ua.indexOf(\".\", msie)));\n\t \tif (version < 9) {\n\t \t\treturn true;\n\t \t}\n\t }\n\t} catch (err) {\n\t\t//ignore any error\n\t}\n return false;\n}", "function isIe678 () {\n\t\tvar IE = eval('\"v\"==\"\\v\"');\n\t\treturn \tIE;\n\t}", "function checkBrowser(){\n\tif(document.getElementById && document.attachEvent){\t\n\t\t//modern IE\n\t\tbrowser = 'modIE';\n\t}\n\telse if(document.getElementById){\t\n\t\t//modern, non-IE\n\t\tbrowser = 'gecko';\n\t}\n\telse{\t\t\n\t\t//ask to download new browser\n\t\twindow.location = \"browser.html\";\n\t}\n}", "function isIE() {\n return Prototype.Browser.IE;\n}", "function detectIE() {\n var ua = window.navigator.userAgent;\n var msie = ua.indexOf('MSIE ');\n\n\n var msie11 = ua.indexOf('rv:11');\n if (msie11 > 0) {\n // IE 10 or older => return version number\n return parseInt(ua.substring(msie11 + 3, ua.indexOf('.', msie11) + 2), 10);\n }\n\n if (msie > 0) {\n // IE 10 or older => return version number\n return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n }\n\n var trident = ua.indexOf('Trident/');\n if (trident > 0) {// IE 11 => return version number\n var rv = ua.indexOf('rv:');\n return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n }\n\n var edge = ua.indexOf('Edge/');\n if (edge > 0) {// Edge (IE 12+) => return version number\n return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n }// other browser\n return false;\n }", "function autoComplete_func_isIE55() { // Private method\n return navigator.userAgent.indexOf(\"MSIE 5.5\") > -1;\n}", "function isIE() {\n return jQuery.browser.msie;\n }", "function isIE () {\n var ms_ie = false;\n var ua = window.navigator.userAgent;\n var old_ie = ua.indexOf('MSIE ');\n var new_ie = ua.indexOf('Trident/');\n\n if ((old_ie > -1) || (new_ie > -1)) {\n ms_ie = true;\n }\n\n return ms_ie ;\n}", "function __loadCompatLayer(w) {\n w.Debug = function() {\n };\n w.Debug._fail = function(message) {\n throw new Error(message);\n };\n w.Debug.writeln = function(text) {\n if (window.console) {\n if (window.console.debug) {\n window.console.debug(text);\n return;\n }\n else if (window.console.log) {\n window.console.log(text);\n return;\n }\n }\n else if (window.opera &&\n window.opera.postError) {\n window.opera.postError(text);\n return;\n }\n };\n\n w.__getNonTextNode = function(node) {\n try {\n while (node && (node.nodeType != 1)) {\n node = node.parentNode;\n }\n }\n catch (ex) {\n node = null;\n }\n return node;\n };\n \n w.__getLocation = function(e) {\n var loc = {x : 0, y : 0};\n while (e) {\n loc.x += e.offsetLeft;\n loc.y += e.offsetTop;\n e = e.offsetParent;\n }\n return loc;\n };\n\n // Allow caching regex objects for performance\n RegExp._cacheable = true;\n\n // Skip RegExp.test in String.quote to improve performance.\n String._quoteSkipTest = true;\n\n w.navigate = function(url) {\n window.setTimeout('window.location = \"' + url + '\";', 0);\n };\n\n var attachEventProxy = function(eventName, eventHandler) {\n eventHandler._mozillaEventHandler = function(e) {\n window.event = e;\n eventHandler();\n if (!e.avoidReturn) {\n return e.returnValue;\n }\n };\n this.addEventListener(eventName.slice(2), eventHandler._mozillaEventHandler, false);\n };\n\n var detachEventProxy = function (eventName, eventHandler) {\n if (eventHandler._mozillaEventHandler) {\n var mozillaEventHandler = eventHandler._mozillaEventHandler;\n delete eventHandler._mozillaEventHandler;\n \n this.removeEventListener(eventName.slice(2), mozillaEventHandler, false);\n }\n };\n\n w.attachEvent = attachEventProxy;\n w.detachEvent = detachEventProxy;\n w.HTMLDocument.prototype.attachEvent = attachEventProxy;\n w.HTMLDocument.prototype.detachEvent = detachEventProxy;\n w.HTMLElement.prototype.attachEvent = attachEventProxy;\n w.HTMLElement.prototype.detachEvent = detachEventProxy;\n\n w.Event.prototype.__defineGetter__('srcElement', function() {\n // __getNonTextNode(this.target) is the expected implementation.\n // However script.load has target set to the Document object... so we\n // need to throw in currentTarget as well.\n return __getNonTextNode(this.target) || this.currentTarget;\n });\n w.Event.prototype.__defineGetter__('cancelBubble', function() {\n return this._bubblingCanceled || false;\n });\n w.Event.prototype.__defineSetter__('cancelBubble', function(v) {\n if (v) {\n this._bubblingCanceled = true;\n this.stopPropagation();\n }\n });\n w.Event.prototype.__defineGetter__('returnValue', function() {\n return !this._cancelDefault;\n });\n w.Event.prototype.__defineSetter__('returnValue', function(v) {\n if (!v) {\n this._cancelDefault = true;\n this.preventDefault();\n }\n });\n w.Event.prototype.__defineGetter__('fromElement', function () {\n var n;\n if (this.type == 'mouseover') {\n n = this.relatedTarget;\n }\n else if (this.type == 'mouseout') {\n n = this.target;\n }\n return __getNonTextNode(n);\n });\n w.Event.prototype.__defineGetter__('toElement', function () {\n var n;\n if (this.type == 'mouseout') {\n n = this.relatedTarget;\n }\n else if (this.type == 'mouseover') {\n n = this.target;\n }\n return __getNonTextNode(n);\n });\n w.Event.prototype.__defineGetter__('button', function() {\n return (this.which == 1) ? 1 : (this.which == 3) ? 2 : 0\n });\n w.Event.prototype.__defineGetter__('offsetX', function() {\n return window.pageXOffset + this.clientX - __getLocation(this.srcElement).x;\n });\n w.Event.prototype.__defineGetter__('offsetY', function() {\n return window.pageYOffset + this.clientY - __getLocation(this.srcElement).y;\n });\n\n w.HTMLElement.prototype.__defineGetter__('parentElement', function() {\n return this.parentNode;\n });\n w.HTMLElement.prototype.__defineGetter__('children', function() {\n var children = [];\n var childCount = this.childNodes.length;\n for (var i = 0; i < childCount; i++) {\n var childNode = this.childNodes[i];\n if (childNode.nodeType == 1) {\n children.push(childNode);\n }\n }\n return children;\n });\n w.HTMLElement.prototype.__defineGetter__('innerText', function() { \n try {\n return this.textContent\n } \n catch (ex) {\n var text = '';\n for (var i=0; i < this.childNodes.length; i++) {\n if (this.childNodes[i].nodeType == 3) {\n text += this.childNodes[i].textContent;\n }\n }\n return str;\n }\n });\n w.HTMLElement.prototype.__defineSetter__('innerText', function(v) {\n var textNode = document.createTextNode(v);\n this.innerHTML = '';\n this.appendChild(textNode);\n });\n w.HTMLElement.prototype.__defineGetter__('currentStyle', function() {\n return window.getComputedStyle(this, null);\n });\n w.HTMLElement.prototype.__defineGetter__('runtimeStyle', function() {\n return window.getOverrideStyle(this, null);\n });\n w.HTMLElement.prototype.removeNode = function(b) {\n return this.parentNode.removeChild(this)\n };\n w.HTMLElement.prototype.contains = function(el) {\n while (el != null && el != this) {\n el = el.parentNode;\n }\n return (el!=null)\n };\n\n w.HTMLStyleElement.prototype.__defineGetter__('styleSheet', function() {\n return this.sheet;\n });\n w.CSSStyleSheet.prototype.__defineGetter__('rules', function() {\n return this.cssRules;\n });\n w.CSSStyleSheet.prototype.addRule = function(selector, style, index) {\n this.insertRule(selector + '{' + style + '}', index);\n };\n w.CSSStyleSheet.prototype.removeRule = function(index) {\n this.deleteRule(index);\n };\n w.CSSStyleDeclaration.prototype.__defineGetter__('styleFloat', function() {\n return this.cssFloat;\n });\n w.CSSStyleDeclaration.prototype.__defineSetter__('styleFloat', function(v) {\n this.cssFloat = v;\n });\n DocumentFragment.prototype.getElementById = function(id) {\n var nodeQueue = [];\n var childNodes = this.childNodes;\n var node;\n var c;\n \n for (c = 0; c < childNodes.length; c++) {\n node = childNodes[c];\n if (node.nodeType == 1) {\n nodeQueue.push(node);\n }\n }\n\n while (nodeQueue.length) {\n node = nodeQueue.dequeue();\n if (node.id == id) {\n return node;\n }\n childNodes = node.childNodes;\n if (childNodes.length != 0) {\n for (c = 0; c < childNodes.length; c++) {\n node = childNodes[c];\n if (node.nodeType == 1) {\n nodeQueue.push(node);\n }\n }\n }\n }\n\n return null;\n };\n\n DocumentFragment.prototype.getElementsByTagName = function(tagName) {\n var elements = [];\n var nodeQueue = [];\n var childNodes = this.childNodes;\n var node;\n var c;\n\n for (c = 0; c < childNodes.length; c++) {\n node = childNodes[c];\n if (node.nodeType == 1) {\n nodeQueue.push(node);\n }\n }\n\n while (nodeQueue.length) {\n node = nodeQueue.dequeue();\n if (node.tagName == tagName) {\n elements.add(node);\n }\n childNodes = node.childNodes;\n if (childNodes.length != 0) {\n for (c = 0; c < childNodes.length; c++) {\n node = childNodes[c];\n if (node.nodeType == 1) {\n nodeQueue.push(node);\n }\n }\n }\n }\n\n return elements;\n };\n\n DocumentFragment.prototype.createElement = function(tagName) {\n return document.createElement(tagName);\n };\n\n var selectNodes = function(doc, path, contextNode) {\n contextNode = contextNode ? contextNode : doc;\n var xpath = new XPathEvaluator();\n var result = xpath.evaluate(path, contextNode,\n doc.createNSResolver(doc.documentElement),\n XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);\n\n var nodeList = new Array(result.snapshotLength);\n for(var i = 0; i < result.snapshotLength; i++) {\n nodeList[i] = result.snapshotItem(i);\n }\n\n return nodeList;\n };\n\n var selectSingleNode = function(doc, path, contextNode) {\n path += '[1]';\n var nodes = selectNodes(doc, path, contextNode);\n if (nodes.length != 0) {\n for (var i = 0; i < nodes.length; i++) {\n if (nodes[i]) {\n return nodes[i];\n }\n }\n }\n return null;\n };\n\n w.XMLDocument.prototype.selectNodes = function(path, contextNode) {\n return selectNodes(this, path, contextNode);\n };\n\n w.XMLDocument.prototype.selectSingleNode = function(path, contextNode) {\n return selectSingleNode(this, path, contextNode);\n };\n\n w.XMLDocument.prototype.transformNode = function(xsl) {\n var xslProcessor = new XSLTProcessor();\n xslProcessor.importStylesheet(xsl);\n\n var ownerDocument = document.implementation.createDocument(\"\", \"\", null);\n var transformedDoc = xslProcessor.transformToDocument(this);\n \n return transformedDoc.xml;\n };\n\n Node.prototype.selectNodes = function(path) {\n var doc = this.ownerDocument;\n return doc.selectNodes(path, this);\n };\n\n Node.prototype.selectSingleNode = function(path) {\n var doc = this.ownerDocument;\n return doc.selectSingleNode(path, this);\n };\n\n Node.prototype.__defineGetter__('baseName', function() {\n return this.localName;\n });\n\n Node.prototype.__defineGetter__('text', function() {\n return this.textContent;\n });\n Node.prototype.__defineSetter__('text', function(value) {\n this.textContent = value;\n });\n\n Node.prototype.__defineGetter__('xml', function() {\n return (new XMLSerializer()).serializeToString(this);\n });\n}", "function isIE () {\n var myNav = navigator.userAgent.toLowerCase();\n return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false;\n}", "function detectIE() {\r\n\tvar ua = window.navigator.userAgent;\r\n\tvar msie = ua.indexOf('MSIE ');\r\n\tif (msie > 0) {\r\n\t\treturn parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\r\n\t}\r\n\tvar trident = ua.indexOf('Trident/');\r\n\tif (trident > 0) {\r\n\t\tvar rv = ua.indexOf('rv:');\r\n\t\treturn parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\r\n\t}\r\n\tvar edge = ua.indexOf('Edge/');\r\n\tif (edge > 0) {\r\n\t\treturn parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\r\n\t}\r\n\treturn false;\r\n}", "function preIE10Check() {\n if (window.attachEvent && !window.navigator.msPointerEnabled) {\n return true;\n } else {\n return false;\n }\n }", "function nofx_goodBrowser() {\n //IE6 is the bad browser. IE7 is 'mostly' ok.\n //IE8 FF Chrome Safari are good.\n if (BrowserDetect.browser == 'Explorer' && BrowserDetect.version < 7)\n return false;\n else\n return true;\n}", "function isIE(e,i){var t,n=\"IE\",m=document.createElement(\"B\"),o=document.documentElement;return e&&(n+=\" \"+e,i&&(n=i+\" \"+n)),m.innerHTML=\"<!--[if \"+n+']><b id=\"iecctest\"></b><![endif]-->',o.appendChild(m),t=!!document.getElementById(\"iecctest\"),o.removeChild(m),t}", "function iedetect(v) {\n\n\t var r = RegExp('msie' + (!isNaN(v) ? ('\\\\s' + v) : ''), 'i');\n\t\treturn r.test(navigator.userAgent);\n\t\t\t\n\t}", "function checkVersion() {\n\t\tvar msg = \"You're not using Internet Explorer.\";\n\t\tvar ver = getInternetExplorerVersion();\n\t\tif ( ver > -1 ) {\n\t\t\tif ( ver >= 8.0 ) {\n\t\t\t\tmsg = \"You're using a recent copy of Internet Explorer.\"\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmsg = \"You should upgrade your copy of Internet Explorer.\";\n\t\t\t}\n\t\t}\n\t\tconsole.log( msg );\n\t}", "function uTestBrowserIE()\n{\n return (uBrowserID == uIE);\n}", "screwIE () {\n let browser = new Browser();\n if (browser.screwIE === true) {\n this.$toast({\n type: 'warning',\n content: `\n <h4>Unsupported Browser</h4>\n <span>This app may not function properly in Internet Explorer! Please use another browser such as Chrome, Edge, or Firefox.</span>`\n });\n }\n }", "function autoComplete_func_isIE() { // Private method\n return autoComplete_func_isIE5() || autoComplete_func_isIE6() || autoComplete_func_isIE7() ;\n}", "function isIE () {\n\tvar myNav = navigator.userAgent.toLowerCase();\n\treturn (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false;\n}", "function detectIE() {\n\t\t\t\t var ua = window.navigator.userAgent;\n\n\t\t\t\t var msie = ua.indexOf('MSIE ');\n\t\t\t\t if (msie > 0) {\n\t\t\t\t\t// IE 10 or older => return version number\n\t\t\t\t\treturn parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n\t\t\t\t }\n\n\t\t\t\t var trident = ua.indexOf('Trident/');\n\t\t\t\t if (trident > 0) {\n\t\t\t\t\t// IE 11 => return version number\n\t\t\t\t\tvar rv = ua.indexOf('rv:');\n\t\t\t\t\treturn parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n\t\t\t\t }\n\n\t\t\t\t var edge = ua.indexOf('Edge/');\n\t\t\t\t if (edge > 0) {\n\t\t\t\t\t// Edge (IE 12+) => return version number\n\t\t\t\t\treturn parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n\t\t\t\t }\n\n\t\t\t\t // other browser\n\t\t\t\t return false;\n\t\t\t}", "function Re(e){return!0===Ie(e)&&\"[object Object]\"===Object.prototype.toString.call(e)}", "function isIE() {\n var myNav = navigator.userAgent.toLowerCase();\n return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false;\n }", "function isIE () {\n var myNav = navigator.userAgent.toLowerCase();\n return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1], 10) : false;\n }", "function detectIE() {\n var ua = window.navigator.userAgent;\n\n var msie = ua.indexOf('MSIE ');\n if (msie > 0) {\n // IE 10 or older => return version number\n return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n }\n\n var trident = ua.indexOf('Trident/');\n if (trident > 0) {\n // IE 11 => return version number\n var rv = ua.indexOf('rv:');\n return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n }\n\n var edge = ua.indexOf('Edge/');\n if (edge > 0) {\n // IE 12 (aka Edge) => return version number\n return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n }\n\n // other browser\n return false;\n }", "function ie(e,r){var n=o(e),a=void 0===w[0]\nr=void 0===r||!!r,t.animate&&!a&&i(_,t.cssClasses.tap,t.animationDuration),E.forEach((function(e){re(e,function(e,r){return null===e||!1===e||void 0===e?w[r]:(\"number\"==typeof e&&(e=String(e)),e=t.format.from(e),!1===(e=D.toStepping(e))||isNaN(e)?w[r]:e)}(n[e],e),!0,!1)})),E.forEach((function(e){re(e,w[e],!0,!0)})),te(),E.forEach((function(e){$(\"update\",e),null!==n[e]&&r&&$(\"set\",e)}))}", "function detectIE() {\r\n var ua = window.navigator.userAgent;\r\n\r\n // Test values; Uncomment to check result …\r\n\r\n // IE 10\r\n // ua = 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)';\r\n\r\n // IE 11\r\n // ua = 'Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko';\r\n\r\n // IE 12 / Spartan\r\n // ua = 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0';\r\n\r\n // Edge (IE 12+)\r\n // ua = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586';\r\n\r\n var msie = ua.indexOf('MSIE ');\r\n if (msie > 0) {\r\n // IE 10 or older => return version number\r\n return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\r\n }\r\n\r\n var trident = ua.indexOf('Trident/');\r\n if (trident > 0) {\r\n // IE 11 => return version number\r\n var rv = ua.indexOf('rv:');\r\n return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\r\n }\r\n\r\n var edge = ua.indexOf('Edge/');\r\n if (edge > 0) {\r\n // Edge (IE 12+) => return version number\r\n return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\r\n }\r\n\r\n // other browser\r\n return false;\r\n}", "function isBrowserIE () {\n var ua = window.navigator.userAgent\n var msie = ua.indexOf('MSIE ')\n var trident = ua.indexOf('Trident/')\n var edge = ua.indexOf('Edge/')\n if (msie > 0 || trident > 0 || edge > 0) {\n return true\n }\n }", "function isInternetExplorerBefore(version) {\n var iematch = /MSIE ([0-9]+)/g.exec(window.navigator.userAgent);\n\n return iematch ? +iematch[1] < version : false;\n}", "function e(a){var q=(a||u).toLowerCase();var B1=/(webkit)[ \\/]([\\w.]+)/;var C1=/(opera)(?:.*version)?[ \\/]([\\w.]+)/;var D1=/(msie) ([\\w.]+)/;var E1=/(trident)\\/[\\w.]+;.*rv:([\\w.]+)/;var F1=/(edge)[ \\/]([\\w.]+)/;var G1=/(mozilla)(?:.*? rv:([\\w.]+))?/;var H1=F1.exec(q)||E1.exec(q)||B1.exec(q)||C1.exec(q)||D1.exec(q)||q.indexOf(\"compatible\")<0&&G1.exec(q)||[];var I1={browser:H1[1]||\"\",version:H1[2]||\"0\"};I1[I1.browser]=true;return I1;}", "function autoComplete_func_isIE7() { // Private method\n return navigator.userAgent.indexOf(\"MSIE 7\") > -1 && navigator.userAgent.indexOf(\"Opera\") == -1;\n}", "function Browser_DetermineBrowser()\n{\n\t//get user agent\n\tvar userAgent = navigator.userAgent;\n\t//scan for broser\n\tif (userAgent.indexOf(\"MSIE\") != -1)\n\t{\n\t\t//IE!\n\t\twindow.__BROWSER_TYPE = __BROWSER_IE;\n\t\t//get browser version\n\t\tvar version = parseFloat(userAgent.substring(userAgent.indexOf(\"MSIE\") + 5));\n\t\t//ie or better?\n\t\twindow.__BROWSER_IE10_OR_LESS = version < 11;\n\t\twindow.__BROWSER_IE9_OR_LESS = version < 10;\n\t\twindow.__BROWSER_IE8_OR_LESS = version < 9;\n\t\twindow.__BROWSER_IE11_OR_LESS = !(window.__BROWSER_IE10_OR_LESS || window.__BROWSER_IE9_OR_LESS || window.__BROWSER_IE8_OR_LESS);\n\t\tif (window.__BROWSER_IE8_OR_LESS)\n\t\t{\n\t\t\t//add special tags to render inline blocks correctly\n\t\t\twindow.__BROWSER_INLINE_BLOCK_CSS += \"zoom:1; *display: inline;\";\n\t\t\t//adjust get client bounds\n\t\t\twindow.__BROWSER_CLIENTRECT_MOD = version < 8 ? -2 : 0;\n\t\t}\n\t\t//correct the menu highlight\n\t\twindow.__MENU_BORDER_MENUBAR_HTML_HIGHLIGHT = __MENU_BORDER_MENUBAR_HTML_HIGHLIGHT_IE;\n\t\t//are we in screenshot mode\n\t\tif (__SCREENSHOTS_ON)\n\t\t{\n\t\t\t//add modifier to client rect\n\t\t\twindow.__BROWSER_CLIENTRECT_MOD += 2;\n\t\t}\n\t\t//mark specific bad resources for IE\n\t\twindow.__CACHE_REGEX_BAD_RESOURCES = __CACHE_REGEX_BAD_RESOURCES_IE11;\n\t\t//modify the scrollbar size\n\t\twindow.__CAMERA_CMD_SCROLL_BARSIZE = 17;\n\t}\n\telse if (userAgent.indexOf(\"Edge\") != -1)\n\t{\n\t\t//Edge!\n\t\twindow.__BROWSER_TYPE = __BROWSER_IE;\n\t\twindow.__BROWSER_EDGE = true;\n\t\t//modify the scrollbar size\n\t\twindow.__CAMERA_CMD_SCROLL_BARSIZE = 16;\n\t}\n\telse if (userAgent.indexOf(\"Firefox\") != -1)\n\t{\n\t\t//FireFox!\n\t\twindow.__BROWSER_TYPE = __BROWSER_FF;\n\t\t//rename mouse wheel event\n\t\twindow.__BROWSER_EVENT_MOUSEWHEEL = \"DOMMouseScroll\";\n\t\t//its a chromium\n\t\twindow.__BROWSER_CHROMIUM = true;\n\t\t//change the zoom functions\n\t\twindow.Zoom_Register = Zoom_Register_FireFox;\n\t\twindow.Get_ZoomedScale = Get_InterpreterDisplayScaleOnly;\n\t}\n\telse if (userAgent.indexOf(\"Chrome\") != -1)\n\t{\n\t\t//Chrome!\n\t\twindow.__BROWSER_TYPE = __BROWSER_CHROME;\n\t\t//its a chromium\n\t\twindow.__BROWSER_CHROMIUM = true;\n\t\t//change the zoom functions but only for retrieving zoomed scale\n\t\twindow.Get_ZoomedScale = Get_InterpreterDisplayScaleOnly;\n\t}\n\telse if (userAgent.indexOf(\"Opera\") != -1)\n\t{\n\t\t//Opera!\n\t\twindow.__BROWSER_TYPE = __BROWSER_OPERA;\n\t}\n\telse if (userAgent.indexOf(\"iPad\") != -1 || userAgent.indexOf(\"iPhone\") != -1)\n\t{\n\t\t//ipad? use safari for now\n\t\twindow.__BROWSER_TYPE = __BROWSER_SAFARI;\n\t\t//its a chromium\n\t\twindow.__BROWSER_CHROMIUM = true;\n\t\t//change the zoom functions but only for retrieving zoomed scale\n\t\twindow.Get_ZoomedScale = Get_InterpreterDisplayScaleOnly;\n\t\t//force a transformation for the body\n\t\twindow.document.body.style.transform = \"translate3d(0,0,0)\";\n\t}\n\telse if (userAgent.indexOf(\"Safari\") != -1)\n\t{\n\t\t//Safari!\n\t\twindow.__BROWSER_TYPE = __BROWSER_SAFARI;\n\t\t//its a chromium\n\t\twindow.__BROWSER_CHROMIUM = true;\n\t}\n\telse if (userAgent.indexOf(\"Trident/7.0\") != -1)\n\t{\n\t\t//IE!\n\t\twindow.__BROWSER_TYPE = __BROWSER_IE;\n\t\twindow.__BROWSER_IE11_OR_LESS = true;\n\t\t//mark specific bad resources for IE\n\t\twindow.__CACHE_REGEX_BAD_RESOURCES = __CACHE_REGEX_BAD_RESOURCES_IE11;\n\t\t//modify the scrollbar size\n\t\twindow.__CAMERA_CMD_SCROLL_BARSIZE = 17;\n\t}\n\telse\n\t{\n\t\t//in trouble!\n\t\tCommon_Error(\"Unable to determine browser\");\n\t\t//use ie\n\t\twindow.__BROWSER_TYPE = __BROWSER_IE;\n\t}\n\t//we have html5?\n\tif (!window.__BROWSER_IE8_OR_LESS)\n\t{\n\t\t//add css variables to the colors map\n\t\t__NEMESIS_COLORS_NAME_MAP[\"currentcolor\"] = \"CurrentColor\";\n\t}\n\t//update ligatures for css\n\tBrowser_SetupLigatures();\n\t//setup on touch\n\tBrowser_SetupOnTouch();\n}", "function detectIE() {\n\tvar ua = navigator.userAgent;\n\tvar msie = ua.indexOf('MSIE ');\n\tif (msie > 0) {\n\t\t// IE 10 or older => return version number\n\t\treturn parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n\t}\n\n\tvar trident = ua.indexOf('Trident/');\n\tif (trident > 0) {// IE 11 => return version number\n\t\tvar rv = ua.lastIndexOf('rv:');\n\t\treturn parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n\t}\n\n\tvar edge = ua.indexOf('Edge/');\n\tif (edge > 0) {// Edge (IE 12+) => return version number\n\t\treturn parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n\t}// other browser\n\treturn false;\n}", "function getElementClass(){if(typeof HTMLElement!=='function'){// case of Safari\nvar _BaseElement=function _BaseElement(){};_BaseElement.prototype=document.createElement('div');return _BaseElement;}else{return HTMLElement;}}", "function isMsieSevenOrNewer() {\n if (wind.XMLHttpRequest !== undefined) {\n return true;\n }\n\n return false;\n }", "function detectIE() {\n\tvar ua = window.navigator.userAgent;\n\n\tvar msie = ua.indexOf('MSIE ');\n\tif (msie > 0) {\n\t\t// IE 10 or older => return version number\n\t\treturn parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n\t}\n\n\tvar trident = ua.indexOf('Trident/');\n\tif (trident > 0) {\n\t\t// IE 11 => return version number\n\t\tvar rv = ua.indexOf('rv:');\n\t\treturn parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n\t}\n\n\tvar edge = ua.indexOf('Edge/');\n\tif (edge > 0) {\n\t // IE 12 => return version number\n\t return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n\t}\n\n\t// other browser\n\treturn false;\n}", "function autoComplete_func_isIE6() { // Private method\n return navigator.userAgent.indexOf(\"MSIE 6\") > -1 && navigator.userAgent.indexOf(\"Opera\") == -1;\n}", "function DetectBrowser()\n{\n var browserID = navigator.userAgent.toLowerCase(); \n \n if(browserID.indexOf('msie') != -1)\n {\n IE = true;\n FireFox = false;\n IE7 = false;\n }\n \n if(browserID.indexOf('msie 7.0') != -1)\n { \n IE7 = true;\n }\n \n if(browserID.indexOf('firefox') != -1)\n {\n IE = false;\n FireFox = true; \n IE7 = false;\n } \n \n}", "function isIE() {\n let ua = navigator.userAgent;\n /* MSIE used to detect old browsers and Trident used to newer ones*/\n return ua.indexOf(\"MSIE \") > -1 || ua.indexOf(\"Trident/\") > -1;\n}", "IE ():boolean {\n\n\t\treturn this.agent.match(/Trident/i) ? true : false;\n\t}", "function hasSupport() {\r\n\r\n if (typeof hasSupport.support != \"undefined\")\r\n return hasSupport.support;\r\n \r\n var ie55 = /msie 5\\.[56789]/i.test( navigator.userAgent );\r\n \r\n hasSupport.support = ( typeof document.implementation != \"undefined\" &&\r\n document.implementation.hasFeature( \"html\", \"1.0\" ) || ie55 )\r\n \r\n // IE55 has a serious DOM1 bug... Patch it!\r\n if ( ie55 ) {\r\n document._getElementsByTagName = document.getElementsByTagName;\r\n document.getElementsByTagName = function ( sTagName ) {\r\n if ( sTagName == \"*\" )\r\n return document.all;\r\n else\r\n return document._getElementsByTagName( sTagName );\r\n };\r\n }\r\n\r\n return hasSupport.support;\r\n}", "function classForMacAndIE() {\n \n var ua = window.navigator.userAgent;\n var msie = ua.indexOf('MSIE ');\n\n if (msie > 0) {\n $('body').addClass('only-ie');\n\n // IE 10 or older => return version number\n return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n\n }\n\n var trident = ua.indexOf('Trident/');\n\n if (trident > 0) {\n $('body').addClass('only-ie');\n\n // IE 11 => return version number\n var rv = ua.indexOf('rv:');\n return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n }\n\n var edge = ua.indexOf('Edge/');\n\n if (edge > 0) {\n\n $('body').addClass('only-ie');\n // Edge (IE 12+) => return version number\n return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n\n }\n\n\n if (navigator.userAgent.indexOf('Mac') > 0) {\n $('body').addClass('only-mac');\n }\n\n // other browser\n return false;\n\n}", "function detectIE() {\n var ua = window.navigator.userAgent;\n\n var msie = ua.indexOf('MSIE ');\n if (msie > 0) {\n // IE 10 or older => return version number\n return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n }\n\n var trident = ua.indexOf('Trident/');\n if (trident > 0) {\n // IE 11 => return version number\n var rv = ua.indexOf('rv:');\n return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n }\n\n // var edge = ua.indexOf('Edge/');\n // if (edge > 0) {\n // // Edge (IE 12+) => return version number\n // return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n // }\n\n // other browser\n return false;\n}", "function detectIE() {\n var ua = window.navigator.userAgent;\n\n // Test values; Uncomment to check result …\n\n // IE 10\n // ua = 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)';\n\n // IE 11\n // ua = 'Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko';\n\n // Edge 12 (Spartan)\n // ua = 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0';\n\n // Edge 13\n // ua = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586';\n\n var msie = ua.indexOf('MSIE ');\n if (msie > 0) {\n // IE 10 or older => return version number\n return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n }\n\n var trident = ua.indexOf('Trident/');\n\n if (trident > 0) {\n // IE 11 => return version number\n var rv = ua.indexOf('rv:');\n return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n\n }\n var gecko = ua.indexOf('Gecko/');\n\n if (gecko > 0) {\n // IE 11 => return version number\n var rv = ua.indexOf('rv:');\n return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n }\n\n var edge = ua.indexOf('Edge/');\n if (edge > 0) {\n // Edge (IE 12+) => return version number\n return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n }\n\n // other browser\n return false;\n}", "function detectIE() {\n var ua = window.navigator.userAgent;\n\n var msie = ua.indexOf(\"MSIE \");\n if (msie > 0) {\n // IE 10 or older => return version number\n return parseInt(ua.substring(msie + 5, ua.indexOf(\".\", msie)), 10);\n }\n\n var trident = ua.indexOf(\"Trident/\");\n if (trident > 0) {\n // IE 11 => return version number\n var rv = ua.indexOf(\"rv:\");\n return parseInt(ua.substring(rv + 3, ua.indexOf(\".\", rv)), 10);\n }\n\n var edge = ua.indexOf(\"Edge/\");\n if (edge > 0) {\n // Edge (IE 12+) => return version number\n return parseInt(ua.substring(edge + 5, ua.indexOf(\".\", edge)), 10);\n }\n\n // other browser\n return false;\n}", "function isIE() {\n\tif (navigator.appName.indexOf(\"Explorer\")>0)\n\t\treturn true;\n\telse\n\t\treturn false;\n}", "function detectIE() {\n var ua = window.navigator.userAgent;\n\n var msie = ua.indexOf('MSIE ');\n if (msie > 0) {\n // IE 10 or older => return version number\n return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n }\n\n var trident = ua.indexOf('Trident/');\n if (trident > 0) {\n // IE 11 => return version number\n var rv = ua.indexOf('rv:');\n return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n }\n\n var edge = ua.indexOf('Edge/');\n if (edge > 0) {\n // IE 12 => return version number\n return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n }\n\n // other browser\n return false;\n}", "_detectBrowserSupport () {\n\t\t\n\t\tvar check = true;\n\n\t\t// nothing below IE9\n\t\tif (!document.addEventListener) check = false;\n\n\t\t// nothing below IE10\n\t\t// if (!window.onpopstate) check = false;\n\n\t\treturn check;\n\t}", "function autoComplete_func_isIE5() { // Private method\n return navigator.userAgent.indexOf(\"MSIE 5\") > -1;\n}", "function isIE8() {\n if (window.attachEvent && !window.addEventListener) {\n return true;\n } else {\n return false;\n }\n }", "function detectIE() {\n var ua = window.navigator.userAgent;\n\n var msie = ua.indexOf('MSIE ');\n if (msie > 0) {\n // IE 10 or older => return version number\n return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n }\n\n var trident = ua.indexOf('Trident/');\n if (trident > 0) {\n // IE 11 => return version number\n var rv = ua.indexOf('rv:');\n return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n }\n\n var edge = ua.indexOf('Edge/');\n if (edge > 0) {\n // Edge (IE 12+) => return version number\n return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n }\n\n // other browser\n return false;\n}", "function ie(e,n){var r=a(e),o=void 0===x[0];n=void 0===n||!!n,t.animate&&!o&&i(w,t.cssClasses.tap,t.animationDuration),S.forEach((function(e){ne(e,function(e,n){return null===e||!1===e||void 0===e?x[n]:(\"number\"==typeof e&&(e=String(e)),e=t.format.from(e),!1===(e=k.toStepping(e))||isNaN(e)?x[n]:e)}(r[e],e),!0,!1)})),S.forEach((function(e){ne(e,x[e],!0,!0)})),te(),S.forEach((function(e){$(\"update\",e),null!==r[e]&&n&&$(\"set\",e)}))}", "function detectIE() {\n var ua = window.navigator.userAgent;\n\n var msie = ua.indexOf('MSIE ');\n if (msie > 0) {\n // IE 10 or older => return version number\n return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n }\n\n var trident = ua.indexOf('Trident/');\n if (trident > 0) {\n // IE 11 => return version number\n var rv = ua.indexOf('rv:');\n return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n }\n\n var edge = ua.indexOf('Edge/');\n if (edge > 0) {\n // IE 12 (aka Edge) => return version number\n return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n }\n\n // other browser\n return false;\n}", "function detectIE() {\n var ua = window.navigator.userAgent;\n\n // Test values; Uncomment to check result …\n\n // IE 10\n // ua = 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)';\n\n // IE 11\n // ua = 'Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko';\n\n // Edge 12 (Spartan)\n // ua = 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0';\n\n // Edge 13\n // ua = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586';\n\n var msie = ua.indexOf('MSIE ');\n if (msie > 0) {\n // IE 10 or older => return version number\n return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n }\n\n var trident = ua.indexOf('Trident/');\n if (trident > 0) {\n // IE 11 => return version number\n var rv = ua.indexOf('rv:');\n return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n }\n\n var edge = ua.indexOf('Edge/');\n if (edge > 0) {\n // Edge (IE 12+) => return version number\n return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n }\n\n // other browser\n return false;\n}", "function ie(a,b,c){this.$=a;this.M=[];this.ga=n;this.Fd=b;this.Jb=c}", "function isEnhancedBrowser() {\n var script = document.createElement('script')\n var input = document.createElement('input')\n\n return (\n 'visibilityState' in document && // not supported by old Android (4.0-4.4) without a prefix\n 'indeterminate' in input && // not supported by BB 10\n 'flex' in doc.style && // not supported by old Safari (< 9) or IE 6-10\n 'async' in script // not supported by old Opera (Presto engine < 15)\n )\n }", "function detectIE() {\n var ua = window.navigator.userAgent;\n\n var msie = ua.indexOf('MSIE ');\n if (msie > 0) {\n // IE 10 or older => return version number\n return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n }\n\n var trident = ua.indexOf('Trident/');\n if (trident > 0) {\n // IE 11 => return version number\n var rv = ua.indexOf('rv:');\n return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n }\n\n var edge = ua.indexOf('Edge/');\n if (edge > 0) {\n // Edge (IE 12+) => return version number\n return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n }\n\n // other browser\n return false;\n}", "function detectIE() {\n var ua = window.navigator.userAgent;\n\n var msie = ua.indexOf('MSIE ');\n if (msie > 0) {\n // IE 10 or older => return version number\n return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n }\n\n var trident = ua.indexOf('Trident/');\n if (trident > 0) {\n // IE 11 => return version number\n var rv = ua.indexOf('rv:');\n return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n }\n\n var edge = ua.indexOf('Edge/');\n if (edge > 0) {\n // Edge (IE 12+) => return version number\n return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n }\n\n // other browser\n return false;\n}", "function detectIE() {\n var ua = window.navigator.userAgent;\n\n var msie = ua.indexOf('MSIE ');\n if (msie > 0) {\n // IE 10 or older => return version number\n return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n }\n\n var trident = ua.indexOf('Trident/');\n if (trident > 0) {\n // IE 11 => return version number\n var rv = ua.indexOf('rv:');\n return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n }\n\n var edge = ua.indexOf('Edge/');\n if (edge > 0) {\n // Edge (IE 12+) => return version number\n return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n }\n\n // other browser\n return false;\n}" ]
[ "0.71469176", "0.69299966", "0.6810428", "0.67629546", "0.67008024", "0.66899574", "0.6618859", "0.6581652", "0.65160435", "0.64810544", "0.64810544", "0.6473725", "0.6473725", "0.64484614", "0.6369455", "0.6367731", "0.63634837", "0.63515633", "0.6347283", "0.6333643", "0.63224185", "0.63042843", "0.6294947", "0.6294947", "0.6294947", "0.6294947", "0.6294947", "0.6294947", "0.6294947", "0.6272548", "0.6261058", "0.6261014", "0.6255288", "0.6235567", "0.6215616", "0.61882395", "0.61869425", "0.61853486", "0.61732227", "0.6172991", "0.6161689", "0.6149214", "0.61405575", "0.61394924", "0.61382043", "0.61309713", "0.6114562", "0.6095998", "0.60876584", "0.608668", "0.6071026", "0.60562336", "0.6046266", "0.60436267", "0.60365003", "0.6025574", "0.6012231", "0.60117203", "0.59997624", "0.5996585", "0.5966903", "0.59639525", "0.5962856", "0.5959767", "0.5946059", "0.5939907", "0.5924994", "0.5888938", "0.58851266", "0.58842677", "0.58834755", "0.5874016", "0.5871544", "0.5857911", "0.5854786", "0.5846042", "0.5833944", "0.58336514", "0.58278364", "0.5826999", "0.5823065", "0.581825", "0.58133304", "0.5806351", "0.58058333", "0.58052087", "0.5802651", "0.5797674", "0.5790612", "0.5789977", "0.57874006", "0.5771424", "0.57620686", "0.5759801", "0.5753591", "0.57521576", "0.57432073", "0.573311", "0.5732155", "0.5732155", "0.5732155" ]
0.0
-1
Extra arguments are stored as the mode's dependencies, which is used by (legacy) mechanisms like loadmode.js to automatically load a mode. (Preferred mechanism is the require/define calls.)
function defineMode(name, mode) { if (arguments.length > 2) { mode.dependencies = Array.prototype.slice.call(arguments, 2); } modes[name] = mode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function defineMode(name, mode) {\n\t\t if (arguments.length > 2)\n\t\t { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n\t\t modes[name] = mode;\n\t\t }", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2) }\n modes[name] = mode\n}", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2) }\n modes[name] = mode\n}", "function defineMode(name, mode) {\r\n if (arguments.length > 2)\r\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\r\n modes[name] = mode;\r\n}", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n}", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n}", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n}", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n}", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n}", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n}", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n}", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n}", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n}", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n}", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n}", "function defineMode(name, mode) {\n if (arguments.length > 2) {\n mode.dependencies = Array.prototype.slice.call(arguments, 2);\n }\n\n modes[name] = mode;\n }", "function requires() {\n if (!conf) {\n alert(\"MRequires: MRequires() used before MRequires.init() called.\");\n return;\n }\n \n for (var i=0; i<arguments.length; i++) {\n \n // We keep track of items by their URL, because different\n // component names can refer to the same URL and we never\n // want to load the same URL twice.\n var url = makeUrl(arguments[i]);\n \n // Load only when not already loaded\n if (!loaded[url]) {\n // mark as loaded\n loaded[url] = true;\n \n if (/\\.js$/.test(url)) {\n loadJavaScript(url);\n }\n else if (/\\.css$/.test(url)) {\n loadCss(url);\n }\n else {\n alert(\"MRequires: Unknown file type '\"+url+\"'.\");\n }\n }\n }\n }", "function module$1(name, options, executeNow) {\n \tif (focused) {\n \t\treturn;\n \t}\n\n \tif (arguments.length === 2) {\n \t\tif (objectType(options) === \"function\") {\n \t\t\texecuteNow = options;\n \t\t\toptions = undefined;\n \t\t}\n \t}\n\n \tprocessModule(name, options, executeNow);\n }", "function ze(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),ci[e]=t}", "function setModuleMode(_ref) {\n var mode = _ref.mode,\n libraryType = _ref.libraryType;\n\n moduleMode = mode;\n\n if (typeof libraryType !== \"undefined\") {\n moduleLibraryType = libraryType;\n }\n\n if (moduleLibraryType !== \"v1\") {\n applyMakeupFunctionName = 'createLook';\n pausedFunctionName = 'isPaused';\n }\n}", "loadDependencies(){\n\n }", "function loadAllModes(){\n var modesDir = path.join(appPath, 'node_modules/');\n var files = fs.readdirSync(modesDir);\n var modes = {};\n var modeDirs = [];\n\n // List all files, only add directories\n for(var i in files) {\n if (fs.statSync(modesDir + files[i]).isDirectory()) {\n modeDirs.push(files[i]);\n }\n }\n\n // Move through each mode package JSON file...\n for(var i in modeDirs) {\n var modeDir = path.join(modesDir, modeDirs[i]);\n var package = {};\n\n if (fs.existsSync(path.join(modeDir, 'package.json'))) {\n try {\n package = require(path.join(modeDir, 'package.json'));\n } catch(e) {\n console.error('Problem reading mode package:', e)\n // Silently fail on bad parse!\n continue;\n }\n } else {\n continue;\n }\n\n // This a good file? if so, lets make it ala mode!\n if (package['robopaint-type'] === \"mode\" && _.has(package.robopaint, 'index')) {\n // TODO: Add FS checks to see if its index file actually exists\n package.root = path.join(modesDir, modeDirs[i], '/');\n package.index = path.join(package.root, package.robopaint.index);\n modes[package.robopaint.name] = package;\n\n // Load any persistent scripts into the DOM\n if (package.robopaint.persistentScripts) {\n _.each(package.robopaint.persistentScripts, function(scriptPath){\n $('<script>').attr('src', path.join(package.root, scriptPath)).appendTo('head');\n });\n }\n }\n }\n\n // Calculate correct order for modes based on package weight (reverse)\n var order = Object.keys(modes).sort(function(a, b) {\n return (modes[b].robopaint.weight - modes[a].robopaint.weight)\n });\n\n // Build external robopaint.modes in correct order\n robopaint.modes = _.chain(modes)\n .sortBy(function(mode){ return mode.robopaint.weight; })\n .indexBy(function(mode){ return mode.robopaint.name; })\n .value();\n\n\n // Grab enabled modes\n var set = robopaint.utils.getSettings();\n var enabledModes = {};\n\n if (set && set.enabledmodes) {\n enabledModes = set.enabledmodes;\n }\n\n // Move through all approved modes based on mode weight and add DOM\n for(var i in order) {\n var name = order[i];\n var m = modes[name];\n\n // This is the minimum enabled modes, other modes are enabled during\n // settings load/apply when it gets around to it.\n robopaint.modes[name].enabled = !_.isUndefined(enabledModes[name]) ? enabledModes[name] : (coreModes.indexOf(name) !== -1);\n\n // Add the toolbar link icon\n\n // This monstrosity is to ensure no matter where it lives, we can find the\n // correct relative path to put in the background image location. This is\n // especially picky on windows as the absolute backslashes are mangled on\n // URI encode and will be flipped at the end via the global replace.\n var iconURI = path.relative(\n path.join(appPath, 'resources'),\n path.join(m.root, m.robopaint.graphics.icon)\n ).replace(/\\\\/g, '/');\n\n var i18nStr = \"modes.\" + m.robopaint.name + \".info.\";\n $('#bar-home').after(\n $('<a>')\n .attr('href', m.index)\n .attr('id', 'bar-' + m.robopaint.name)\n .addClass('mode tipped ' + (robopaint.modes[name].enabled ? '' : ' hidden') )\n .css('background-image', \"url('\" + iconURI + \"')\")\n .attr('data-i18n', '[title]' + i18nStr + 'use')\n .attr('title', robopaint.t(i18nStr + 'use'))\n .html('&nbsp;')\n );\n }\n\n // Add every mode to for enabling/disabling\n buildSettingsModeView();\n\n // Trigger modesLoaded for the home screen visualization.\n homeVis.modesLoaded();\n}", "function load()\n{\n dashcode.setupParts();\n}", "function load()\n{\n dashcode.setupParts();\n}", "function load()\n{\n dashcode.setupParts();\n}", "load(...args) {\n console.log(args);\n }", "function loadMode(cm) {\n\t\t cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n\t\t resetModeState(cm);\n\t\t }", "function getMode() {\r\n return import('./jsonMode.js');\r\n}", "function require(name) {\n var mod = ModuleManager.get(name);\n if (!mod) {\n //Only firefox and synchronous, sorry\n var file = ModuleManager.file(name);\n var code = null,\n request = new XMLHttpRequest();\n request.open('GET', file, false); \n try {\n request.send(null);\n } catch (e) {\n throw new LoadError(file);\n }\n if(request.status != 200)\n throw new LoadError(file);\n //Tego el codigo, creo el modulo\n var code = '(function(){ ' + request.responseText + '});';\n mod = ModuleManager.create(name, file, code);\n }\n event.publish('module_loaded', [this, mod]);\n switch (arguments.length) {\n case 1:\n // Returns module\n var names = name.split('.');\n var last = names[names.length - 1];\n this[last] = mod;\n return mod;\n case 2:\n // If all contents were requested returns nothing\n if (arguments[1] == '*') {\n __extend__(false, this, mod);\n return;\n // second arguments is the symbol in the package\n } else {\n var n = arguments[1];\n this[n] = mod[n];\n return mod[n];\n }\n default:\n // every argyment but the first one are a symbol\n // returns nothing\n for (var i = 1, length = arguments.length; i < length; i++) {\n this[arguments[i]] = mod[arguments[i]];\n }\n return;\n }\n }", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }", "defineKeys() {\n if (arguments.length <= 1) {\n throw new Error('Too few arguments');\n }\n\n if (arguments.length % 3 != 1) {\n throw new Error('Wrong number of arguments');\n }\n\n // key mode is the first arg\n const key = this.key;\n const ext = this.ext;\n const args = Array.prototype.slice.call(arguments);\n const keyMode = args[0];\n\n // the rest are the pair of key bindings\n args.splice(0, 1);\n const makeHandler = function(command){\n return function(args) {\n ext.exec(command, args);\n }\n };\n\n for(var i = 0; i < args.length; i+=3) {\n const keyStroke = args[i];\n const command = args[i+1];\n const desc = args[i+2];\n key.defineKey([keyMode], keyStroke, makeHandler(command), desc);\n }\n }", "function loadDemos() {\n // const files = glob.sync(path.join(__dirname, 'main-process/**/*.js'))\n // files.forEach((file) => {\n // console.log('require file path:' + file)\n // require(file)\n // })\n\n require(path.join(__dirname, 'sugr/consolemanager.js'));\n require(path.join(__dirname, 'sugr/main.js'));\n require(path.join(__dirname, 'sugr/dialog.js'));\n}", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n}", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n}", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n}", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n}", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n}", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n}", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n}", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n}", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n}", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n}", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n}", "function require() { return {}; }", "function loadMode(cm) {\n\t\t cm.doc.mode = CodeMirror.getMode(cm.options, cm.doc.modeOption);\n\t\t resetModeState(cm);\n\t\t }", "static get requires() {\r\n return {\r\n 'LW.Window': 'lw.window.js',\r\n 'LW.Calendar': 'lw.calendar.js',\r\n // 'LW.Menu': 'lw.menu.js',\r\n // 'LW.Tooltip': 'lw.tooltip.js'\r\n }\r\n }", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption)\n resetModeState(cm)\n}", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption)\n resetModeState(cm)\n}", "enableLoad(args) {\n if (args.autoload && typeof args.autoload === 'number') {\n this.count[args.channels] = args.autoload;\n\n args.channels.forEach((channel) => {\n this.count[channel] = args.autoload;\n });\n }\n }", "function getMode(options, spec) {\n spec = resolveMode(spec);\n var mfactory = modes[spec.name];\n\n if (!mfactory) {\n return getMode(options, \"text/plain\");\n }\n\n var modeObj = mfactory(options, spec);\n\n if (modeExtensions.hasOwnProperty(spec.name)) {\n var exts = modeExtensions[spec.name];\n\n for (var prop in exts) {\n if (!exts.hasOwnProperty(prop)) {\n continue;\n }\n\n if (modeObj.hasOwnProperty(prop)) {\n modeObj[\"_\" + prop] = modeObj[prop];\n }\n\n modeObj[prop] = exts[prop];\n }\n }\n\n modeObj.name = spec.name;\n\n if (spec.helperType) {\n modeObj.helperType = spec.helperType;\n }\n\n if (spec.modeProps) {\n for (var prop$1 in spec.modeProps) {\n modeObj[prop$1] = spec.modeProps[prop$1];\n }\n }\n\n return modeObj;\n } // This can be used to attach properties to mode objects from", "defineSelectionMode(name, args){\n const requiredFuncName = 'getWorldSpaceBoundingBox';\n if(!this._selectionModes){\n this._selectionModes= {};\n }\n if(!!(args && args.constructor && args.call && args.apply)){\n this._selectionModes[name]={};\n this._selectionModes[name][requiredFuncName]=args;\n }else{\n if(!args[requiredFuncName]){\n throw new Error({msg: `Selection mode definition must include ${requiredFuncName} function`, providedArgs: {name: name, args: args}})\n }\n this._selectionModes[name]=args;\n }\n }", "function loadMode(cm) {\n cm.doc.mode = CodeMirror.getMode(cm.options, cm.doc.modeOption);\n cm.doc.iter(function(line) {\n if (line.stateAfter) line.stateAfter = null;\n if (line.styles) line.styles = null;\n });\n cm.doc.frontier = cm.doc.first;\n startWorker(cm, 100);\n cm.state.modeGen++;\n if (cm.curOp) regChange(cm);\n }", "function loadMode(cm) {\n cm.doc.mode = CodeMirror.getMode(cm.options, cm.doc.modeOption);\n cm.doc.iter(function(line) {\n if (line.stateAfter) line.stateAfter = null;\n if (line.styles) line.styles = null;\n });\n cm.doc.frontier = cm.doc.first;\n startWorker(cm, 100);\n cm.state.modeGen++;\n if (cm.curOp) regChange(cm);\n }", "function loadMode(cm) {\n cm.doc.mode = CodeMirror.getMode(cm.options, cm.doc.modeOption);\n cm.doc.iter(function(line) {\n if (line.stateAfter) line.stateAfter = null;\n if (line.styles) line.styles = null;\n });\n cm.doc.frontier = cm.doc.first;\n startWorker(cm, 100);\n cm.state.modeGen++;\n if (cm.curOp) regChange(cm);\n }", "function loadMode(cm) {\n\t cm.doc.mode = CodeMirror.getMode(cm.options, cm.doc.modeOption);\n\t resetModeState(cm);\n\t }", "function loadMode(cm) {\n\t cm.doc.mode = CodeMirror.getMode(cm.options, cm.doc.modeOption);\n\t resetModeState(cm);\n\t }", "function loadMode(cm) {\n\t cm.doc.mode = CodeMirror.getMode(cm.options, cm.doc.modeOption);\n\t resetModeState(cm);\n\t }", "function loadMode(cm) {\r\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\r\n resetModeState(cm);\r\n}", "function load()\n{\n dashcode.setupParts();\n loadVersionString();\n loadUserAppKey();\n}", "function loadSequence() {\n var _args = arguments;\n return {\n deps: ['$ocLazyLoad', '$q',\n function ($ocLL, $q) {\n var promise = $q.when(1);\n for (var i = 0, len = _args.length; i < len; i++) {\n promise = promiseThen(_args[i]);\n }\n return promise;\n\n function promiseThen(_arg) {\n if (typeof _arg == 'function')\n return promise.then(_arg);\n else\n return promise.then(function () {\n var nowLoad = requiredData(_arg);\n if (!nowLoad)\n return $.error('Route resolve: Bad resource name [' + _arg + ']');\n return $ocLL.load(nowLoad);\n });\n }\n\n function requiredData(name) {\n if (jsRequires.modules)\n for (var m in jsRequires.modules)\n if (jsRequires.modules[m].name && jsRequires.modules[m].name === name)\n return jsRequires.modules[m];\n return jsRequires.scripts && jsRequires.scripts[name];\n }\n }]\n };\n }", "function loadSequence() {\n var _args = arguments;\n return {\n deps: ['$ocLazyLoad', '$q',\n function ($ocLL, $q) {\n var promise = $q.when(1);\n for (var i = 0, len = _args.length; i < len; i++) {\n promise = promiseThen(_args[i]);\n }\n return promise;\n\n function promiseThen(_arg) {\n if (typeof _arg == 'function')\n return promise.then(_arg);\n else\n return promise.then(function () {\n var nowLoad = requiredData(_arg);\n if (!nowLoad)\n return $.error('Route resolve: Bad resource name [' + _arg + ']');\n return $ocLL.load(nowLoad);\n });\n }\n\n function requiredData(name) {\n if (jsRequires.modules)\n for (var m in jsRequires.modules)\n if (jsRequires.modules[m].name && jsRequires.modules[m].name === name)\n return jsRequires.modules[m];\n return jsRequires.scripts && jsRequires.scripts[name];\n }\n }]\n };\n }", "function loadSequence() {\n var _args = arguments;\n return {\n deps: ['$ocLazyLoad', '$q',\n function ($ocLL, $q) {\n var promise = $q.when(1);\n for (var i = 0, len = _args.length; i < len; i++) {\n promise = promiseThen(_args[i]);\n }\n return promise;\n\n function promiseThen(_arg) {\n if (typeof _arg == 'function')\n return promise.then(_arg);\n else\n return promise.then(function () {\n var nowLoad = requiredData(_arg);\n if (!nowLoad)\n return $.error('Route resolve: Bad resource name [' + _arg + ']');\n return $ocLL.load(nowLoad);\n });\n }\n\n function requiredData(name) {\n if (jsRequires.modules)\n for (var m in jsRequires.modules)\n if (jsRequires.modules[m].name && jsRequires.modules[m].name === name)\n return jsRequires.modules[m];\n return jsRequires.scripts && jsRequires.scripts[name];\n }\n }]\n };\n }", "function loadSequence() {\n var _args = arguments;\n return {\n deps: ['$ocLazyLoad', '$q',\n function ($ocLL, $q) {\n var promise = $q.when(1);\n for (var i = 0, len = _args.length; i < len; i++) {\n promise = promiseThen(_args[i]);\n }\n return promise;\n\n function promiseThen(_arg) {\n if (typeof _arg == 'function')\n return promise.then(_arg);\n else\n return promise.then(function () {\n var nowLoad = requiredData(_arg);\n if (!nowLoad)\n return $.error('Route resolve: Bad resource name [' + _arg + ']');\n return $ocLL.load(nowLoad);\n });\n }\n\n function requiredData(name) {\n if (jsRequires.modules)\n for (var m in jsRequires.modules)\n if (jsRequires.modules[m].name && jsRequires.modules[m].name === name)\n return jsRequires.modules[m];\n return jsRequires.scripts && jsRequires.scripts[name];\n }\n }]\n };\n }", "function loadSequence() {\n var _args = arguments;\n return {\n deps: ['$ocLazyLoad', '$q',\n function ($ocLL, $q) {\n var promise = $q.when(1);\n for (var i = 0, len = _args.length; i < len; i++) {\n promise = promiseThen(_args[i]);\n }\n return promise;\n\n function promiseThen(_arg) {\n if (typeof _arg === 'function')\n return promise.then(_arg);\n else\n return promise.then(function () {\n var nowLoad = requiredData(_arg);\n if (!nowLoad)\n return $.error('Route resolve: Bad resource name [' + _arg + ']');\n return $ocLL.load(nowLoad);\n });\n }\n\n function requiredData(name) {\n if (jsRequires.modules)\n for (var m in jsRequires.modules)\n if (jsRequires.modules[m].name && jsRequires.modules[m].name === name)\n return jsRequires.modules[m];\n return jsRequires.scripts && jsRequires.scripts[name];\n }\n }]\n };\n }", "function getMode(){\n return mode;\n}", "function loadSequence() {\r\n var _args = arguments;\r\n return {\r\n deps: ['$ocLazyLoad', '$q',\r\n\t\t\tfunction ($ocLL, $q) {\r\n\t\t\t var promise = $q.when(1);\r\n\t\t\t for (var i = 0, len = _args.length; i < len; i++) {\r\n\t\t\t promise = promiseThen(_args[i]);\r\n\t\t\t }\r\n\t\t\t return promise;\r\n\r\n\t\t\t function promiseThen(_arg) {\r\n\t\t\t if (typeof _arg == 'function')\r\n\t\t\t return promise.then(_arg);\r\n\t\t\t else\r\n\t\t\t return promise.then(function () {\r\n\t\t\t var nowLoad = requiredData(_arg);\r\n\t\t\t if (!nowLoad)\r\n\t\t\t return $.error('Route resolve: Bad resource name [' + _arg + ']');\r\n\t\t\t return $ocLL.load(nowLoad);\r\n\t\t\t });\r\n\t\t\t }\r\n\r\n\t\t\t function requiredData(name) {\r\n\t\t\t if (jsRequires.modules)\r\n\t\t\t for (var m in jsRequires.modules)\r\n\t\t\t if (jsRequires.modules[m].name && jsRequires.modules[m].name === name)\r\n\t\t\t return jsRequires.modules[m];\r\n\t\t\t return jsRequires.scripts && jsRequires.scripts[name];\r\n\t\t\t }\r\n\t\t\t}]\r\n };\r\n }", "function c(e,t,n){Array.isArray(e)?(n=t,t=e,e=void 0):\"string\"!=typeof e&&(n=e,e=t=void 0),t&&!Array.isArray(t)&&(n=t,t=void 0),t||(t=[\"require\",\"exports\",\"module\"]),\n//Set up properties for this module. If an ID, then use\n//internal cache. If no ID, then use the external variables\n//for this node module.\ne?\n//Put the module in deep freeze until there is a\n//require call for it.\nd[e]=[e,t,n]:l(e,t,n)}", "function loadMode(cm) {\r\n cm.doc.mode = CodeMirror.getMode(cm.options, cm.doc.modeOption);\r\n resetModeState(cm);\r\n }" ]
[ "0.8086951", "0.7878944", "0.7878944", "0.77991426", "0.7784908", "0.7784908", "0.7784908", "0.7784908", "0.7784908", "0.7784908", "0.7784908", "0.7784908", "0.7784908", "0.7784908", "0.7784908", "0.77408165", "0.58079785", "0.5612584", "0.544827", "0.5402135", "0.5336659", "0.533388", "0.523231", "0.523231", "0.523231", "0.5229481", "0.52037984", "0.51676214", "0.5117448", "0.5105615", "0.5105615", "0.5105615", "0.5105615", "0.5105615", "0.5105615", "0.5105615", "0.5105615", "0.5105615", "0.5105615", "0.5105615", "0.5105615", "0.5105615", "0.5105615", "0.5105615", "0.5105615", "0.5105615", "0.5089734", "0.5085868", "0.5075467", "0.5075467", "0.5075467", "0.5075467", "0.5075467", "0.5075467", "0.5075467", "0.5075467", "0.5075467", "0.5075467", "0.5075467", "0.50691724", "0.5068339", "0.5058805", "0.5044709", "0.5044709", "0.50425273", "0.5042182", "0.50284517", "0.50255877", "0.50255877", "0.50255877", "0.5024438", "0.5024438", "0.5024438", "0.5022897", "0.5011854", "0.4990327", "0.4990327", "0.4990327", "0.4990327", "0.4986995", "0.49855307", "0.4971432", "0.49164495", "0.49133784" ]
0.7837288
17
Given a mode spec (anything that resolveMode accepts), find and initialize an actual mode object.
function getMode(options, spec) { spec = resolveMode(spec); var mfactory = modes[spec.name]; if (!mfactory) { return getMode(options, "text/plain") } var modeObj = mfactory(options, spec); if (modeExtensions.hasOwnProperty(spec.name)) { var exts = modeExtensions[spec.name]; for (var prop in exts) { if (!exts.hasOwnProperty(prop)) { continue } if (modeObj.hasOwnProperty(prop)) { modeObj["_" + prop] = modeObj[prop]; } modeObj[prop] = exts[prop]; } } modeObj.name = spec.name; if (spec.helperType) { modeObj.helperType = spec.helperType; } if (spec.modeProps) { for (var prop$1 in spec.modeProps) { modeObj[prop$1] = spec.modeProps[prop$1]; } } return modeObj }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resolveMode(spec) {\n if (typeof spec == \"string\" && mimeModes.hasOwnProperty(spec)) {\n spec = mimeModes[spec];\n } else if (spec && typeof spec.name == \"string\" && mimeModes.hasOwnProperty(spec.name)) {\n var found = mimeModes[spec.name];\n\n if (typeof found == \"string\") {\n found = {\n name: found\n };\n }\n\n spec = createObj(found, spec);\n spec.name = found.name;\n } else if (typeof spec == \"string\" && /^[\\w\\-]+\\/[\\w\\-]+\\+xml$/.test(spec)) {\n return resolveMode(\"application/xml\");\n } else if (typeof spec == \"string\" && /^[\\w\\-]+\\/[\\w\\-]+\\+json$/.test(spec)) {\n return resolveMode(\"application/json\");\n }\n\n if (typeof spec == \"string\") {\n return {\n name: spec\n };\n } else {\n return spec || {\n name: \"null\"\n };\n }\n } // Given a mode spec (anything that resolveMode accepts), find and", "function getMode(options, spec) {\n spec = resolveMode(spec);\n var mfactory = modes[spec.name];\n\n if (!mfactory) {\n return getMode(options, \"text/plain\");\n }\n\n var modeObj = mfactory(options, spec);\n\n if (modeExtensions.hasOwnProperty(spec.name)) {\n var exts = modeExtensions[spec.name];\n\n for (var prop in exts) {\n if (!exts.hasOwnProperty(prop)) {\n continue;\n }\n\n if (modeObj.hasOwnProperty(prop)) {\n modeObj[\"_\" + prop] = modeObj[prop];\n }\n\n modeObj[prop] = exts[prop];\n }\n }\n\n modeObj.name = spec.name;\n\n if (spec.helperType) {\n modeObj.helperType = spec.helperType;\n }\n\n if (spec.modeProps) {\n for (var prop$1 in spec.modeProps) {\n modeObj[prop$1] = spec.modeProps[prop$1];\n }\n }\n\n return modeObj;\n } // This can be used to attach properties to mode objects from", "function getMode(options, spec) {\n spec = resolveMode(spec)\n var mfactory = modes[spec.name]\n if (!mfactory) { return getMode(options, \"text/plain\") }\n var modeObj = mfactory(options, spec)\n if (modeExtensions.hasOwnProperty(spec.name)) {\n var exts = modeExtensions[spec.name]\n for (var prop in exts) {\n if (!exts.hasOwnProperty(prop)) { continue }\n if (modeObj.hasOwnProperty(prop)) { modeObj[\"_\" + prop] = modeObj[prop] }\n modeObj[prop] = exts[prop]\n }\n }\n modeObj.name = spec.name\n if (spec.helperType) { modeObj.helperType = spec.helperType }\n if (spec.modeProps) { for (var prop$1 in spec.modeProps)\n { modeObj[prop$1] = spec.modeProps[prop$1] } }\n\n return modeObj\n}", "function getMode(options, spec) {\n spec = resolveMode(spec)\n var mfactory = modes[spec.name]\n if (!mfactory) { return getMode(options, \"text/plain\") }\n var modeObj = mfactory(options, spec)\n if (modeExtensions.hasOwnProperty(spec.name)) {\n var exts = modeExtensions[spec.name]\n for (var prop in exts) {\n if (!exts.hasOwnProperty(prop)) { continue }\n if (modeObj.hasOwnProperty(prop)) { modeObj[\"_\" + prop] = modeObj[prop] }\n modeObj[prop] = exts[prop]\n }\n }\n modeObj.name = spec.name\n if (spec.helperType) { modeObj.helperType = spec.helperType }\n if (spec.modeProps) { for (var prop$1 in spec.modeProps)\n { modeObj[prop$1] = spec.modeProps[prop$1] } }\n\n return modeObj\n}", "function getMode(options, spec) {\n\t\t spec = resolveMode(spec);\n\t\t var mfactory = modes[spec.name];\n\t\t if (!mfactory) { return getMode(options, \"text/plain\") }\n\t\t var modeObj = mfactory(options, spec);\n\t\t if (modeExtensions.hasOwnProperty(spec.name)) {\n\t\t var exts = modeExtensions[spec.name];\n\t\t for (var prop in exts) {\n\t\t if (!exts.hasOwnProperty(prop)) { continue }\n\t\t if (modeObj.hasOwnProperty(prop)) { modeObj[\"_\" + prop] = modeObj[prop]; }\n\t\t modeObj[prop] = exts[prop];\n\t\t }\n\t\t }\n\t\t modeObj.name = spec.name;\n\t\t if (spec.helperType) { modeObj.helperType = spec.helperType; }\n\t\t if (spec.modeProps) { for (var prop$1 in spec.modeProps)\n\t\t { modeObj[prop$1] = spec.modeProps[prop$1]; } }\n\n\t\t return modeObj\n\t\t }", "function getMode(options, spec) {\n spec = resolveMode(spec);\n var mfactory = modes[spec.name];\n if (!mfactory) { return getMode(options, \"text/plain\") }\n var modeObj = mfactory(options, spec);\n if (modeExtensions.hasOwnProperty(spec.name)) {\n var exts = modeExtensions[spec.name];\n for (var prop in exts) {\n if (!exts.hasOwnProperty(prop)) { continue }\n if (modeObj.hasOwnProperty(prop)) { modeObj[\"_\" + prop] = modeObj[prop]; }\n modeObj[prop] = exts[prop];\n }\n }\n modeObj.name = spec.name;\n if (spec.helperType) { modeObj.helperType = spec.helperType; }\n if (spec.modeProps) { for (var prop$1 in spec.modeProps)\n { modeObj[prop$1] = spec.modeProps[prop$1]; } }\n\n return modeObj\n}", "function getMode(options, spec) {\n spec = resolveMode(spec);\n var mfactory = modes[spec.name];\n if (!mfactory) { return getMode(options, \"text/plain\") }\n var modeObj = mfactory(options, spec);\n if (modeExtensions.hasOwnProperty(spec.name)) {\n var exts = modeExtensions[spec.name];\n for (var prop in exts) {\n if (!exts.hasOwnProperty(prop)) { continue }\n if (modeObj.hasOwnProperty(prop)) { modeObj[\"_\" + prop] = modeObj[prop]; }\n modeObj[prop] = exts[prop];\n }\n }\n modeObj.name = spec.name;\n if (spec.helperType) { modeObj.helperType = spec.helperType; }\n if (spec.modeProps) { for (var prop$1 in spec.modeProps)\n { modeObj[prop$1] = spec.modeProps[prop$1]; } }\n\n return modeObj\n}", "function getMode(options, spec) {\n spec = resolveMode(spec);\n var mfactory = modes[spec.name];\n if (!mfactory) { return getMode(options, \"text/plain\") }\n var modeObj = mfactory(options, spec);\n if (modeExtensions.hasOwnProperty(spec.name)) {\n var exts = modeExtensions[spec.name];\n for (var prop in exts) {\n if (!exts.hasOwnProperty(prop)) { continue }\n if (modeObj.hasOwnProperty(prop)) { modeObj[\"_\" + prop] = modeObj[prop]; }\n modeObj[prop] = exts[prop];\n }\n }\n modeObj.name = spec.name;\n if (spec.helperType) { modeObj.helperType = spec.helperType; }\n if (spec.modeProps) { for (var prop$1 in spec.modeProps)\n { modeObj[prop$1] = spec.modeProps[prop$1]; } }\n\n return modeObj\n}", "function getMode(options, spec) {\n spec = resolveMode(spec);\n var mfactory = modes[spec.name];\n if (!mfactory) { return getMode(options, \"text/plain\") }\n var modeObj = mfactory(options, spec);\n if (modeExtensions.hasOwnProperty(spec.name)) {\n var exts = modeExtensions[spec.name];\n for (var prop in exts) {\n if (!exts.hasOwnProperty(prop)) { continue }\n if (modeObj.hasOwnProperty(prop)) { modeObj[\"_\" + prop] = modeObj[prop]; }\n modeObj[prop] = exts[prop];\n }\n }\n modeObj.name = spec.name;\n if (spec.helperType) { modeObj.helperType = spec.helperType; }\n if (spec.modeProps) { for (var prop$1 in spec.modeProps)\n { modeObj[prop$1] = spec.modeProps[prop$1]; } }\n\n return modeObj\n}", "function getMode(options, spec) {\n spec = resolveMode(spec);\n var mfactory = modes[spec.name];\n if (!mfactory) { return getMode(options, \"text/plain\") }\n var modeObj = mfactory(options, spec);\n if (modeExtensions.hasOwnProperty(spec.name)) {\n var exts = modeExtensions[spec.name];\n for (var prop in exts) {\n if (!exts.hasOwnProperty(prop)) { continue }\n if (modeObj.hasOwnProperty(prop)) { modeObj[\"_\" + prop] = modeObj[prop]; }\n modeObj[prop] = exts[prop];\n }\n }\n modeObj.name = spec.name;\n if (spec.helperType) { modeObj.helperType = spec.helperType; }\n if (spec.modeProps) { for (var prop$1 in spec.modeProps)\n { modeObj[prop$1] = spec.modeProps[prop$1]; } }\n\n return modeObj\n}", "function getMode(options, spec) {\n spec = resolveMode(spec);\n var mfactory = modes[spec.name];\n if (!mfactory) { return getMode(options, \"text/plain\") }\n var modeObj = mfactory(options, spec);\n if (modeExtensions.hasOwnProperty(spec.name)) {\n var exts = modeExtensions[spec.name];\n for (var prop in exts) {\n if (!exts.hasOwnProperty(prop)) { continue }\n if (modeObj.hasOwnProperty(prop)) { modeObj[\"_\" + prop] = modeObj[prop]; }\n modeObj[prop] = exts[prop];\n }\n }\n modeObj.name = spec.name;\n if (spec.helperType) { modeObj.helperType = spec.helperType; }\n if (spec.modeProps) { for (var prop$1 in spec.modeProps)\n { modeObj[prop$1] = spec.modeProps[prop$1]; } }\n\n return modeObj\n}", "function getMode(options, spec) {\n spec = resolveMode(spec);\n var mfactory = modes[spec.name];\n if (!mfactory) { return getMode(options, \"text/plain\") }\n var modeObj = mfactory(options, spec);\n if (modeExtensions.hasOwnProperty(spec.name)) {\n var exts = modeExtensions[spec.name];\n for (var prop in exts) {\n if (!exts.hasOwnProperty(prop)) { continue }\n if (modeObj.hasOwnProperty(prop)) { modeObj[\"_\" + prop] = modeObj[prop]; }\n modeObj[prop] = exts[prop];\n }\n }\n modeObj.name = spec.name;\n if (spec.helperType) { modeObj.helperType = spec.helperType; }\n if (spec.modeProps) { for (var prop$1 in spec.modeProps)\n { modeObj[prop$1] = spec.modeProps[prop$1]; } }\n\n return modeObj\n}", "function getMode(options, spec) {\n spec = resolveMode(spec);\n var mfactory = modes[spec.name];\n if (!mfactory) { return getMode(options, \"text/plain\") }\n var modeObj = mfactory(options, spec);\n if (modeExtensions.hasOwnProperty(spec.name)) {\n var exts = modeExtensions[spec.name];\n for (var prop in exts) {\n if (!exts.hasOwnProperty(prop)) { continue }\n if (modeObj.hasOwnProperty(prop)) { modeObj[\"_\" + prop] = modeObj[prop]; }\n modeObj[prop] = exts[prop];\n }\n }\n modeObj.name = spec.name;\n if (spec.helperType) { modeObj.helperType = spec.helperType; }\n if (spec.modeProps) { for (var prop$1 in spec.modeProps)\n { modeObj[prop$1] = spec.modeProps[prop$1]; } }\n\n return modeObj\n}", "function getMode(options, spec) {\n spec = resolveMode(spec);\n var mfactory = modes[spec.name];\n if (!mfactory) { return getMode(options, \"text/plain\") }\n var modeObj = mfactory(options, spec);\n if (modeExtensions.hasOwnProperty(spec.name)) {\n var exts = modeExtensions[spec.name];\n for (var prop in exts) {\n if (!exts.hasOwnProperty(prop)) { continue }\n if (modeObj.hasOwnProperty(prop)) { modeObj[\"_\" + prop] = modeObj[prop]; }\n modeObj[prop] = exts[prop];\n }\n }\n modeObj.name = spec.name;\n if (spec.helperType) { modeObj.helperType = spec.helperType; }\n if (spec.modeProps) { for (var prop$1 in spec.modeProps)\n { modeObj[prop$1] = spec.modeProps[prop$1]; } }\n\n return modeObj\n}", "function getMode(options, spec) {\n spec = resolveMode(spec);\n var mfactory = modes[spec.name];\n if (!mfactory) { return getMode(options, \"text/plain\") }\n var modeObj = mfactory(options, spec);\n if (modeExtensions.hasOwnProperty(spec.name)) {\n var exts = modeExtensions[spec.name];\n for (var prop in exts) {\n if (!exts.hasOwnProperty(prop)) { continue }\n if (modeObj.hasOwnProperty(prop)) { modeObj[\"_\" + prop] = modeObj[prop]; }\n modeObj[prop] = exts[prop];\n }\n }\n modeObj.name = spec.name;\n if (spec.helperType) { modeObj.helperType = spec.helperType; }\n if (spec.modeProps) { for (var prop$1 in spec.modeProps)\n { modeObj[prop$1] = spec.modeProps[prop$1]; } }\n\n return modeObj\n}", "function getMode(options, spec) {\n spec = resolveMode(spec);\n var mfactory = modes[spec.name];\n if (!mfactory) { return getMode(options, \"text/plain\") }\n var modeObj = mfactory(options, spec);\n if (modeExtensions.hasOwnProperty(spec.name)) {\n var exts = modeExtensions[spec.name];\n for (var prop in exts) {\n if (!exts.hasOwnProperty(prop)) { continue }\n if (modeObj.hasOwnProperty(prop)) { modeObj[\"_\" + prop] = modeObj[prop]; }\n modeObj[prop] = exts[prop];\n }\n }\n modeObj.name = spec.name;\n if (spec.helperType) { modeObj.helperType = spec.helperType; }\n if (spec.modeProps) { for (var prop$1 in spec.modeProps)\n { modeObj[prop$1] = spec.modeProps[prop$1]; } }\n\n return modeObj\n}", "function getMode(options, spec) {\r\n spec = resolveMode(spec);\r\n var mfactory = modes[spec.name];\r\n if (!mfactory) { return getMode(options, \"text/plain\") }\r\n var modeObj = mfactory(options, spec);\r\n if (modeExtensions.hasOwnProperty(spec.name)) {\r\n var exts = modeExtensions[spec.name];\r\n for (var prop in exts) {\r\n if (!exts.hasOwnProperty(prop)) { continue }\r\n if (modeObj.hasOwnProperty(prop)) { modeObj[\"_\" + prop] = modeObj[prop]; }\r\n modeObj[prop] = exts[prop];\r\n }\r\n }\r\n modeObj.name = spec.name;\r\n if (spec.helperType) { modeObj.helperType = spec.helperType; }\r\n if (spec.modeProps) { for (var prop$1 in spec.modeProps)\r\n { modeObj[prop$1] = spec.modeProps[prop$1]; } }\r\n\r\n return modeObj\r\n}", "function guessMode(spec, providedMode) {\n // Decide mode\n if (spec.$schema) {\n const parsed = schemaParser(spec.$schema);\n if (providedMode && providedMode !== parsed.library) {\n console.warn(`The given visualization spec is written in ${NAMES[parsed.library]}, but mode argument sets ${NAMES[providedMode] || providedMode}.`);\n }\n const mode = parsed.library;\n if (!semver_30(VERSION[mode], `^${parsed.version.slice(1)}`)) {\n console.warn(`The input spec uses ${mode} ${parsed.version}, but the current version of ${NAMES[mode]} is ${VERSION[mode]}.`);\n }\n return mode;\n }\n else {\n // try to guess from the provided spec\n if ('mark' in spec ||\n 'encoding' in spec ||\n 'layer' in spec ||\n 'hconcat' in spec ||\n 'vconcat' in spec ||\n 'facet' in spec ||\n 'repeat' in spec) {\n return 'vega-lite';\n }\n if ('marks' in spec || 'signals' in spec || 'scales' in spec || 'axes' in spec) {\n return 'vega';\n }\n }\n return providedMode || 'vega';\n }", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "function defineMode(name, mode) {\n if (arguments.length > 2) {\n mode.dependencies = Array.prototype.slice.call(arguments, 2);\n }\n\n modes[name] = mode;\n }", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2) }\n modes[name] = mode\n}", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2) }\n modes[name] = mode\n}", "function defineMode(name, mode) {\n\t\t if (arguments.length > 2)\n\t\t { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n\t\t modes[name] = mode;\n\t\t }", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n}", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n}", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n}", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n}", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n}", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n}", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n}", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n}", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n}", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n}", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n}", "function defineMode(name, mode) {\r\n if (arguments.length > 2)\r\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\r\n modes[name] = mode;\r\n}", "function lookupMode(id) {\n return (OPT_MAP[id] || {mode: null}).mode;\n }", "function guessMode(spec, providedMode) {\n // Decide mode\n if (spec.$schema) {\n const parsed = (0,vega_schema_url_parser__WEBPACK_IMPORTED_MODULE_5__.default)(spec.$schema);\n if (providedMode && providedMode !== parsed.library) {\n console.warn(`The given visualization spec is written in ${NAMES[parsed.library]}, but mode argument sets ${NAMES[providedMode] || providedMode}.`);\n }\n const mode = parsed.library;\n if (!(0,semver__WEBPACK_IMPORTED_MODULE_2__.satisfies)(VERSION[mode], `^${parsed.version.slice(1)}`)) {\n console.warn(`The input spec uses ${NAMES[mode]} ${parsed.version}, but the current version of ${NAMES[mode]} is v${VERSION[mode]}.`);\n }\n return mode;\n }\n // try to guess from the provided spec\n if ('mark' in spec ||\n 'encoding' in spec ||\n 'layer' in spec ||\n 'hconcat' in spec ||\n 'vconcat' in spec ||\n 'facet' in spec ||\n 'repeat' in spec) {\n return 'vega-lite';\n }\n if ('marks' in spec || 'signals' in spec || 'scales' in spec || 'axes' in spec) {\n return 'vega';\n }\n return providedMode || 'vega';\n}", "mode(val) {\n this._mode = val;\n return this;\n }", "switchMode(newMode: Mode) {\n this.mode = newMode;\n }", "get mode() {}", "function createMode(rulesArray) {\n\n var mode = {\n rules: rulesArray,\n rulesRe: null,\n findIndex: {},\n activeRules: [],\n\n // gets the index of the found capture from the capture array\n getgroupIndex: function (captureArray, startIndex) {\n startIndex = (startIndex || 0);\n\n for (var i = startIndex, il = captureArray.length; i < il; i++) {\n if (captureArray[i] != null) return (i - startIndex);\n }\n return -1;\n },\n\n // uses findIndex to find rule based on captures result.\n getRuleFromCaptures: function (captureArray, startIndex, useFindIndex) {\n if (useFindIndex || useFindIndex == null) {\n return this.findIndex[this.getgroupIndex(captureArray, startIndex)];\n } else {\n return getRuleFromMatch(captureArray[this.getgroupIndex(captureArray, startIndex)]);\n }\n },\n\n // gets the rule from the matched text. slower than using find index. \n getRuleFromMatch: function (text) {\n var match;\n\n if ((match = new RegExp(this.rulesRe.source, 'gm').exec(text)) != null) {\n return this.findIndex[this.getgroupIndex(match, 1)];\n }\n\n },\n // creates the re, based on options\n updateRe: function (options) {\n this.findIndex = {};\n this.activeRules = [];\n\n var regex = '';\n var rule;\n\n var captureOffset = 0;\n var arrayLength = rulesArray.length;\n\n for (var i = 0, il = rulesArray.length; i < il; i++) {\n rule = rulesArray[i];\n\n if (rule.optionsMatch == null || options == null || options.match(rule.optionsMatch)) {\n regex += '(' + rule.regEx + ')|';\n this.activeRules.push(rule);\n this.findIndex[i + captureOffset] = rule;\n captureOffset += rule.capturedCount;\n } else {\n // skip rule\n captureOffset--;\n }\n }\n\n this.rulesRe = RegExp(regex.substr(0, regex.length - 1), 'gm');\n },\n\n clone: function () {\n return createMode(this.rules);\n }\n };\n mode.updateRe('');\n return mode;\n }", "function lookupOptions(mode) {\n if (mode in OPT_MAP) {\n var result = OPT_MAP[mode];\n result.textModeAtStart = !useBlocksByDefault;\n return result;\n }\n else {\n return null;\n }\n }", "function CMode( conf, parserConf )\n {\n // this is a generic multiplexing mode\n // since it supports multiple inner sub-grammar parsers\n // this means all folding/matching/autocompletion/comments multiplexing and so on..\n // should be handled by the mode itself taking account any sub-modes\n // and NOT by Codemirror!!\n var mode;\n mode = {\n Mode: CMode\n \n ,startState: function( ) { \n return {parser: CMode.$parser, state: new State( ), inner: {}, name: null};\n }\n \n ,copyState: function( state ) { \n return {parser: state.parser, state: new State( 0, state.state ), inner: state.inner, name: state.name};\n }\n \n ,token: function( stream, state ) { \n var pstream = Stream( stream.string, stream.start, stream.pos ), \n token = state.parser.get( pstream, state ).type;\n stream.pos = pstream.pos;\n return token;\n }\n \n ,indent: function( state, textAfter, fullLine ) { \n return state.parser.indent( state.state, textAfter, fullLine, conf, parserConf, CodeMirror ); \n }\n \n ,fold: CMode.foldType\n \n // support comments toggle functionality\n ,lineComment: CMode.$parser.LC\n ,blockCommentStart: CMode.$parser.BCS\n ,blockCommentEnd: CMode.$parser.BCE\n ,blockCommentContinue: CMode.$parser.BCC\n ,blockCommentLead: CMode.$parser.BCL\n // support extra functionality defined in grammar\n // eg. code folding, electriChars etc..\n ,electricInput: CMode.$parser.$grammar.$extra.electricInput || false\n ,electricChars: CMode.$parser.$grammar.$extra.electricChars || false\n };\n // store a reference to mode here\n CMode.mode = mode;\n return mode;\n }", "function parseMode (mode) {\n switch (mode) {\n case 'js':\n case 'javascript':\n mode = 'jsx'\n }\n let syntax = CodeMirror.findModeByName(mode)\n if (syntax == null) syntax = CodeMirror.findModeByName('Plain Text')\n return syntax\n}", "function initMode() {\n chrome.storage.local.get({\"mode\": \"flexible\"}, function (items) {\n mode = items.mode;\n });\n}", "checkMode(mode) {\n if (!mode) {\n mode = this.mode\n }\n return mode;\n }", "function startNewMode(mode) {\n var node\n\n if (mode.className) {\n node = build(mode.className, [])\n }\n\n // Enter a new mode.\n if (node) {\n currentChildren.push(node)\n stack.push(currentChildren)\n currentChildren = node.children\n }\n\n top = Object.create(mode, {parent: {value: top}})\n }", "set mode(value) {}", "initContext (mode) {\n this._screenDispatcher = new ScreenDispatcher(constant.SCR_INITIAL)\n this._screenDispatcher.register(constant.SCR_INITIAL, new InitialScreen())\n this._screenDispatcher.register(constant.SCR_SELECT_MODE, new SelectModeScreen())\n this._screenDispatcher.register(constant.SCR_PLAYING, new PlayingScreen())\n this._screenDispatcher.register(constant.SCR_GAMEOVER, new GameOverScreen())\n this._needleSelection = new NeedleSelection()\n this._threadSelection = new ThreadSelection()\n this._gameOverSelection = new GameOverSelection()\n this._pauseSelection = new PauseSelection()\n this._pressStartSelection = new PressStartSelection()\n this._initialTransparentRect = new InitialTransparentRect()\n this._levelUpSelection = new LevelUpSelection()\n this._selectModeScreenSelection = new SelectModeScreenSelection()\n this._statusSelection = new StatusSelection(mode)\n\n this._ctx = this._getInitVars(mode)\n this._statusSelection.setMode(mode)\n this._prevUpdatedTime = Date.now()\n this._selectedMode = mode\n }", "function applyMode(mode) {\n var options = {};\n for (var i = 0; i < mode.length; i++) {\n switch (mode[i]) {\n case 'r':\n options.read = true;\n break;\n case 'w':\n options.write = true;\n break;\n case 'a':\n options.append = true;\n break;\n case '+':\n options.update = true;\n break;\n case 'b':\n options.binary = true;\n break;\n case 'x':\n options.exclusive = true;\n break;\n case 'c':\n options.canonical = true;\n break;\n default:\n throw new Error(\"unsupported mode argument: \" + options);\n }\n }\n return options;\n}", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }", "function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }", "setMode(mode) {\n this._mode = mode;\n }" ]
[ "0.7575302", "0.72716063", "0.7203816", "0.7203816", "0.7195392", "0.7165974", "0.7165974", "0.7165974", "0.7165974", "0.7165974", "0.7165974", "0.7165974", "0.7165974", "0.7165974", "0.7165974", "0.7165974", "0.71526504", "0.60369533", "0.603071", "0.603071", "0.603071", "0.603071", "0.603071", "0.603071", "0.603071", "0.603071", "0.603071", "0.603071", "0.603071", "0.603071", "0.603071", "0.603071", "0.603071", "0.603071", "0.603071", "0.6028422", "0.59978956", "0.59978956", "0.5990717", "0.5979657", "0.5979657", "0.5979657", "0.5979657", "0.5979657", "0.5979657", "0.5979657", "0.5979657", "0.5979657", "0.5979657", "0.5979657", "0.59279406", "0.5875304", "0.58691025", "0.5617302", "0.54044783", "0.54013216", "0.53242165", "0.5304288", "0.52990156", "0.52957183", "0.52748364", "0.5238206", "0.5208472", "0.515652", "0.51418024", "0.5127491", "0.5083906", "0.5083906", "0.5083906", "0.5083906", "0.5083906", "0.5083906", "0.5083906", "0.5083906", "0.5083906", "0.5083906", "0.5083906", "0.5083906", "0.5083906", "0.5083906", "0.5083906", "0.5083906", "0.5083906", "0.50815916" ]
0.7215773
16
Given a mode and a state (for that mode), find the inner mode and state at the position that the state refers to.
function innerMode(mode, state) { var info; while (mode.innerMode) { info = mode.innerMode(state); if (!info || info.mode == mode) { break } state = info.state; mode = info.mode; } return info || {mode: mode, state: state} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function innerMode(mode, state) {\n var info\n while (mode.innerMode) {\n info = mode.innerMode(state)\n if (!info || info.mode == mode) { break }\n state = info.state\n mode = info.mode\n }\n return info || {mode: mode, state: state}\n}", "function innerMode(mode, state) {\n var info\n while (mode.innerMode) {\n info = mode.innerMode(state)\n if (!info || info.mode == mode) { break }\n state = info.state\n mode = info.mode\n }\n return info || {mode: mode, state: state}\n}", "function innerMode(mode, state) {\n var info;\n while (mode.innerMode) {\n info = mode.innerMode(state);\n if (!info || info.mode == mode) { break }\n state = info.state;\n mode = info.mode;\n }\n return info || {mode: mode, state: state}\n}", "function innerMode(mode, state) {\n var info;\n while (mode.innerMode) {\n info = mode.innerMode(state);\n if (!info || info.mode == mode) { break }\n state = info.state;\n mode = info.mode;\n }\n return info || {mode: mode, state: state}\n}", "function innerMode(mode, state) {\n var info;\n while (mode.innerMode) {\n info = mode.innerMode(state);\n if (!info || info.mode == mode) { break }\n state = info.state;\n mode = info.mode;\n }\n return info || {mode: mode, state: state}\n}", "function innerMode(mode, state) {\n var info;\n while (mode.innerMode) {\n info = mode.innerMode(state);\n if (!info || info.mode == mode) { break }\n state = info.state;\n mode = info.mode;\n }\n return info || {mode: mode, state: state}\n}", "function innerMode(mode, state) {\n var info;\n while (mode.innerMode) {\n info = mode.innerMode(state);\n if (!info || info.mode == mode) { break }\n state = info.state;\n mode = info.mode;\n }\n return info || {mode: mode, state: state}\n}", "function innerMode(mode, state) {\n var info;\n while (mode.innerMode) {\n info = mode.innerMode(state);\n if (!info || info.mode == mode) { break }\n state = info.state;\n mode = info.mode;\n }\n return info || {mode: mode, state: state}\n}", "function innerMode(mode, state) {\n var info;\n while (mode.innerMode) {\n info = mode.innerMode(state);\n if (!info || info.mode == mode) { break }\n state = info.state;\n mode = info.mode;\n }\n return info || {mode: mode, state: state}\n}", "function innerMode(mode, state) {\n var info;\n while (mode.innerMode) {\n info = mode.innerMode(state);\n if (!info || info.mode == mode) { break }\n state = info.state;\n mode = info.mode;\n }\n return info || {mode: mode, state: state}\n}", "function innerMode(mode, state) {\n var info;\n while (mode.innerMode) {\n info = mode.innerMode(state);\n if (!info || info.mode == mode) { break }\n state = info.state;\n mode = info.mode;\n }\n return info || {mode: mode, state: state}\n}", "function innerMode(mode, state) {\n var info;\n while (mode.innerMode) {\n info = mode.innerMode(state);\n if (!info || info.mode == mode) { break }\n state = info.state;\n mode = info.mode;\n }\n return info || {mode: mode, state: state}\n}", "function innerMode(mode, state) {\n var info;\n while (mode.innerMode) {\n info = mode.innerMode(state);\n if (!info || info.mode == mode) { break }\n state = info.state;\n mode = info.mode;\n }\n return info || {mode: mode, state: state}\n}", "function innerMode(mode, state) {\n var info;\n\n while (mode.innerMode) {\n info = mode.innerMode(state);\n\n if (!info || info.mode == mode) {\n break;\n }\n\n state = info.state;\n mode = info.mode;\n }\n\n return info || {\n mode: mode,\n state: state\n };\n }", "function innerMode(mode, state) {\r\n var info;\r\n while (mode.innerMode) {\r\n info = mode.innerMode(state);\r\n if (!info || info.mode == mode) { break }\r\n state = info.state;\r\n mode = info.mode;\r\n }\r\n return info || {mode: mode, state: state}\r\n}", "function innerMode(mode, state) {\n\t\t var info;\n\t\t while (mode.innerMode) {\n\t\t info = mode.innerMode(state);\n\t\t if (!info || info.mode == mode) { break }\n\t\t state = info.state;\n\t\t mode = info.mode;\n\t\t }\n\t\t return info || {mode: mode, state: state}\n\t\t }", "function Ve(e,t){for(var a;e.innerMode&&(a=e.innerMode(t))&&a.mode!=e;)t=a.state,e=a.mode;return a||{mode:e,state:t}}", "function FindMode(arr){\n\tvar mode = arr[Math.ceil(arr.length / 2)];\n\n\treturn mode;\n}", "function findNodeByState(state){\r\n for(let i in NodeStateArr){\r\n let arr = NodeStateArr[i];\r\n if( arr[0] == state[0] && arr[1] == state[1] && arr[2] == state[2])\r\n return i;\r\n }\r\n return -1;\r\n}", "function whichState(coord) {\r\n ex = coord.x;\r\n why = coord.y;\r\n for (var i = 0; i < graph.states.length; i++) {\r\n var state = graph.states[i];\r\n var r = state.radius;\r\n //distance between two points, giving a little buffer room\r\n //between states close together\r\n if (r > (Math.sqrt(Math.pow(ex - state.location.x, 2) +\r\n Math.pow(why - state.location.y, 2))) - STATE_BUFFER) {\r\n return i;\r\n }\r\n }\r\n\r\n return -1;\r\n}", "function getMode() {\n return _states.mode;\n }", "function _scanWinSizeB(side) {\r\n var x, y, count;\r\n var startX, startY;\r\n // scan the left-bottom half until y == GRID_SIZE-1\r\n // only need scan to the last possible position\r\n for (y = GRID_SIZE - WIN_SIZE; y >= 0; --y) {\r\n x = 0;\r\n count = 0;\r\n for (var p = x, q = y; p < GRID_SIZE && q < GRID_SIZE; ++p, ++q) {\r\n if (positions[p][q].getValue() === side) {\r\n count++;\r\n if (count == 1) { // record the start position(x,y)\r\n startX = p; // we can reuse x BTW\r\n startY = q;\r\n } else if (count == WIN_SIZE) { // found WIN_SIZE link\r\n return positions[startX][startY];\r\n }\r\n } else {\r\n count = 0;\r\n }\r\n }\r\n }\r\n \r\n // scan the right-bottom half until x == GRID_SIZE-1\r\n // only need scan to the last possible position\r\n for (x = 1; x < GRID_SIZE-(WIN_SIZE-1); ++x) {\r\n y = 0;\r\n count = 0;\r\n for (var p = x, q = y; p < GRID_SIZE && q < GRID_SIZE; ++p, ++q) {\r\n if (positions[p][q].getValue() === side) {\r\n count++;\r\n if (count == 1) { // record the start position(x,y)\r\n startX = p;\r\n startY = q; // we can reuse y BTW\r\n } else if (count == WIN_SIZE) { // found WIN_SIZE link\r\n return positions[startX][startY];\r\n }\r\n } else {\r\n count = 0;\r\n }\r\n }\r\n }\r\n return null;\r\n }", "function lookupMode(id) {\n return (OPT_MAP[id] || {mode: null}).mode;\n }", "findIndex(pos, side, end, startAt = 0) {\n let arr = end ? this.to : this.from;\n for (let lo = startAt, hi = arr.length;;) {\n if (lo == hi)\n return lo;\n let mid = (lo + hi) >> 1;\n let diff = arr[mid] - pos || (end ? this.value[mid].endSide : this.value[mid].startSide) - side;\n if (mid == lo)\n return diff >= 0 ? lo : hi;\n if (diff >= 0)\n hi = mid;\n else\n lo = mid + 1;\n }\n }", "function _scanWinSizeS(side) {\r\n var x, y, count;\r\n var startX, startY;\r\n // scan the left-top half until y == GRID_SIZE-1\r\n // only need scan to the last possible position\r\n for (y = WIN_SIZE-1; y < GRID_SIZE; ++y) {\r\n x = 0;\r\n count = 0;\r\n for (var p = x, q = y; p < GRID_SIZE && q >= 0; ++p, --q) {\r\n if (positions[p][q].getValue() === side) {\r\n count++;\r\n if (count == 1) { // record the start position(x,y)\r\n startX = p; // we can reuse x BTW\r\n startY = q;\r\n } else if (count == WIN_SIZE) { // found WIN_SIZE link\r\n return positions[startX][startY];\r\n }\r\n } else {\r\n count = 0;\r\n }\r\n }\r\n }\r\n \r\n // scan the right-bottom half until x == GRID_SIZE-1\r\n // only need scan to the last possible position\r\n for (x = 1; x < GRID_SIZE-(WIN_SIZE-1); ++x) {\r\n y = GRID_SIZE-1;\r\n count = 0;\r\n for (var p = x, q = y; p < GRID_SIZE && q >= 0; ++p, --q) {\r\n if (positions[p][q].getValue() === side) {\r\n count++;\r\n if (count == 1) { // record the start position(x,y)\r\n startX = p;\r\n startY = q; // we can reuse y BTW\r\n } else if (count == WIN_SIZE) { // found WIN_SIZE link\r\n return positions[startX][startY];\r\n }\r\n } else {\r\n count = 0;\r\n }\r\n }\r\n }\r\n return null;\r\n }", "function findNeighboring (thing, i , j) {\n var coords = {};\n\n if (A.world[i-1]) {\n // the row above exists....\n if (A.world[i-1][j-1] && A.world[i-1][j-1] === thing) { coords.row = i - 1; coords.col = j - 1; };\n if (A.world[i-1][j] === thing) { coords.row = i - 1; coords.col = j; };\n if (A.world[i-1][j+1] && A.world[i-1][j+1] === thing) { coords.row = i - 1; coords.col = j + 1; };\n }\n if (A.world[i][j-1] && A.world[i][j-1] === thing) { coords.row = i; coords.col = j - 1; }; // the 'current' row\n if (A.world[i][j+1] && A.world[i][j+1] === thing) { coords.row = i; coords.col = j + 1; };\n if (A.world[i+1]) {\n // the row below exists...\n if (A.world[i+1][j-1] && A.world[i+1][j-1] === thing) { coords.row = i + 1; coords.col = j - 1; };\n if (A.world[i+1][j] === thing) { coords.row = i + 1; coords.col = j; };\n if (A.world[i+1][j+1] && A.world[i+1][j+1] === thing) { coords.row = i + 1; coords.col = j + 1; };\n }\n return coords;\n}", "get mode() {}", "function isEditMode(mode) {\r\n // Mutliple edit modes should not be on simultaenously\r\n if (mode == \"any\" && (addChildToggleSwitch.checked || \r\n addLinkToggleSwitch.checked || \r\n removeLinkToggleSwitch.checked || \r\n highlightNextPathToggleSwitch.checked ||\r\n removeNodeToggleSwitch.checked || \r\n editNodeToggleSwitch.checked)) {\r\n return true;\r\n } // Below states are ordered by their least destructive nature \r\n else if (mode == \"highlightPath\" && highlightNextPathToggleSwitch.checked) {\r\n return true;\r\n } else if (mode == \"editNode\" && editNodeToggleSwitch.checked) {\r\n return true;\r\n } else if (mode == \"addChild\" && addChildToggleSwitch.checked) {\r\n return true;\r\n } else if (mode == \"addLink\" && addLinkToggleSwitch.checked) {\r\n return true;\r\n } else if (mode == \"removeLink\" && removeLinkToggleSwitch.checked) {\r\n return true;\r\n } else if (mode == \"removeNode\" && removeNodeToggleSwitch.checked) {\r\n return true;\r\n }\r\n\r\n return false;\r\n}", "function resolveInnerMapMode(currentMode, valueIsDefined, isExactMatch) {\n var innerMode = currentMode;\n if (!valueIsDefined && isExactMatch && !(currentMode & 4 /* SkipTargetProp */)) {\n // case 1: set the mode to apply the targeted prop value if it\n // ends up being encountered in another map value\n innerMode |= 2 /* ApplyTargetProp */;\n innerMode &= ~4 /* SkipTargetProp */;\n }\n else {\n // case 2: set the mode to skip the targeted prop value if it\n // ends up being encountered in another map value\n innerMode |= 4 /* SkipTargetProp */;\n innerMode &= ~2 /* ApplyTargetProp */;\n }\n return innerMode;\n}", "function getMode () {\n if (Object.keys(cli.flags).length > 2) {\n return MODE.ERROR;\n } else if (cli.flags.s) {\n return MODE.SAVE;\n } else if (cli.flags.l) {\n return MODE.LIST;\n } else if (cli.flags.d) {\n return MODE.DELETE;\n } else {\n return MODE.FIND;\n }\n}", "function findKingFront(side, state){\n var sideadd = {S:-1,G:1}\n var kingFront = 00\n var whereking = 00\n var k = side + \"K\"\n var j = side + \"J\"\n for (i in state){\n if (state[i] == k || state[i] == j){\n whereking = i\n }\n }\n var x = parseInt(whereking.charAt(1))\n var y = parseInt(whereking.charAt(2))\n y = y + sideadd[side]\n kingfront = \"B\" + String(x) + String(y)\n return kingfront\n}", "switchMode(arg) {\n let mode = arg;\n // if force mode not provided, switch to opposite of current mode\n if (!mode || mode instanceof MouseEvent)\n mode = this.currentView === 'source' ? 'preview' : 'source';\n if (arg instanceof MouseEvent) {\n if (obsidian.Keymap.isModEvent(arg)) {\n this.app.workspace.duplicateLeaf(this.leaf).then(() => {\n var _a, _b;\n const viewState = (_a = this.app.workspace.activeLeaf) === null || _a === void 0 ? void 0 : _a.getViewState();\n if (viewState) {\n viewState.state = Object.assign(Object.assign({}, viewState.state), { mode: mode });\n (_b = this.app.workspace.activeLeaf) === null || _b === void 0 ? void 0 : _b.setViewState(viewState);\n }\n });\n }\n else {\n this.setState(Object.assign(Object.assign({}, this.getState()), { mode: mode }), {});\n }\n }\n else {\n // switch to preview mode\n if (mode === 'preview') {\n this.currentView = 'preview';\n obsidian.setIcon(this.changeModeButton, 'pencil');\n this.changeModeButton.setAttribute('aria-label', 'Edit (Ctrl+Click to edit in new pane)');\n this.renderPreview(this.recipe);\n this.previewEl.style.setProperty('display', 'block');\n this.sourceEl.style.setProperty('display', 'none');\n }\n // switch to source mode\n else {\n this.currentView = 'source';\n obsidian.setIcon(this.changeModeButton, 'lines-of-text');\n this.changeModeButton.setAttribute('aria-label', 'Preview (Ctrl+Click to open in new pane)');\n this.previewEl.style.setProperty('display', 'none');\n this.sourceEl.style.setProperty('display', 'block');\n this.editor.refresh();\n }\n }\n }", "function main_mode(word) {\n word = word.toLowerCase();\n if (STATE === \"block\") {\n // we're in block mode\n if (word === \"end\") {\n // set stack to JUST the last block\n STACK = BLOCK;\n STATE = \"\";\n } else {\n BLOCK = BLOCK.concat(word);\n }\n } else if (STATE === \"escape\") {\n // we're in escape mode\n // escape the word directly to stack, overwriting\n STACK = word;\n STATE = \"\";\n } else if (STATE === \"append-escape\") {\n // add the escaped word to the stack\n STACK = Array.of(STACK).concat(word);\n STATE = \"\";\n } else if (STATE === \"say\") {\n // we're in speak mode\n speak(word);\n STATE = \"\";\n } else if (STATE === \"listen\") {\n // we're in speak mode\n STACK = word;\n STATE = \"\";\n } else if (STATE === \"as\") {\n // assignment mode\n VARS[word] = STACK;\n STATE = \"\";\n } else if (STATE === \"expect\") {\n // expect mode, based on stack\n // next word is what to expect\n // we don't want to EVER re run old expect\n EXPECT = [];\n EXPECT[0] = word;\n STATE = \"expect2\";\n say(\"then\");\n } else if (STATE === \"expect2\") {\n // next word is what var to run if so\n EXPECT[1] = word;\n STATE = \"expect3\";\n say(\"else\");\n } else if (STATE === \"expect3\") {\n // next word is what var to run if not\n EXPECT[2] = word;\n STATE = \"\";\n // run it\n (EXPECT[0] === STACK) ? VARS[EXPECT[1]].forEach(main_mode): VARS[EXPECT[2]].forEach(main_mode);\n // TODO do we want to reclear STATE when done?\n // STATE = \"\";\n } else if (STATE === \"append\") {\n // we're in append mode\n // are we appending an escape?\n if (word === \"escape\") {\n STATE = \"append-escape\";\n }\n STACK = Array.of(STACK).concat(word);\n } else if (word === \"escape\") {\n // non-escaped, non appended \"escape\"\n STATE = \"escape\"\n } else if (STATE === \"run\") {\n // run a block/var\n VARS[word].forEach(main_mode);\n // return value is now on stack\n STATE = \"\";\n } else if (word === \"end\") {\n // confirm then exit program\n MODE = finalization_mode;\n } else if (word === \"block\") {\n // enter block mode\n STATE = \"block\";\n } else if (word === \"as\") {\n // assignment mode\n STATE = \"as\";\n } else if (word === \"say\") {\n // speak mode\n STATE = \"say\";\n } else if (word === \"listen\") {\n // listen mode\n STATE = \"listen\";\n } else if (word === \"run\") {\n // run mode\n STATE = \"run\";\n } else if (word === \"append\") {\n // append mode\n STATE = \"append\";\n } else if (word === \"expect\") {\n STATE = \"expect\";\n } else {\n // it's a literal, put it on stack\n STACK = word;\n }\n}", "function currentPos(ele, mode, direction) {\n var pos = 0;\n direction || (direction = \"left\");\n if ([\"left\", \"top\"].indexOf(direction) === -1) return 0;\n if (mode === \"transition\" && ele.style.transform) {\n pos = ele.style.transform.match(/\\((-?\\d+)px\\)/i);\n return (pos && pos.length >= 2) ? parseInt(pos[1]) : 0;\n }\n if (mode === \"step\") {\n return parseInt(ele.style[direction] === \"\" ? 0 : ele.style[direction]);\n }\n return 0;\n }", "function getParamMode(operation, paramIndex) {\n // 3 and 2 are the offsets we need to get the first character (R to L) after \n // the opcode, subtract the paramIndex additionally to get future modes\n const start = operation.length - 3 - paramIndex;\n const end = operation.length - 2 - paramIndex;\n return parseInt(operation.slice(start, end) || '0');\n}", "sharedDepth(pos) {\n for (let depth = this.depth; depth > 0; depth--)\n if (this.start(depth) <= pos && this.end(depth) >= pos)\n return depth;\n return 0;\n }", "function mode(vals) {\n vals = numbers(vals)\n if (vals.length === 0) return NaN\n var mode = NaN\n var dist = {}\n\n for (var i = 0; i < vals.length; i++) {\n var value = vals[i]\n var me = dist[value] || 0\n me++\n dist[value] = me\n }\n\n var rank = numbers(Object.keys(dist).sort(function sortMembers(a, b) { return dist[b] - dist[a] }))\n mode = rank[0]\n if (dist[rank[1]] == dist[mode]) {\n // multi-modal\n if (rank.length == vals.length) {\n // all values are modes\n return vals\n }\n var modes = new Set([mode])\n var modeCount = dist[mode]\n for (var i = 1; i < rank.length; i++) {\n if (dist[rank[i]] == modeCount) {\n modes.add(rank[i])\n }\n else {\n break\n }\n }\n return modes\n }\n return mode\n}", "handleAppModeSwitch(mode) {\n this.setState(prevState => {\n if (prevState.mode === mode) {\n return null;\n } else {\n return { mode: mode };\n }\n });\n }", "function findFutureState($state, options) {\n if (options.name) {\n var nameComponents = options.name.split(/\\./);\n if (options.name.charAt(0) === '.')\n nameComponents[0] = $state.current.name;\n while (nameComponents.length) {\n var stateName = nameComponents.join(\".\");\n if ($state.get(stateName, { relative: $state.current }))\n return null; // State is already defined; nothing to do\n if (futureStates[stateName])\n return futureStates[stateName];\n nameComponents.pop();\n }\n }\n\n if (options.url) {\n var matches = [];\n for(var future in futureStates) {\n var matcher = futureStates[future].urlMatcher;\n if (matcher && matcher.exec(options.url)) {\n matches.push(futureStates[future]);\n }\n }\n // Find most specific by ignoring matching parents from matches\n var copy = matches.slice(0);\n for (var i = matches.length - 1; i >= 0; i--) {\n for (var j = 0; j < copy.length; j++) {\n if (matches[i] === copy[j].parentFutureState) matches.splice(i, 1);\n }\n }\n return matches[0];\n }\n }", "function findFutureState($state, options) {\n if (options.name) {\n var nameComponents = options.name.split(/\\./);\n if (options.name.charAt(0) === '.')\n nameComponents[0] = $state.current.name;\n while (nameComponents.length) {\n var stateName = nameComponents.join(\".\");\n if ($state.get(stateName, { relative: $state.current }))\n return null; // State is already defined; nothing to do\n if (futureStates[stateName])\n return futureStates[stateName];\n nameComponents.pop();\n }\n }\n\n if (options.url) {\n var matches = [];\n for(var future in futureStates) {\n var matcher = futureStates[future].urlMatcher;\n if (matcher && matcher.exec(options.url)) {\n matches.push(futureStates[future]);\n }\n }\n // Find most specific by ignoring matching parents from matches\n var copy = matches.slice(0);\n for (var i = matches.length - 1; i >= 0; i--) {\n for (var j = 0; j < copy.length; j++) {\n if (matches[i] === copy[j].parentFutureState) matches.splice(i, 1);\n }\n }\n return matches[0];\n }\n }", "function findMode(inputData){\n var arr= inputData.data;\n var length=arr.length;\n\n let mode=0;\n let count=1;\n let value=0, prev_val=0;\n let prev_count=0;\n let sorted=arr.sort();\n\n for(let i=0;i<length;i++){\n if(sorted[i]==sorted[i+1]){\n count++;\n value=sorted[i];\n }\n else{\n if(count>prev_count){\n prev_count=count;\n prev_val=value;\n }\n count=1;\n }\n }\n count>prev_count ? mode=value : mode=prev_val;\n\n return mode;\n}", "function enterMode(stream, state, mode, opt) {\n if (typeof mode === \"string\")\n mode = CodeMirror.getMode(cmCfg, mode);\n if (!mode || mode[\"name\"] === \"null\") {\n if ('endTag' in opt)\n mode = createDummyMode(opt.endTag);\n else\n mode = (typeof opt.fallbackMode === 'function') && opt.fallbackMode();\n if (!mode)\n throw new Error(\"no mode\");\n }\n state.hmdInnerExitChecker = ('endTag' in opt) ? createSimpleInnerModeExitChecker(opt.endTag) : opt.exitChecker;\n state.hmdInnerStyle = opt.style;\n state.hmdInnerMode = mode;\n state.hmdOverride = modeOverride;\n state.hmdInnerState = CodeMirror.startState(mode);\n var ans = opt.style || \"\";\n if (!opt.skipFirstToken) {\n ans += \" \" + mode.token(stream, state.hmdInnerState);\n }\n return ans.trim();\n }", "getCaseState(x, y) {\n // vérifie que les coordonnées sont dans la grille\n if (x.between(0, 7) && y.between(0, 7)) {\n return this.grid[y][x];\n }\n // sinon la case n'existe pas\n return false;\n }", "cursorAt(pos, side = 0, mode = 0) {\n let scope = CachedNode.get(this) || this.topNode;\n let cursor = new TreeCursor(scope);\n cursor.moveTo(pos, side);\n CachedNode.set(this, cursor._tree);\n return cursor;\n }", "function updateMode(mode) {\n\n // LOOP THROUGH MODES ARRAY AND SELECT/DESELECT AS NEEDED\n for (var i = 0; i < modes.length; i++) {\n // DOM ELEMENT FOR EACH MODE DISPLAY\n var d = document.getElementById(modes[i] + '-display');\n // DOM ELEMENT FOR EACH MODE BUTTON\n var l = document.getElementById(modes[i]);\n\n // LOOP THROUGH MODES TO FIND WHAT WAS SELECTED\n if (mode === modes[i]) {\n // FOR THE SELECTED MODE\n // TOGGLE CORRESPONDING DISPLAY TO DISPLAY\n d.classList.add('active-display');\n // ADD SELECTED CLASS\n l.classList.add('btn-selected');\n // UPDATE ARIA PRESSED STATE\n l.setAttribute('aria-pressed', 'true');\n // SET AS ACTIVE\n activeMode = modes[i];\n } else {\n // FOR THE UNSELECTED MODES\n // HIDE THEIR DISPLAY\n d.classList.remove('active-display');\n // REMOVE SELECTED CLASS\n l.classList.remove('btn-selected');\n // UPDATE ARIA PRESSED STATE\n l.setAttribute('aria-pressed', 'false');\n }\n }\n}", "function modeSwitch(mode) {\n\tresetViews();\n resetCameras();\n\tswitch(mode) {\n\t\tcase \"absolute\":\n\t\t\tupdateShipData(true);\n\t\t\tstepSize = 1; // reset step size\n\t\t\tcurrentMode = 1;\n\t\tbreak;\n\t\tcase \"relative\":\n\t\t\tupdateShipData(false);\n\t\t\tstepSize = Math.PI/64; // reset step size\n\t\t\tcurrentMode = 2;\n\t\tbreak;\n\t\tcase \"geosynchronous\":\n\t\t\tupdateShipData(false);\n\t\t\tcurrentPlanet = 3;\n\t\t\tcurrentMode = 3;\n\t\t\tupdateGeoSyncLookAt(earth, false);\n\t\tbreak;\n\t}\n}", "function setMode(e) {\n console.log(`current mode was: ${currentMode}`);\n currentMode = e.target.getAttribute('id');\n console.log(`current mode is now: ${currentMode}`);\n}", "function selectMode(e){\n\t\t\t\tmode = $(\".mode-select option:selected\").val();\n\n\t\t\t\tif(mode != \"explore\"){\n\t\t\t\t\t$(\".explore\").hide();\n\t\t\t\t\t$(\".stats-table .charged, .stats-table .fast\").hide();\n\t\t\t\t\t$(\".stats-table .\"+mode).show();\n\t\t\t\t\t$(\".move-table-container\").show();\n\n\t\t\t\t\tself.displayMoves();\n\n\t\t\t\t} else{\n\t\t\t\t\t$(\".move-table-container\").hide();\n\t\t\t\t\t$(\".explore\").show();\n\t\t\t\t\t$(\".loading\").hide();\n\t\t\t\t}\n\n\t\t\t\tself.pushHistoryState(mode);\n\t\t\t}", "function getMode(array) {\n if(array.length == 0)\n return null;\n var modeMap = {};\n var maxEl = array[0], maxCount = 1;\n for(var i = 0; i < array.length; i++) {\n var el = array[i];\n if(modeMap[el] == null)\n modeMap[el] = 1;\n else\n modeMap[el]++;\n if(modeMap[el] > maxCount) {\n maxEl = el;\n maxCount = modeMap[el];\n }\n }\n if(maxCount == 1) {\n return array[0];\n }\n return maxEl;\n}", "in_mode(state) {\n return this.state instanceof state;\n }", "function initMode(mode, index) {\n mode.addEventListener('click', (event) => onMode(event, index));\n}", "function parseMode (mode) {\n switch (mode) {\n case 'js':\n case 'javascript':\n mode = 'jsx'\n }\n let syntax = CodeMirror.findModeByName(mode)\n if (syntax == null) syntax = CodeMirror.findModeByName('Plain Text')\n return syntax\n}", "function mode(vals) {\n vals = numbers(vals)\n if (vals.length === 0) return NaN\n var mode = NaN\n var dist = {}\n vals.forEach(function (n) {\n var me = dist[n] || 0\n me++\n dist[n] = me\n })\n var rank = numbers(Object.keys(dist).sort(function (a, b) { return dist[b] - dist[a] }))\n mode = rank[0]\n if (dist[rank[1]] == dist[mode]) {\n // Multiple modes found, abort\n return NaN\n }\n return mode\n}", "isMode(mode) {\n return this.state.mode === mode;\n }", "function Context (state, mode, depth, prev) {\n this.state = state; this.mode = mode; this.depth = depth; this.prev = prev;\n}", "targetNodeMode() {\n this.setState(\n {\n entryNodeMode: false,\n targetNodeMode: true,\n wallMode: false,\n },\n function () {\n console.log('targetnodemode', this.state);\n }\n );\n }", "function getcurrstate() {\n if (modestate.curr[0] == 1) {\n prepaddreq();\n }\n else if (modestate.curr[1] == 1) {\n prepdisplayreq();\n }\n else if (modestate.curr[2] == 1) {\n return; //Relation mode not implemented in this version.\n }\n else {\n console.log(\"ERROR: getcurrstate()\");\n }\n}", "getStatePoint(stateX, stateY, radius, outsideX, outsideY) {\n let A = new Point(outsideX,outsideY);\n let B = new Point(stateX,stateY);\n\n let opposite = A.y-B.y;\n let adjacent = A.x-B.x;\n\n let theta = Math.atan(opposite/adjacent);\n\n let P = new Point(Math.cos(theta)*radius, Math.sin(theta)*radius)\n\n if(adjacent < 0) {\n P.x *= -1;\n P.y *= -1;\n }\n P.x += B.x;\n P.y += B.y;\n\n return P;\n }", "function search(state, character) {\n return TF[states.indexOf(state)][character.charCodeAt()];\n}", "getPosition(absState) {\n return absState % (this._w + 1);\n }", "function Context(state, mode, depth, prev) {\n this.state = state; this.mode = mode; this.depth = depth; this.prev = prev\n }", "function Context(state, mode, depth, prev) {\n this.state = state; this.mode = mode; this.depth = depth; this.prev = prev\n }", "function Context(state, mode, depth, prev) {\n this.state = state; this.mode = mode; this.depth = depth; this.prev = prev\n }", "function getEditMode() {\r\n var mode = $('#editTreeForm').find('input:checked').val();\r\n return mode;\r\n}", "function get_rank2_mode(period, generator, size, numdown = 0) {\n let degrees = [];\n let modeOut = [];\n var interval;\n\n interval = generator * -numdown;\n for (var n = 0; n < size; n++) {\n while (interval < 0) {\n interval += period;\n }\n if (interval >= period) {\n interval %= period;\n }\n degrees.push(interval);\n interval += generator;\n }\n\n degrees.sort(function (a, b) {\n return a - b;\n });\n for (var n = 1; n < degrees.length; n++) {\n modeOut.push(degrees[n] - degrees[n - 1]);\n }\n\n modeOut.push(period - degrees[degrees.length - 1]);\n\n return modeOut;\n}", "function mode1_onclick(e) {\n var x = Math.floor((e.offsetX) / brickSize);\n var y = Math.floor((e.offsetY) / brickSize);\n\n if(!checkBounds(x, y)) return;\n\n if(selected) {\n var sx = selected.x;\n var sy = selected.y;\n if(adjacent(x, y, sx, sy)) {\n if((!bricks[x][y] || !bricks[x][y].set)) {\n swap(x, y, sx, sy);\n }\n selected = null;\n } else {\n selected = (x == sx && y == sy) ? null : {x: x, y: y};\n }\n } else if(bricks[x][y] && !bricks[x][y].set) {\n selected = {x: x, y: y};\n } else {\n selected = null;\n }\n}", "get STATE_IDX() { return 0; }", "getPosition(gid, eid, findAlt){\n let container = document.querySelector(`${this.eCfg.selector} > svg`).getBoundingClientRect();\n let e = document.querySelector(`${this.eCfg.selector} > svg > #${gid} > #${eid}`).getBoundingClientRect();\n if (findAlt){\n let eAlt = document.querySelector(`${this.eCfg.selector} > svg > #${gid} > #${eid}-alt`)\n if (eAlt) eAlt = eAlt.getBoundingClientRect();\n if (eAlt) e = eAlt;\n }\n return {left:(e.left-container.left)+(e.width/2), top:(e.top-container.top)+(e.height/2)};\n }", "function getNeighbor(whence, dir) {\n if (whence < 0 || whence >= msize || dir < 0 || dir > 3) {\n alert(\"Internal argument error; dir: \" + dir + \"; whence: \" + whence);\n return -1;\n }\n\n //North\n if (dir == 0) {\n if (whence >= width) {\n return whence - width;\n } else {\n return -1;\n }\n }\n\n //South\n if (dir == 3) {\n if (whence + width < msize) {\n return whence + width;\n } else {\n return -1;\n }\n }\n\n //West\n if (dir == 2) {\n if (whence % width != 0) {\n return whence - 1;\n } else {\n return -1;\n }\n }\n\n //East\n if (dir == 1) {\n if ((whence + 1) % width != 0) {\n return whence + 1;\n } else {\n return -1;\n }\n }\n\n return -1;\n }", "function MeanMode(arr) {\n //Find mean\n var sum = 0;\n \n for (i=0; i< arr.length; i++) { //Loop sums up all the elements in the array\n sum = sum + arr[i];\n }\n \n var mean = sum / arr.length; //Loop then divides the sum by the number of elements to get the mean\n \n //Find mode\n \n var modeCount = [];\n \n for (i=0; i < arr.length; i++) { //Loop goes through the array, while another loop goes through the array\n modeCount[i] = -1; //Starts at -1 to factor in an element matching with itself\n for (j=0; j < arr.length; j++) {\n if (arr[i] === arr[j]) {\n modeCount[i]++; //If a match is made then the modeCount is increased by one\n }\n }\n }\n \n var largestCountNumber = 0;\n var indexOfLargest = 0;\n \n for (i=0; i < arr.length; i++) { //Loop goes through the modeCount array to find the index of the largest count\n if (largestCountNumber < modeCount[i]) {\n largestCountNumber = modeCount[i];\n indexOfLargest = i;\n }\n }\n \n if (largestCountNumber === 0) { //If the largest count is 0 then there is no mode, 0 is returned\n return 0\n }\n \n mode = arr[indexOfLargest]; //The mode is found by inputting the index of the largest count into the original array\n \n if (mean === mode) { //If the mean is equal to the mode then 1 is returned\n return 1\n }\n \n else { //Otherwise 0 is returned\n return 0\n }\n}", "function GetPath() : int {\n\t\tnumberOfHops = 0; \n\t\tvar ToMovePos : int; \n\t\tvar i : int = 0;\n\t\tfor(var a : int = 0; a < ClosedNodes.Length; a++){ \n\t\t\tif (ClosedNodes[a] != 0){ \n\t\t\t\ti++; \n\t\t\t\t//Debug.Log(parent_Closed[a]+\" \"+ClosedNodes[a]);\n\t\t\t\t } }\n\t\tvar match_name = targetLeaf;\n\t\tfor(var b : int = (i-1); b >= 0 ; b--){\n\t\t\tif (ClosedNodes[b] == match_name){\n\t\t\t\tnumberOfHops++;\n\t\t\t\t//Debug.Log(parent_Closed[b]);\n\t\t\t\tmatch_name = parent_Closed[b];\n\t\t\t\tif (match_name == frogLeaf ){\n\t\t\t\t\tToMovePos = ClosedNodes[b];\n\t\t\t\t\tb = -20;\n\t\t\t\t\t//Debug.Log(\"ToMovePos \"+ToMovePos);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn ToMovePos;\n\t}", "function getModeById(mode_id, callback) {\n\tvar sql = \"select mode.name, alterations.* from mode join alterations on alterations.mode_id = mode.id where mode.id = $1;\";\n\t// bind parameters\n\tvar params = [mode_id];\n\t// log it\n\t// console.log(sql);\n\n\tpool.query(sql, params, function(error, db_results) {\n\n\t\tif (error) {\n\t\t\tthrow error;\n\t\t} else {\n\t\t\t// log it\n\t\t\t// console.log(\"Back from DB with:\");\n\t\t\t// console.log(db_results);\n\t\t\t\n\t\t\tvar results = {\n\t\t\t\tkeyAlterations:db_results.rows\n\t\t\t};\n\t\t\tcallback(null, results);\n\t\t}\n\t});\n}", "function whatModeIsSelected() {\n\tvar option;\n\t$(\".mode\").each(function() {\t\t\n\t\tif($(this).hasClass(\"selected\")) {\n\t\t\toption = $(this).text();\n\t\t}\t\t\t\t\t\n\t});\n\treturn option;\t\t\n}", "findInBlock(n, b) {\n // Find the block\n let ib = Math.floor(b/B);\n let jb = b%B;\n let m=new Array();\n for (let i=ib*B; i<ib*B+B; i++) {\n for (let j=jb*B; j<jb*B+B; j++) {\n if (this.state[i][j] == X && this.options[i][j].indexOf(n) > -1) {\n m.push({i,j});\n }\n }\n }\n return m;\n }", "nextState(x, y) {\n let neighbors = this.liveNeighbors(x, y)\n let cellStatus = this.getCell(x, y)\n\n if(cellStatus == ALIVE) {\n if(neighbors != 2 && neighbors != 3) {\n return DEAD\n }\n return ALIVE\n }\n else {\n if(neighbors == 3){\n return ALIVE\n }\n return DEAD\n }\n }", "getDiff(start, end, mode) {\n\t\treturn end.diff(start, mode);\n\t}", "handleClick (event) {\n let mode = this.state.mode;\n \n // #1\n if (mode === \"paint\") {\n this.paint(event);\n }\n // #2\n else if (mode === \"erase\") {\n\n }\n // #3\n else if (mode === \"fill\") {\n \n }\n // #4\n else if (mode === \"mirror\") {\n \n }\n }", "function createModeMethods(pcdTool) {\n const modeMethods = {\n 'edit': {\n prevHover: null,\n mode: null,\n startParam: null,\n animate: function () {\n if (pcdTool._cameraControls.enabled) {\n pcdTool.redrawRequest();\n pcdTool._cameraControls.update();\n }\n },\n mouseDown: function (e) {\n // Enable orbit control\n pcdTool._cameraControls.enabled = true;\n\n let pos = pcdTool.getIntersectPos(e);\n if (this.prevHover !== null && this.prevHover.type === 'top') {\n pos = pcdTool.getZPos(e, this.prevHover.bbox.box.pos);\n }\n\n // Move the selected box\n if (pos != null && this.prevHover !== null) {\n // Disable orbit control\n pcdTool._cameraControls.enabled = false;\n\n this.mode = 'move';\n const startParam = {\n size: this.prevHover.bbox.box.size.clone(),\n pos: this.prevHover.bbox.box.pos.clone(),\n yaw: this.prevHover.bbox.box.yaw,\n mouse: pos.clone()\n };\n if (this.prevHover.type === 'edge') {\n pcdTool.setMouseType('grabbing');\n const p = startParam.pos,\n s = startParam.size;\n const sign = new THREE.Vector2(\n ...[\n [1, 1],\n [-1, 1],\n [1, -1],\n [-1, -1]\n ][this.prevHover.idx]\n );\n const diag = new THREE.Vector2(s.x, s.y)\n .multiply(sign)\n .rotateAround(ZERO2, startParam.yaw);\n startParam.fix = new THREE.Vector2(\n p.x - diag.x / 2,\n p.y - diag.y / 2\n );\n startParam.diag = diag;\n startParam.diagYaw = Math.atan2(diag.y, diag.x);\n }\n this.startParam = startParam;\n pcdTool._modeStatus.busy = true;\n pcdTool.props.controls.selectLabel(this.prevHover.bbox.label);\n this.prevHover.bbox.label.createHistory();\n return;\n }\n\n // Select a box or create a new box\n if (pos != null) {\n if (pcdTool.props.controls.state.isCreationKeyPressed) {\n // Disable orbit control\n pcdTool._cameraControls.enabled = false;\n\n pcdTool._creatingBBox.startPos = pos;\n pcdTool._modeStatus.busy = true;\n this.mode = 'create';\n }\n pcdTool.props.controls.selectLabel(null);\n return;\n }\n this.mode = null;\n },\n resetHoverObj: function () {\n pcdTool._editFaceCube.visible = false;\n },\n setHoverObjZ: function (bbox, normal) {\n const cube = pcdTool._editFaceCube;\n const yaw = bbox.box.yaw;\n const size = bbox.box.size;\n const w = EDIT_OBJ_SIZE;\n cube.rotation.set(0, 0, yaw);\n const p = bbox.box.pos;\n cube.position.set(\n p.x,\n p.y,\n p.z + normal.z * (bbox.box.size.z + w) / 2\n );\n cube.scale.set(size.x, size.y, w);\n cube.visible = true;\n pcdTool.redrawRequest();\n },\n setHoverObj: function (bbox, normal) {\n const cube = pcdTool._editFaceCube;\n const yaw = bbox.box.yaw;\n const size = bbox.box.size;\n // set rotation\n cube.rotation.set(\n 0, //normal.y*Math.PI/2,\n 0, //normal.x*Math.PI/2,\n yaw\n );\n const w = EDIT_OBJ_SIZE;\n const cubeOffset = new THREE.Vector3(\n normal.x * w / 2,\n normal.y * w / 2,\n 0\n );\n const cubeSize = new THREE.Vector3(\n normal.x ? w : size.x,\n normal.y ? w : size.y,\n size.z\n );\n // set pos\n const p = bbox.box.pos.clone()\n .add(\n bbox.box.size.clone()\n .multiply(normal)\n .divideScalar(2)\n .add(cubeOffset)\n .applyAxisAngle(AXES[2], yaw)\n );\n cube.position.set(p.x, p.y, p.z);\n // set pos\n /*\n const nn = normal.clone().multiply(normal);\n const width = (new THREE.Vector3(size.z, size.x, size.x))\n .dot(nn),\n height= (new THREE.Vector3(size.y, size.z, size.y))\n .dot(nn);\n plane.scale.set(width, height, 1);\n */\n cube.scale.set(\n cubeSize.x,\n cubeSize.y,\n cubeSize.z\n );\n // set status\n cube.visible = true;\n pcdTool.redrawRequest();\n },\n resetHover: function () {\n this.resetHoverObj();\n if (this.prevHover == null) {\n return;\n }\n const bbox = this.prevHover.bbox;\n bbox.hover(false);\n pcdTool.redrawRequest();\n this.prevHover = null;\n },\n EDGE_NORMALS: [\n new THREE.Vector3(1, 1, 0),\n new THREE.Vector3(-1, 1, 0),\n new THREE.Vector3(1, -1, 0),\n new THREE.Vector3(-1, -1, 0),\n ],\n mouseMoveEdgeIntersectCheck: function (ray) {\n const bboxes = Array.from(pcdTool.pcdBBoxes);\n for (let i = 0; i < bboxes.length; ++i) {\n const bbox = bboxes[i];\n for (let j = 0; j < 4; ++j) {\n const edge = bbox.cube.edges[j];\n const intersectPos = ray.intersectObject(edge);\n if (intersectPos.length > 0) {\n if (this.prevHover &&\n this.prevHover.type === 'edge' &&\n this.prevHover.bbox === bbox &&\n this.prevHover.idx === j) {\n return true;\n }\n this.resetHover();\n pcdTool.setMouseType('grab');\n const normal = this.EDGE_NORMALS[j];\n this.setHoverObj(bbox, normal);\n this.prevHover = {\n type: 'edge',\n bbox: bbox,\n idx: j\n };\n pcdTool.redrawRequest();\n return true;\n }\n }\n }\n return false;\n },\n CORNER_NORMALS: [\n new THREE.Vector3(1, 0, 0),\n new THREE.Vector3(0, 1, 0),\n new THREE.Vector3(-1, 0, 0),\n new THREE.Vector3(0, -1, 0),\n ],\n TOP_NORMALS: [\n new THREE.Vector3(0, 0, 1),\n new THREE.Vector3(0, 0, -1),\n ],\n mouseMoveCornerIntersectCheck: function (ray) {\n const bboxes = Array.from(pcdTool.pcdBBoxes);\n for (let i = 0; i < bboxes.length; ++i) {\n const bbox = bboxes[i];\n for (let j = 0; j < 4; ++j) {\n const corner = bbox.cube.corners[j];\n const intersectPos = ray.intersectObject(corner);\n if (intersectPos.length > 0) {\n if (this.prevHover &&\n this.prevHover.type === 'corner' &&\n this.prevHover.bbox === bbox &&\n this.prevHover.idx === j) {\n return true;\n }\n this.resetHover();\n pcdTool.setMouseType('ew-resize');\n const normal = this.CORNER_NORMALS[j];\n this.setHoverObj(bbox, normal);\n this.prevHover = {\n type: 'corner',\n bbox: bbox,\n idx: j\n };\n pcdTool.redrawRequest();\n return true;\n }\n }\n }\n return false;\n },\n mouseMoveTopIntersectCheck: function (ray) {\n const bboxes = Array.from(pcdTool.pcdBBoxes);\n for (let i = 0; i < bboxes.length; ++i) {\n const bbox = bboxes[i];\n for (let j = 0; j < 2; ++j) {\n const corner = bbox.cube.zFace[j];\n const intersectPos = ray.intersectObject(corner);\n if (intersectPos.length > 0) {\n if (this.prevHover &&\n this.prevHover.type === 'top' &&\n this.prevHover.bbox === bbox &&\n this.prevHover.idx === j) {\n return true;\n }\n this.resetHover();\n pcdTool.setMouseType('ns-resize');\n const normal = this.TOP_NORMALS[j];\n this.setHoverObjZ(bbox, normal);\n this.prevHover = {\n type: 'top',\n bbox: bbox,\n idx: j\n };\n pcdTool.redrawRequest();\n return true;\n }\n }\n }\n return false;\n },\n mouseMoveIntersectCheck: function (ray) {\n const bboxes = Array.from(pcdTool.pcdBBoxes);\n for (let i = 0; i < bboxes.length; ++i) {\n const bbox = bboxes[i];\n const intersectPos = ray.intersectObject(bbox.cube.mesh);\n if (intersectPos.length > 0) {\n if (this.prevHover &&\n this.prevHover.type === 'box' &&\n this.prevHover.bbox === bbox) {\n return true;\n }\n this.resetHover();\n bbox.hover(true);\n pcdTool.setMouseType('all-scroll');\n this.prevHover = {\n type: 'box',\n bbox: bbox\n };\n pcdTool.redrawRequest();\n return true;\n }\n }\n return false;\n },\n // resize and rotate\n mouseMoveRotateResize: function (bbox, prev, dx, dy) {\n const dp = new THREE.Vector2(dx, dy).add(prev.diag);\n const yaw = Math.atan2(dp.y, dp.x) - prev.diagYaw + prev.yaw;\n let size = dp.clone().rotateAround(ZERO2, -yaw);\n size.x = Math.abs(size.x);\n size.y = Math.abs(size.y);\n size = bbox.setSize2(size.x, size.y);\n const dpLen = dp.length();\n const pos = dp.multiplyScalar(size.length())\n .divideScalar(dpLen * 2).add(prev.fix);\n bbox.box.pos.set(pos.x, pos.y, bbox.box.pos.z);\n bbox.box.yaw = yaw;\n },\n // resize one side size\n mouseMoveResizeXP: function (bbox, prev, dx, dy) {\n const prevSize = prev.size;\n const dsize = bbox.setSize2d(prevSize.x + dx, prevSize.y)\n .divideScalar(2);\n bbox.box.pos.add(new THREE.Vector3(dsize.x, dsize.y, 0));\n },\n mouseMoveResizeXN: function (bbox, prev, dx, dy) {\n const prevSize = prev.size;\n const dsize = bbox.setSize2d(prevSize.x - dx, prevSize.y)\n .divideScalar(2);\n bbox.box.pos.sub(new THREE.Vector3(dsize.x, dsize.y, 0));\n },\n mouseMoveResizeYP: function (bbox, prev, dx, dy) {\n const prevSize = prev.size;\n const dsize = bbox.setSize2d(prevSize.x, prevSize.y + dy)\n .divideScalar(2);\n bbox.box.pos.add(new THREE.Vector3(dsize.x, dsize.y, 0));\n },\n mouseMoveResizeYN: function (bbox, prev, dx, dy) {\n const prevSize = prev.size;\n const dsize = bbox.setSize2d(prevSize.x, prevSize.y - dy)\n .divideScalar(2);\n bbox.box.pos.sub(new THREE.Vector3(dsize.x, dsize.y, 0));\n },\n // resize z size\n mouseMoveResizeZP: function (bbox, prev, dz) {\n const prevSize = prev.size;\n const dsize = bbox.setSizeZ(prevSize.z + dz) / 2;\n bbox.box.pos.add(new THREE.Vector3(0, 0, dsize));\n },\n mouseMoveResizeZN: function (bbox, prev, dz) {\n const prevSize = prev.size;\n const dsize = bbox.setSizeZ(prevSize.z - dz) / 2;\n bbox.box.pos.sub(new THREE.Vector3(0, 0, dsize));\n },\n mouseMove: function (e) {\n if (this.mode === 'move') {\n const bbox = this.prevHover.bbox;\n const prev = this.startParam;\n\n const pos = this.prevHover.type !== 'top'\n ? pcdTool.getIntersectPos(e)\n : pcdTool.getZPos(e, prev.pos);\n if (pos == null) {\n return;\n }\n const dx = pos.x - prev.mouse.x;\n const dy = pos.y - prev.mouse.y;\n const dz = pos.z - prev.mouse.z;\n\n if (this.prevHover.type === 'box') {\n bbox.box.pos.set(prev.pos.x + dx, prev.pos.y + dy, prev.pos.z);\n } else if (this.prevHover.type === 'edge') {\n this.mouseMoveRotateResize(bbox, prev, dx, dy);\n\n const idx = this.prevHover.idx;\n const normal = this.EDGE_NORMALS[idx];\n this.setHoverObj(bbox, normal);\n } else if (this.prevHover.type === 'corner') {\n const yaw = bbox.box.yaw;\n let dp = new THREE.Vector2(dx, dy);\n dp = dp.rotateAround(ZERO2, -yaw);\n const idx = this.prevHover.idx;\n [\n this.mouseMoveResizeXP,\n this.mouseMoveResizeYP,\n this.mouseMoveResizeXN,\n this.mouseMoveResizeYN\n ][idx](bbox, prev, dp.x, dp.y);\n\n const normal = this.CORNER_NORMALS[idx];\n this.setHoverObj(bbox, normal);\n } else if (this.prevHover.type === 'top') {\n const idx = this.prevHover.idx;\n [\n this.mouseMoveResizeZP,\n this.mouseMoveResizeZN\n ][idx](bbox, prev, dz);\n\n const normal = this.TOP_NORMALS[idx];\n this.setHoverObjZ(bbox, normal);\n }\n bbox.updateCube(true);\n pcdTool.redrawRequest();\n return;\n }\n\n if (pcdTool._creatingBBox.startPos != null) {\n this.resetHover();\n const pos = pcdTool.getIntersectPos(e);\n if (pos == null) {\n return;\n }\n const bbox = pcdTool._creatingBBox;\n bbox.endPos = pos;\n const dist = bbox.endPos.distanceTo(bbox.startPos);\n if (bbox.box == null && dist > 0.01) {\n bbox.box = new BoxFrameObject();\n bbox.box.addTo(pcdTool._scene);\n bbox.box.setColor('#fff');\n }\n if (bbox.box != null) {\n pcdTool.creatingBoxUpdate();\n pcdTool.redrawRequest();\n }\n return;\n }\n\n const ray = pcdTool.getRay(e);\n if (this.mouseMoveIntersectCheck(ray)) {\n return;\n }\n if (pcdTool._camera.rotation.x < Math.PI / 180 * 45) {\n if (this.mouseMoveCornerIntersectCheck(ray)) {\n return;\n }\n } else {\n if (this.mouseMoveTopIntersectCheck(ray)) {\n return;\n }\n }\n if (this.mouseMoveEdgeIntersectCheck(ray)) {\n return;\n }\n this.resetHover();\n pcdTool.resetMouseType();\n },\n mouseUp: function (e) {\n const mode = this.mode;\n this.mode = null;\n\n // Enable orbit control\n pcdTool._cameraControls.enabled = true;\n\n if (mode === 'move') {\n const box = this.prevHover.bbox.box;\n if (!this.startParam.size.equals(box.size) ||\n !this.startParam.pos.equals(box.pos) ||\n this.startParam.yaw !== box.yaw) {\n this.prevHover.bbox.label.addHistory();\n }\n }\n if (mode === 'create') {\n const bbox = pcdTool._creatingBBox;\n if (bbox.box == null) {\n if (bbox.startPos != null) {\n bbox.startPos = null;\n bbox.endPos = null;\n }\n return;\n }\n const pos = pcdTool.getIntersectPos(e);\n if (pos != null) {\n bbox.endPos = pos;\n }\n pcdTool.creatingBoxUpdate();\n const boxPos = bbox.box.getPos();\n const boxSize = bbox.box.getSize();\n const boxYaw = bbox.box.getYaw();\n const pcdBBox = new PCDBBox(pcdTool, {\n 'x_3d': boxPos.x,\n 'y_3d': boxPos.y,\n 'z_3d': -0.5,\n 'width_3d': boxSize.x,\n 'height_3d': boxSize.y,\n 'length_3d': boxSize.z,\n 'rotation_y': boxYaw,\n });\n // TODO: add branch use selecting label\n const label = pcdTool.props.controls.createLabel(\n pcdTool.props.controls.getTargetKlass(),\n {[pcdTool.candidateId]: pcdBBox}\n );\n bbox.box.removeFrom(pcdTool._scene);\n pcdTool.redrawRequest();\n bbox.startPos = null;\n bbox.endPos = null;\n bbox.box = null;\n }\n },\n changeFrom: function () {\n pcdTool._cameraControls.enabled = false;\n },\n changeTo: function () {\n pcdTool._cameraControls.enabled = true;\n //pcdTool._main.css('cursor', 'crosshair');\n },\n },\n 'view': {\n animate: function () {\n pcdTool.redrawRequest();\n pcdTool._cameraControls.update();\n },\n mouseDown: function (e) {\n pcdTool._modeStatus.busy = true;\n },\n mouseMove: function (e) {\n },\n mouseUp: function (e) {\n },\n changeFrom: function () {\n pcdTool._cameraControls.enabled = false;\n },\n changeTo: function () {\n pcdTool._cameraControls.enabled = true;\n //pcdTool._main.css('cursor', 'all-scroll');\n },\n },\n };\n return modeMethods;\n}", "function stateIndex(X) {\n for (let i = 0; i < newState.length; i++) {\n if (newState[i].includes(X))\n return i;\n }\n}", "cursor(mode = 0) {\n return new TreeCursor(this.topNode, mode);\n }", "function getStateFromUi() {\n \n var state = {\n tab: getSelectedTab(),\n selectedPeriodOffset: getSelectedPeriodOffset(),\n selectedGroup: getSelectedGroup(),\n selectedIndividual: getSelectedIndividual()\n };\n \n if(state.selectedIndividual !== null) {\n state.mode = MODE.INDIVIDUAL;\n } else if(state.selectedIndividual === null && state.selectedGroup !== null) {\n state.mode = MODE.GROUP;\n } else {\n state.mode = MODE.FLEET;\n }\n \n return state;\n }", "function findMode(arr){\n let arrangedNums = frequencyCounter(arr);\n\n\n let count = 0;\n let mode;\n\n for(let key in arrangedNums){\n if(arrangedNums[key] > count){\n mode = key;\n count = arrangedNums[key];\n }\n }\n\n return +mode;\n}", "handleSquareSelection(position) {\n this.setState((prevState) => {\n let { knightPosition } = prevState;\n if (!knightPosition) {\n knightPosition = position;\n }\n return { knightPosition };\n });\n }", "function runMode(cm, text, mode, state, f) {\n var flattenSpans = mode.flattenSpans;\n if (flattenSpans == null) flattenSpans = cm.options.flattenSpans;\n var curStart = 0, curStyle = null;\n var stream = new StringStream(text, cm.options.tabSize), style;\n if (text == \"\" && mode.blankLine) mode.blankLine(state);\n while (!stream.eol()) {\n if (stream.pos > cm.options.maxHighlightLength) {\n flattenSpans = false;\n // Webkit seems to refuse to render text nodes longer than 57444 characters\n stream.pos = Math.min(text.length, stream.start + 50000);\n style = null;\n } else {\n style = mode.token(stream, state);\n }\n if (!flattenSpans || curStyle != style) {\n if (curStart < stream.start) f(stream.start, curStyle);\n curStart = stream.start; curStyle = style;\n }\n stream.start = stream.pos;\n }\n if (curStart < stream.pos) f(stream.pos, curStyle);\n }" ]
[ "0.7568635", "0.7568635", "0.7557315", "0.7557315", "0.7557315", "0.7557315", "0.7557315", "0.7557315", "0.7557315", "0.7557315", "0.7557315", "0.7557315", "0.7557315", "0.75532556", "0.7467847", "0.74235874", "0.59452957", "0.5686343", "0.5346445", "0.525255", "0.49554074", "0.4880111", "0.4864949", "0.48454696", "0.47717175", "0.47434247", "0.47164556", "0.4689638", "0.4685793", "0.4679725", "0.46787983", "0.46782798", "0.466459", "0.46333796", "0.46060494", "0.45973572", "0.45968118", "0.45634407", "0.45626566", "0.45626566", "0.45537275", "0.4551514", "0.45436776", "0.4536105", "0.45312187", "0.4526196", "0.45260125", "0.45256996", "0.45172194", "0.451503", "0.44952965", "0.4484367", "0.4478492", "0.44585386", "0.4443536", "0.44391453", "0.44339225", "0.44319504", "0.44299564", "0.44260556", "0.44190922", "0.44190922", "0.44190922", "0.4413194", "0.44116092", "0.44104424", "0.4403129", "0.43983194", "0.4385598", "0.43854302", "0.4382342", "0.43815154", "0.43814513", "0.43798953", "0.43675077", "0.4359623", "0.4354575", "0.4341897", "0.433487", "0.43236017", "0.4317922", "0.4315017", "0.43087712", "0.43049055" ]
0.7568082
16
Find the line object corresponding to the given line number.
function getLine(doc, n) { n -= doc.first; if (n < 0 || n >= doc.size) { throw new Error("There is no line " + (n + doc.first) + " in the document.") } var chunk = doc; while (!chunk.lines) { for (var i = 0;; ++i) { var child = chunk.children[i], sz = child.chunkSize(); if (n < sz) { chunk = child; break } n -= sz; } } return chunk.lines[n] }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function code_line(code, line) {\n return code.findIndex(l => l.line === line)\n}", "function getSourceLine(lineNo) {\n\t\tif ((lineNo >= 1) && (lineNo <= sourceList.length)) {\n\t\t\treturn sourceList[lineNo - 1];\n\t\t}\n\t\telse {\n\t\t\treturn null;\n\t\t}\n\t}", "getLine(x, y) {\n var cell = this.getCell(x, y)\n if (cell == null) return null\n if (cell.type !== 'line') return null\n return cell.line\n }", "function findDA(source, lineNumber) {\n\tfor (var i=0; i < source.length; i++) {\n\t\tif (source[i].lineNumber === lineNumber) {\n\t\t\treturn source[i];\n\t\t}\n\t}\n\treturn null;\n}", "function getLineItem(primaryLineNumber) {\n\t\t\treturn mainLineItemCollection.getLineItem(primaryLineNumber);\n\n\t\t}", "line(n) {\n if (n < 1 || n > this.lines)\n throw new RangeError(`Invalid line number ${n} in ${this.lines}-line document`);\n return this.lineInner(n, true, 1, 0);\n }", "getLine(message, lineText) {\n const messageSplit = message.split('\\n');\n const line = messageSplit[messageSplit.findIndex(e => e.includes(lineText))];\n if (line) return line;\n throw new Error('Unable to find desired text within the message');\n }", "function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n { return cm.display.view[findViewIndex(cm, lineN)] }\n var ext = cm.display.externalMeasured\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n { return ext }\n}", "function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n { return cm.display.view[findViewIndex(cm, lineN)] }\n var ext = cm.display.externalMeasured\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n { return ext }\n}", "function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n { return cm.display.view[findViewIndex(cm, lineN)] }\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n { return ext }\n}", "function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n { return cm.display.view[findViewIndex(cm, lineN)] }\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n { return ext }\n}", "function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n { return cm.display.view[findViewIndex(cm, lineN)] }\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n { return ext }\n}", "function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n { return cm.display.view[findViewIndex(cm, lineN)] }\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n { return ext }\n}", "function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n { return cm.display.view[findViewIndex(cm, lineN)] }\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n { return ext }\n}", "function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n { return cm.display.view[findViewIndex(cm, lineN)] }\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n { return ext }\n}", "function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n { return cm.display.view[findViewIndex(cm, lineN)] }\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n { return ext }\n}", "function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n { return cm.display.view[findViewIndex(cm, lineN)] }\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n { return ext }\n}", "function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n { return cm.display.view[findViewIndex(cm, lineN)] }\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n { return ext }\n}", "function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n { return cm.display.view[findViewIndex(cm, lineN)] }\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n { return ext }\n}", "function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n { return cm.display.view[findViewIndex(cm, lineN)] }\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n { return ext }\n}", "function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n return cm.display.view[findViewIndex(cm, lineN)];\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n return ext;\n }", "function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n return cm.display.view[findViewIndex(cm, lineN)];\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n return ext;\n }", "function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n return cm.display.view[findViewIndex(cm, lineN)];\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n return ext;\n }", "function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n return cm.display.view[findViewIndex(cm, lineN)];\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n return ext;\n }", "function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n return cm.display.view[findViewIndex(cm, lineN)];\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n return ext;\n }", "function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n return cm.display.view[findViewIndex(cm, lineN)];\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n return ext;\n }", "function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n return cm.display.view[findViewIndex(cm, lineN)];\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n return ext;\n }", "function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n return cm.display.view[findViewIndex(cm, lineN)];\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n return ext;\n }", "function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n { return cm.display.view[findViewIndex(cm, lineN)] }\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n { return ext }\n }", "function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n { return cm.display.view[findViewIndex(cm, lineN)] }\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n { return ext }\n }", "function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n { return cm.display.view[findViewIndex(cm, lineN)] }\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n { return ext }\n }", "function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n { return cm.display.view[findViewIndex(cm, lineN)] }\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n { return ext }\n }", "function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n { return cm.display.view[findViewIndex(cm, lineN)] }\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n { return ext }\n }", "function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n { return cm.display.view[findViewIndex(cm, lineN)] }\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n { return ext }\n }", "function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n { return cm.display.view[findViewIndex(cm, lineN)] }\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n { return ext }\n }", "function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n { return cm.display.view[findViewIndex(cm, lineN)] }\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n { return ext }\n }", "function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n { return cm.display.view[findViewIndex(cm, lineN)] }\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n { return ext }\n }", "function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n { return cm.display.view[findViewIndex(cm, lineN)] }\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n { return ext }\n }", "function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n { return cm.display.view[findViewIndex(cm, lineN)] }\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n { return ext }\n }", "function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n { return cm.display.view[findViewIndex(cm, lineN)] }\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n { return ext }\n }", "function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n { return cm.display.view[findViewIndex(cm, lineN)] }\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n { return ext }\n }", "function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n { return cm.display.view[findViewIndex(cm, lineN)] }\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n { return ext }\n }", "function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n { return cm.display.view[findViewIndex(cm, lineN)] }\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n { return ext }\n }", "function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n { return cm.display.view[findViewIndex(cm, lineN)] }\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n { return ext }\n }", "function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n { return cm.display.view[findViewIndex(cm, lineN)] }\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n { return ext }\n }", "function findViewForLine(cm, lineN) {\r\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\r\n { return cm.display.view[findViewIndex(cm, lineN)] }\r\n var ext = cm.display.externalMeasured;\r\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\r\n { return ext }\r\n}", "get lineNumber() {\n return this._lineNum;\n }", "function findViewForLine(cm, lineN) {\r\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\r\n return cm.display.view[findViewIndex(cm, lineN)];\r\n var ext = cm.display.externalMeasured;\r\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\r\n return ext;\r\n }", "function findViewForLine(cm, lineN) {\r\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\r\n { return cm.display.view[findViewIndex(cm, lineN)]; }\r\n var ext = cm.display.externalMeasured;\r\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\r\n { return ext; }\r\n }", "function findViewForLine(cm, lineN) {\n\t if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n\t return cm.display.view[findViewIndex(cm, lineN)];\n\t var ext = cm.display.externalMeasured;\n\t if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n\t return ext;\n\t }", "function findViewForLine(cm, lineN) {\n\t if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n\t return cm.display.view[findViewIndex(cm, lineN)];\n\t var ext = cm.display.externalMeasured;\n\t if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n\t return ext;\n\t }", "function findViewForLine(cm, lineN) {\n\t if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n\t return cm.display.view[findViewIndex(cm, lineN)];\n\t var ext = cm.display.externalMeasured;\n\t if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n\t return ext;\n\t }", "function getLine(doc, n) {\n\t\t n -= doc.first;\n\t\t if (n < 0 || n >= doc.size) { throw new Error(\"There is no line \" + (n + doc.first) + \" in the document.\") }\n\t\t var chunk = doc;\n\t\t while (!chunk.lines) {\n\t\t for (var i = 0;; ++i) {\n\t\t var child = chunk.children[i], sz = child.chunkSize();\n\t\t if (n < sz) { chunk = child; break }\n\t\t n -= sz;\n\t\t }\n\t\t }\n\t\t return chunk.lines[n]\n\t\t }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN),\n vis = visualLine(line);\n\n if (line == vis) {\n return lineN;\n }\n\n return lineNo(vis);\n } // Get the line number of the start of the next visual line after", "function findViewForLine(cm, lineN) {\n\t\t if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n\t\t return cm.display.view[findViewIndex(cm, lineN)];\n\t\t var ext = cm.display.externalMeasured;\n\t\t if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n\t\t return ext;\n\t\t }", "function getLocation(source, position) {\n let lastLineStart = 0;\n let line = 1;\n\n for (const match of source.body.matchAll(LineRegExp)) {\n typeof match.index === 'number' || invariant(false);\n\n if (match.index >= position) {\n break;\n }\n\n lastLineStart = match.index + match[0].length;\n line += 1;\n }\n\n return {\n line,\n column: position + 1 - lastLineStart,\n };\n}", "function findViewForLine(cm, lineN) {\n\t\t if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n\t\t { return cm.display.view[findViewIndex(cm, lineN)] }\n\t\t var ext = cm.display.externalMeasured;\n\t\t if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n\t\t { return ext }\n\t\t }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) return lineN;\n return lineNo(vis);\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) return lineN;\n return lineNo(vis);\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) return lineN;\n return lineNo(vis);\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) return lineN;\n return lineNo(vis);\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) return lineN;\n return lineNo(vis);\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) return lineN;\n return lineNo(vis);\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) return lineN;\n return lineNo(vis);\n }", "function getLine(doc, n) {\n\t\t n -= doc.first;\n\t\t if (n < 0 || n >= doc.size) throw new Error(\"There is no line \" + (n + doc.first) + \" in the document.\");\n\t\t for (var chunk = doc; !chunk.lines;) {\n\t\t for (var i = 0;; ++i) {\n\t\t var child = chunk.children[i], sz = child.chunkSize();\n\t\t if (n < sz) { chunk = child; break; }\n\t\t n -= sz;\n\t\t }\n\t\t }\n\t\t return chunk.lines[n];\n\t\t }", "getLine(x, y) {\r\n var cell = this.getCell(x, y)\r\n if (cell == undefined) return undefined\r\n if (cell.type !== 'line') return undefined\r\n return cell.color\r\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line)\n if (line == vis) { return lineN }\n return lineNo(vis)\n}", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line)\n if (line == vis) { return lineN }\n return lineNo(vis)\n}", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }" ]
[ "0.6923067", "0.6493435", "0.6369398", "0.63622373", "0.63431793", "0.62240064", "0.6219294", "0.62174237", "0.62174237", "0.62164", "0.62164", "0.62164", "0.62164", "0.62164", "0.62164", "0.62164", "0.62164", "0.62164", "0.62164", "0.62164", "0.6188852", "0.6188852", "0.6188852", "0.6188852", "0.6188852", "0.6188852", "0.6188852", "0.6188852", "0.61760366", "0.61760366", "0.61760366", "0.61760366", "0.61760366", "0.61760366", "0.61760366", "0.61760366", "0.61760366", "0.61760366", "0.61760366", "0.61760366", "0.61760366", "0.61760366", "0.61760366", "0.61760366", "0.61760366", "0.61518717", "0.61265606", "0.6099608", "0.60910934", "0.60643834", "0.60643834", "0.60643834", "0.605627", "0.6022443", "0.6007179", "0.599351", "0.59902453", "0.5982181", "0.5982181", "0.5982181", "0.5982181", "0.5982181", "0.5982181", "0.5982181", "0.5981669", "0.596828", "0.59642154", "0.59642154", "0.5950371", "0.5950371", "0.5950371", "0.5950371", "0.5950371", "0.5950371", "0.5950371", "0.5950371", "0.5950371", "0.5950371", "0.5950371", "0.5950371", "0.5950371", "0.5950371", "0.5950371", "0.5950371" ]
0.59771055
77
Get the part of a document between two positions, as an array of strings.
function getBetween(doc, start, end) { var out = [], n = start.line; doc.iter(start.line, end.line + 1, function (line) { var text = line.text; if (n == end.line) { text = text.slice(0, end.ch); } if (n == start.line) { text = text.slice(start.ch); } out.push(text); ++n; }); return out }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getBetween(doc, start, end) {\n\t var out = [], n = start.line;\n\t doc.iter(start.line, end.line + 1, function(line) {\n\t var text = line.text;\n\t if (n == end.line) text = text.slice(0, end.ch);\n\t if (n == start.line) text = text.slice(start.ch);\n\t out.push(text);\n\t ++n;\n\t });\n\t return out;\n\t }", "function getBetween(doc, start, end) {\n\t var out = [], n = start.line;\n\t doc.iter(start.line, end.line + 1, function(line) {\n\t var text = line.text;\n\t if (n == end.line) text = text.slice(0, end.ch);\n\t if (n == start.line) text = text.slice(start.ch);\n\t out.push(text);\n\t ++n;\n\t });\n\t return out;\n\t }", "function getBetween(doc, start, end) {\n\t var out = [], n = start.line;\n\t doc.iter(start.line, end.line + 1, function(line) {\n\t var text = line.text;\n\t if (n == end.line) text = text.slice(0, end.ch);\n\t if (n == start.line) text = text.slice(start.ch);\n\t out.push(text);\n\t ++n;\n\t });\n\t return out;\n\t }", "function getBetween(doc, start, end) {\n var out = [], n = start.line\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text\n if (n == end.line) { text = text.slice(0, end.ch) }\n if (n == start.line) { text = text.slice(start.ch) }\n out.push(text)\n ++n\n })\n return out\n}", "function getBetween(doc, start, end) {\n var out = [], n = start.line\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text\n if (n == end.line) { text = text.slice(0, end.ch) }\n if (n == start.line) { text = text.slice(start.ch) }\n out.push(text)\n ++n\n })\n return out\n}", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function(line) {\n var text = line.text;\n if (n == end.line) text = text.slice(0, end.ch);\n if (n == start.line) text = text.slice(start.ch);\n out.push(text);\n ++n;\n });\n return out;\n }", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function(line) {\n var text = line.text;\n if (n == end.line) text = text.slice(0, end.ch);\n if (n == start.line) text = text.slice(start.ch);\n out.push(text);\n ++n;\n });\n return out;\n }", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function(line) {\n var text = line.text;\n if (n == end.line) text = text.slice(0, end.ch);\n if (n == start.line) text = text.slice(start.ch);\n out.push(text);\n ++n;\n });\n return out;\n }", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function(line) {\n var text = line.text;\n if (n == end.line) text = text.slice(0, end.ch);\n if (n == start.line) text = text.slice(start.ch);\n out.push(text);\n ++n;\n });\n return out;\n }", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function(line) {\n var text = line.text;\n if (n == end.line) text = text.slice(0, end.ch);\n if (n == start.line) text = text.slice(start.ch);\n out.push(text);\n ++n;\n });\n return out;\n }", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function(line) {\n var text = line.text;\n if (n == end.line) text = text.slice(0, end.ch);\n if (n == start.line) text = text.slice(start.ch);\n out.push(text);\n ++n;\n });\n return out;\n }", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function(line) {\n var text = line.text;\n if (n == end.line) text = text.slice(0, end.ch);\n if (n == start.line) text = text.slice(start.ch);\n out.push(text);\n ++n;\n });\n return out;\n }", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n}", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n}", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n}", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n}", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n}", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n}", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n}", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n}", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n}", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n}", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n}", "function getBetween(doc, start, end) {\n\t\t var out = [], n = start.line;\n\t\t doc.iter(start.line, end.line + 1, function (line) {\n\t\t var text = line.text;\n\t\t if (n == end.line) { text = text.slice(0, end.ch); }\n\t\t if (n == start.line) { text = text.slice(start.ch); }\n\t\t out.push(text);\n\t\t ++n;\n\t\t });\n\t\t return out\n\t\t }", "function getBetween(doc, start, end) {\r\n var out = [], n = start.line;\r\n doc.iter(start.line, end.line + 1, function(line) {\r\n var text = line.text;\r\n if (n == end.line) text = text.slice(0, end.ch);\r\n if (n == start.line) text = text.slice(start.ch);\r\n out.push(text);\r\n ++n;\r\n });\r\n return out;\r\n }", "function getBetween(doc, start, end) {\r\n var out = [], n = start.line;\r\n doc.iter(start.line, end.line + 1, function (line) {\r\n var text = line.text;\r\n if (n == end.line) { text = text.slice(0, end.ch); }\r\n if (n == start.line) { text = text.slice(start.ch); }\r\n out.push(text);\r\n ++n;\r\n });\r\n return out\r\n}", "function getBetween(doc, start, end) {\n\t\t var out = [], n = start.line;\n\t\t doc.iter(start.line, end.line + 1, function(line) {\n\t\t var text = line.text;\n\t\t if (n == end.line) text = text.slice(0, end.ch);\n\t\t if (n == start.line) text = text.slice(start.ch);\n\t\t out.push(text);\n\t\t ++n;\n\t\t });\n\t\t return out;\n\t\t }", "function findSameString(startPos, endPos) {\n var oentity = sourceDoc.substring(startPos, endPos);\n var strLen = endPos - startPos;\n\n var ary = new Array();\n var from = 0;\n while (true) {\n var sameStrPos = sourceDoc.indexOf(oentity, from);\n if (sameStrPos == -1) break;\n\n if (!isOutsideDelimiter(sourceDoc, sameStrPos, sameStrPos + strLen)) {\n var obj = new Object();\n obj['begin'] = sameStrPos;\n obj['end'] = sameStrPos + strLen;\n\n var isExist = false;\n for(var sid in spans) {\n if(spans[sid]['begin'] == obj['begin'] && spans[sid]['end'] == obj['end'] && spans[sid].category == obj.category) {\n isExist = true;\n break;\n }\n }\n\n if(!isExist && startPos != sameStrPos) {\n ary.push(obj);\n }\n }\n from = sameStrPos + 1;\n }\n return ary;\n }", "function getLine(doc, n) {\n n -= doc.first;\n\n if (n < 0 || n >= doc.size) {\n throw new Error(\"There is no line \" + (n + doc.first) + \" in the document.\");\n }\n\n var chunk = doc;\n\n while (!chunk.lines) {\n for (var i = 0;; ++i) {\n var child = chunk.children[i],\n sz = child.chunkSize();\n\n if (n < sz) {\n chunk = child;\n break;\n }\n\n n -= sz;\n }\n }\n\n return chunk.lines[n];\n } // Get the part of a document between two positions, as an array of", "function getLines(doc, from, to) {\n\t\t var out = [];\n\t\t doc.iter(from, to, function(line) { out.push(line.text); });\n\t\t return out;\n\t\t }", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function(line) { out.push(line.text); });\n return out;\n }", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function(line) { out.push(line.text); });\n return out;\n }", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function(line) { out.push(line.text); });\n return out;\n }", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function(line) { out.push(line.text); });\n return out;\n }", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function(line) { out.push(line.text); });\n return out;\n }", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function(line) { out.push(line.text); });\n return out;\n }", "function getLines(doc, from, to) {\r\n var out = [];\r\n doc.iter(from, to, function(line) { out.push(line.text); });\r\n return out;\r\n }", "function getBody(position, body) {\n const { start, end } = position;\n return body.substring(start.offset, end.offset);\n}", "function getLines(doc, from, to) {\n\t var out = [];\n\t doc.iter(from, to, function(line) { out.push(line.text); });\n\t return out;\n\t }", "function getLines(doc, from, to) {\n\t var out = [];\n\t doc.iter(from, to, function(line) { out.push(line.text); });\n\t return out;\n\t }", "function getLines(doc, from, to) {\n\t var out = [];\n\t doc.iter(from, to, function(line) { out.push(line.text); });\n\t return out;\n\t }", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n }", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n }", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n }", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n }", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n }", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n }", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n }", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n }", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n }", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n }", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n }", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n }", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n }", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n }", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n }", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n }", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n }", "function getLines(doc, from, to) {\r\n var out = [];\r\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\r\n return out\r\n}", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n}", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n}", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n}", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n}", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n}", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n}", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n}", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n}", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n}", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n}", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n}", "function getLines(doc, from, to) {\n\t\t var out = [];\n\t\t doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n\t\t return out\n\t\t }", "function getLines(doc, from, to) {\n var out = []\n doc.iter(from, to, function (line) { out.push(line.text) }) // iter aborts when callback returns truthy value\n return out\n}", "function getLines(doc, from, to) {\n var out = []\n doc.iter(from, to, function (line) { out.push(line.text) }) // iter aborts when callback returns truthy value\n return out\n}", "function orderedRange(range) {\r\n if ('anchor' in range)\r\n { range = [range.head, range.anchor]; }\r\n if (CodeMirror.cmpPos(range[0], range[1]) > 0)\r\n { return [range[1], range[0]]; }\r\n else\r\n { return [range[0], range[1]]; }\r\n }", "function getOffsetsAfterListCheck(docStr,offset1,offset2){\n var newOffset1 = offset1;\n var newOffset2 = offset2;\n var openListItems = new Array(\"<ol>\",\"<OL>\",\"<ul>\",\"<UL>\");\n var i, nItems = openListItems.length, closeListItem1, closeListItem2, currItem;\n var selStr = docStr.substring(offset1,offset2);\n \n for (i=0;i<nItems;i++){\n if (selStr.indexOf(openListItems[i]) == 0){\n currItem = openListItems[i];\n closeListItem1 = \"</\" + currItem.toLowerCase().substring(1);\n closeListItem2 = \"</\" + currItem.toUpperCase().substring(1);\n \n if ( selStr.indexOf(closeListItem1) == -1 && selStr.indexOf(closeListItem2) == -1){\n newOffset1 += currItem.length;\n }\n } \n }\n return new Array(newOffset1,newOffset2);\n}", "function getValue(doc, start, end) {\n var s = doc.indexOf(start);\n if (s < 0) return null;\n s = s + start.length;\n if (end !== null) {\n var e = doc.indexOf(end, s);\n if (e < 0) return null;\n return doc.substr(s, e - s);\n }\n return doc.substr(s);\n }", "function substringByStartAndEnd(input, start, end) {}", "function getToAndFrom(str, ind) {\r\n const m = str.match(/^Step (.) must be finished before step (.) can begin\\.$/);\r\n return [m[1], m[2]];\r\n}", "function extractNames(paragraph){\n var start = paragraph.indexOf(\"(mother \") + \"(mother \".length;\n var end = paragraph.indexOf(\")\");\n console.log(start, end);\n return paragraph.slice(start, end);\n \n}", "function getSelectionRanges(document, positions, doc) {\n function getSelectionRange(position) {\n var offset = document.offsetAt(position);\n var node = doc.getNodeFromOffset(offset, true);\n var result = [];\n while (node) {\n switch (node.type) {\n case 'string':\n case 'object':\n case 'array':\n // range without \", [ or {\n var cStart = node.offset + 1, cEnd = node.offset + node.length - 1;\n if (cStart < cEnd && offset >= cStart && offset <= cEnd) {\n result.push(newRange(cStart, cEnd));\n }\n result.push(newRange(node.offset, node.offset + node.length));\n break;\n case 'number':\n case 'boolean':\n case 'null':\n case 'property':\n result.push(newRange(node.offset, node.offset + node.length));\n break;\n }\n if (node.type === 'property' || node.parent && node.parent.type === 'array') {\n var afterCommaOffset = getOffsetAfterNextToken(node.offset + node.length, 5 /* CommaToken */);\n if (afterCommaOffset !== -1) {\n result.push(newRange(node.offset, afterCommaOffset));\n }\n }\n node = node.parent;\n }\n var current = undefined;\n for (var index = result.length - 1; index >= 0; index--) {\n current = vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__[\"SelectionRange\"].create(result[index], current);\n }\n if (!current) {\n current = vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__[\"SelectionRange\"].create(vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__[\"Range\"].create(position, position));\n }\n return current;\n }\n function newRange(start, end) {\n return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__[\"Range\"].create(document.positionAt(start), document.positionAt(end));\n }\n var scanner = Object(jsonc_parser__WEBPACK_IMPORTED_MODULE_1__[\"createScanner\"])(document.getText(), true);\n function getOffsetAfterNextToken(offset, expectedToken) {\n scanner.setPosition(offset);\n var token = scanner.scan();\n if (token === expectedToken) {\n return scanner.getTokenOffset() + scanner.getTokenLength();\n }\n return -1;\n }\n return positions.map(getSelectionRange);\n}", "function between(string, start, end){\n var startAt = string.indexOf(start) + start.length;\n var endAt = string.indexOf(end, startAt);\n \n return string.slice(startAt, endAt);\n}", "function getValue(doc, start, end) {\n var s = doc.indexOf(start);\n if (s < 0) return null;\n\n s = s + start.length;\n\n if (end != null) {\n var e = doc.indexOf(end, s);\n if (e < 0) return null;\n\n return doc.substr(s, e - s);\n }\n\n return doc.substr(s);\n }", "static atStart(doc2) {\n return findSelectionIn(doc2, doc2, 0, 0, 1) || new AllSelection(doc2);\n }", "content() {\n return this.$from.doc.slice(this.from, this.to, true);\n }" ]
[ "0.7319094", "0.7319094", "0.7319094", "0.7309015", "0.7309015", "0.7307082", "0.7307082", "0.7307082", "0.7307082", "0.7307082", "0.7307082", "0.7307082", "0.7296952", "0.7296952", "0.7296952", "0.7296952", "0.7296952", "0.7296952", "0.7296952", "0.7296952", "0.7296952", "0.7296952", "0.7296952", "0.72767013", "0.7271897", "0.72688466", "0.72368896", "0.59274596", "0.59130013", "0.57686216", "0.57541645", "0.57541645", "0.57541645", "0.57541645", "0.57541645", "0.57541645", "0.57435167", "0.57171416", "0.5715687", "0.5715687", "0.5715687", "0.56312245", "0.56312245", "0.56312245", "0.56312245", "0.56312245", "0.56312245", "0.56312245", "0.56312245", "0.56312245", "0.56312245", "0.56312245", "0.56312245", "0.56312245", "0.56312245", "0.56312245", "0.56312245", "0.56312245", "0.5612647", "0.5583784", "0.5583784", "0.5583784", "0.5583784", "0.5583784", "0.5583784", "0.5583784", "0.5583784", "0.5583784", "0.5583784", "0.5583784", "0.55620414", "0.5554531", "0.5554531", "0.55467445", "0.5524847", "0.5519659", "0.55166227", "0.5499387", "0.5496232", "0.54922205", "0.5480213", "0.5449512", "0.5432724", "0.54306257" ]
0.73343515
16
Get the lines between from and to, as array of strings.
function getLines(doc, from, to) { var out = []; doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value return out }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function(line) { out.push(line.text); });\n return out;\n }", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function(line) { out.push(line.text); });\n return out;\n }", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function(line) { out.push(line.text); });\n return out;\n }", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function(line) { out.push(line.text); });\n return out;\n }", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function(line) { out.push(line.text); });\n return out;\n }", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function(line) { out.push(line.text); });\n return out;\n }", "function getLines(doc, from, to) {\r\n var out = [];\r\n doc.iter(from, to, function(line) { out.push(line.text); });\r\n return out;\r\n }", "function getLines(doc, from, to) {\n\t var out = [];\n\t doc.iter(from, to, function(line) { out.push(line.text); });\n\t return out;\n\t }", "function getLines(doc, from, to) {\n\t var out = [];\n\t doc.iter(from, to, function(line) { out.push(line.text); });\n\t return out;\n\t }", "function getLines(doc, from, to) {\n\t var out = [];\n\t doc.iter(from, to, function(line) { out.push(line.text); });\n\t return out;\n\t }", "function getLines(doc, from, to) {\n\t\t var out = [];\n\t\t doc.iter(from, to, function(line) { out.push(line.text); });\n\t\t return out;\n\t\t }", "function getLines(doc, from, to) {\r\n var out = [];\r\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\r\n return out\r\n}", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n}", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n}", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n}", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n}", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n}", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n}", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n}", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n}", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n}", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n}", "function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n}", "function getLines(doc, from, to) {\n\t\t var out = [];\n\t\t doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n\t\t return out\n\t\t }", "function getLines(doc, from, to) {\n var out = []\n doc.iter(from, to, function (line) { out.push(line.text) }) // iter aborts when callback returns truthy value\n return out\n}", "function getLines(doc, from, to) {\n var out = []\n doc.iter(from, to, function (line) { out.push(line.text) }) // iter aborts when callback returns truthy value\n return out\n}", "function getLines(doc, from, to, lineFilter) {\n var out = [];\n doc.iter(from, to, function(line) {\n var text = line.text;\n if(lineFilter){\n text = lineFilter(line);\n }\n out.push(text);\n });\n return out;\n }", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n }", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n }", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n }", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n }", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n }", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n }", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n }", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n }", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n }", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n }", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n }", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n }", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n }", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n }", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n }", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n }", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n }", "function getBetween(doc, start, end) {\n\t var out = [], n = start.line;\n\t doc.iter(start.line, end.line + 1, function(line) {\n\t var text = line.text;\n\t if (n == end.line) text = text.slice(0, end.ch);\n\t if (n == start.line) text = text.slice(start.ch);\n\t out.push(text);\n\t ++n;\n\t });\n\t return out;\n\t }", "function getBetween(doc, start, end) {\n\t var out = [], n = start.line;\n\t doc.iter(start.line, end.line + 1, function(line) {\n\t var text = line.text;\n\t if (n == end.line) text = text.slice(0, end.ch);\n\t if (n == start.line) text = text.slice(start.ch);\n\t out.push(text);\n\t ++n;\n\t });\n\t return out;\n\t }", "function getBetween(doc, start, end) {\n\t var out = [], n = start.line;\n\t doc.iter(start.line, end.line + 1, function(line) {\n\t var text = line.text;\n\t if (n == end.line) text = text.slice(0, end.ch);\n\t if (n == start.line) text = text.slice(start.ch);\n\t out.push(text);\n\t ++n;\n\t });\n\t return out;\n\t }", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function(line) {\n var text = line.text;\n if (n == end.line) text = text.slice(0, end.ch);\n if (n == start.line) text = text.slice(start.ch);\n out.push(text);\n ++n;\n });\n return out;\n }", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function(line) {\n var text = line.text;\n if (n == end.line) text = text.slice(0, end.ch);\n if (n == start.line) text = text.slice(start.ch);\n out.push(text);\n ++n;\n });\n return out;\n }", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function(line) {\n var text = line.text;\n if (n == end.line) text = text.slice(0, end.ch);\n if (n == start.line) text = text.slice(start.ch);\n out.push(text);\n ++n;\n });\n return out;\n }", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function(line) {\n var text = line.text;\n if (n == end.line) text = text.slice(0, end.ch);\n if (n == start.line) text = text.slice(start.ch);\n out.push(text);\n ++n;\n });\n return out;\n }", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function(line) {\n var text = line.text;\n if (n == end.line) text = text.slice(0, end.ch);\n if (n == start.line) text = text.slice(start.ch);\n out.push(text);\n ++n;\n });\n return out;\n }", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function(line) {\n var text = line.text;\n if (n == end.line) text = text.slice(0, end.ch);\n if (n == start.line) text = text.slice(start.ch);\n out.push(text);\n ++n;\n });\n return out;\n }", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function(line) {\n var text = line.text;\n if (n == end.line) text = text.slice(0, end.ch);\n if (n == start.line) text = text.slice(start.ch);\n out.push(text);\n ++n;\n });\n return out;\n }", "function getBetween(doc, start, end) {\n var out = [], n = start.line\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text\n if (n == end.line) { text = text.slice(0, end.ch) }\n if (n == start.line) { text = text.slice(start.ch) }\n out.push(text)\n ++n\n })\n return out\n}", "function getBetween(doc, start, end) {\n var out = [], n = start.line\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text\n if (n == end.line) { text = text.slice(0, end.ch) }\n if (n == start.line) { text = text.slice(start.ch) }\n out.push(text)\n ++n\n })\n return out\n}", "function getBetween(doc, start, end) {\r\n var out = [], n = start.line;\r\n doc.iter(start.line, end.line + 1, function(line) {\r\n var text = line.text;\r\n if (n == end.line) text = text.slice(0, end.ch);\r\n if (n == start.line) text = text.slice(start.ch);\r\n out.push(text);\r\n ++n;\r\n });\r\n return out;\r\n }", "function getBetween(doc, start, end) {\n\t\t var out = [], n = start.line;\n\t\t doc.iter(start.line, end.line + 1, function (line) {\n\t\t var text = line.text;\n\t\t if (n == end.line) { text = text.slice(0, end.ch); }\n\t\t if (n == start.line) { text = text.slice(start.ch); }\n\t\t out.push(text);\n\t\t ++n;\n\t\t });\n\t\t return out\n\t\t }", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n}", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n}", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n}", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n}", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n}", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n}", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n}", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n}", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n}", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n}", "function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n}", "function getBetween(doc, start, end) {\n\t\t var out = [], n = start.line;\n\t\t doc.iter(start.line, end.line + 1, function(line) {\n\t\t var text = line.text;\n\t\t if (n == end.line) text = text.slice(0, end.ch);\n\t\t if (n == start.line) text = text.slice(start.ch);\n\t\t out.push(text);\n\t\t ++n;\n\t\t });\n\t\t return out;\n\t\t }", "function getBetween(doc, start, end) {\r\n var out = [], n = start.line;\r\n doc.iter(start.line, end.line + 1, function (line) {\r\n var text = line.text;\r\n if (n == end.line) { text = text.slice(0, end.ch); }\r\n if (n == start.line) { text = text.slice(start.ch); }\r\n out.push(text);\r\n ++n;\r\n });\r\n return out\r\n}", "iterLines(from, to) {\n let inner;\n if (from == null) {\n inner = this.iter();\n }\n else {\n if (to == null)\n to = this.lines + 1;\n let start = this.line(from).from;\n inner = this.iterRange(start, Math.max(start, to == this.lines + 1 ? this.length : to <= 1 ? 0 : this.line(to - 1).to));\n }\n return new LineCursor(inner);\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array;\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array;\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array;\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array;\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array;\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array;\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array;\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array;\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }" ]
[ "0.7890253", "0.7890253", "0.7890253", "0.7890253", "0.7890253", "0.7890253", "0.78511894", "0.7843739", "0.7843739", "0.7843739", "0.7803353", "0.7778218", "0.7767461", "0.7767461", "0.7767461", "0.7767461", "0.7767461", "0.7767461", "0.7767461", "0.7767461", "0.7767461", "0.7767461", "0.7767461", "0.77648693", "0.77186364", "0.77186364", "0.750839", "0.667322", "0.667322", "0.667322", "0.667322", "0.667322", "0.667322", "0.667322", "0.667322", "0.667322", "0.667322", "0.667322", "0.667322", "0.667322", "0.667322", "0.667322", "0.667322", "0.667322", "0.6653958", "0.6653958", "0.6653958", "0.6649304", "0.6649304", "0.6649304", "0.6649304", "0.6649304", "0.6649304", "0.6649304", "0.66192305", "0.66192305", "0.65958446", "0.6594442", "0.6580742", "0.6580742", "0.6580742", "0.6580742", "0.6580742", "0.6580742", "0.6580742", "0.6580742", "0.6580742", "0.6580742", "0.6580742", "0.65602607", "0.65534115", "0.6460239", "0.6061745", "0.6061745", "0.6061745", "0.6061745", "0.6061745", "0.6061745", "0.6061745", "0.6061745", "0.6059199", "0.6059199", "0.6059199", "0.6059199" ]
0.78499365
20
Update the height of a line, propagating the height change upwards to parent nodes.
function updateLineHeight(line, height) { var diff = height - line.height; if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateLineHeight(line, height) {\n\t\t var diff = height - line.height;\n\t\t if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n\t\t }", "function updateLineHeight(line, height) {\n\t\t var diff = height - line.height;\n\t\t if (diff) for (var n = line; n; n = n.parent) n.height += diff;\n\t\t }", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) for (var n = line; n; n = n.parent) n.height += diff;\n }", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) for (var n = line; n; n = n.parent) n.height += diff;\n }", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) for (var n = line; n; n = n.parent) n.height += diff;\n }", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) for (var n = line; n; n = n.parent) n.height += diff;\n }", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) for (var n = line; n; n = n.parent) n.height += diff;\n }", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) for (var n = line; n; n = n.parent) n.height += diff;\n }", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) for (var n = line; n; n = n.parent) n.height += diff;\n }", "function updateLineHeight(line, height) {\n\t var diff = height - line.height;\n\t if (diff) for (var n = line; n; n = n.parent) n.height += diff;\n\t }", "function updateLineHeight(line, height) {\n\t var diff = height - line.height;\n\t if (diff) for (var n = line; n; n = n.parent) n.height += diff;\n\t }", "function updateLineHeight(line, height) {\n\t var diff = height - line.height;\n\t if (diff) for (var n = line; n; n = n.parent) n.height += diff;\n\t }", "function updateLineHeight(line, height) {\r\n var diff = height - line.height;\r\n if (diff) for (var n = line; n; n = n.parent) n.height += diff;\r\n }", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n\n if (diff) {\n for (var n = line; n; n = n.parent) {\n n.height += diff;\n }\n }\n } // Given a line object, find its line number by walking up through", "function updateLineHeight(line, height) {\r\n var diff = height - line.height;\r\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\r\n}", "function updateLineHeight(line, height) {\n var diff = height - line.height\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff } }\n}", "function updateLineHeight(line, height) {\n var diff = height - line.height\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff } }\n}", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n}", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n}", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n}", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n}", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n}", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n}", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n}", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n}", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n}", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n}", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n}", "function updateWidgetHeight(line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {\n var w = line.widgets[i], parent = w.node.parentNode;\n if (parent) { w.height = parent.offsetHeight; }\n } }\n }", "function updateWidgetHeight(line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {\n var w = line.widgets[i], parent = w.node.parentNode;\n if (parent) { w.height = parent.offsetHeight; }\n } }\n }", "function updateWidgetHeight(line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {\n var w = line.widgets[i], parent = w.node.parentNode;\n if (parent) { w.height = parent.offsetHeight; }\n } }\n }", "function updateWidgetHeight(line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {\n var w = line.widgets[i], parent = w.node.parentNode;\n if (parent) { w.height = parent.offsetHeight; }\n } }\n }", "function updateWidgetHeight(line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {\n var w = line.widgets[i], parent = w.node.parentNode;\n if (parent) { w.height = parent.offsetHeight; }\n } }\n }", "function updateWidgetHeight(line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {\n var w = line.widgets[i], parent = w.node.parentNode;\n if (parent) { w.height = parent.offsetHeight; }\n } }\n }", "function updateWidgetHeight(line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {\n var w = line.widgets[i], parent = w.node.parentNode;\n if (parent) { w.height = parent.offsetHeight; }\n } }\n }", "function updateWidgetHeight(line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {\n var w = line.widgets[i], parent = w.node.parentNode;\n if (parent) { w.height = parent.offsetHeight; }\n } }\n }", "function updateWidgetHeight(line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {\n var w = line.widgets[i], parent = w.node.parentNode;\n if (parent) { w.height = parent.offsetHeight; }\n } }\n }", "function updateWidgetHeight(line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {\n var w = line.widgets[i], parent = w.node.parentNode;\n if (parent) { w.height = parent.offsetHeight; }\n } }\n }", "function updateWidgetHeight(line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {\n var w = line.widgets[i], parent = w.node.parentNode;\n if (parent) { w.height = parent.offsetHeight; }\n } }\n }", "function updateWidgetHeight(line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {\n var w = line.widgets[i], parent = w.node.parentNode;\n if (parent) { w.height = parent.offsetHeight; }\n } }\n }", "function updateWidgetHeight(line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {\n var w = line.widgets[i], parent = w.node.parentNode;\n if (parent) { w.height = parent.offsetHeight; }\n } }\n }", "function updateWidgetHeight(line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {\n var w = line.widgets[i], parent = w.node.parentNode;\n if (parent) { w.height = parent.offsetHeight; }\n } }\n }", "function updateWidgetHeight(line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {\n var w = line.widgets[i], parent = w.node.parentNode;\n if (parent) { w.height = parent.offsetHeight; }\n } }\n }", "function updateWidgetHeight(line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {\n var w = line.widgets[i], parent = w.node.parentNode;\n if (parent) { w.height = parent.offsetHeight; }\n } }\n }", "function updateWidgetHeight(line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {\n var w = line.widgets[i], parent = w.node.parentNode;\n if (parent) { w.height = parent.offsetHeight; }\n } }\n }", "function updateWidgetHeight(line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {\n var w = line.widgets[i], parent = w.node.parentNode;\n if (parent) { w.height = parent.offsetHeight; }\n } }\n}", "function updateWidgetHeight(line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {\n var w = line.widgets[i], parent = w.node.parentNode;\n if (parent) { w.height = parent.offsetHeight; }\n } }\n}", "function updateWidgetHeight(line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {\n var w = line.widgets[i], parent = w.node.parentNode;\n if (parent) { w.height = parent.offsetHeight; }\n } }\n}", "function updateWidgetHeight(line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {\n var w = line.widgets[i], parent = w.node.parentNode;\n if (parent) { w.height = parent.offsetHeight; }\n } }\n}", "function updateWidgetHeight(line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {\n var w = line.widgets[i], parent = w.node.parentNode;\n if (parent) { w.height = parent.offsetHeight; }\n } }\n}", "function updateWidgetHeight(line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {\n var w = line.widgets[i], parent = w.node.parentNode;\n if (parent) { w.height = parent.offsetHeight; }\n } }\n}", "function updateWidgetHeight(line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {\n var w = line.widgets[i], parent = w.node.parentNode;\n if (parent) { w.height = parent.offsetHeight; }\n } }\n}", "function updateWidgetHeight(line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {\n var w = line.widgets[i], parent = w.node.parentNode;\n if (parent) { w.height = parent.offsetHeight; }\n } }\n}", "function updateWidgetHeight(line) {\r\n if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {\r\n var w = line.widgets[i], parent = w.node.parentNode;\r\n if (parent) { w.height = parent.offsetHeight; }\r\n } }\r\n}", "function updateWidgetHeight(line) {\n\t\t if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {\n\t\t var w = line.widgets[i], parent = w.node.parentNode;\n\t\t if (parent) { w.height = parent.offsetHeight; }\n\t\t } }\n\t\t }", "function updateWidgetHeight(line) {\n if (line.widgets) for (var i = 0; i < line.widgets.length; ++i)\n line.widgets[i].height = line.widgets[i].node.parentNode.offsetHeight;\n }", "function updateWidgetHeight(line) {\n\t if (line.widgets) for (var i = 0; i < line.widgets.length; ++i)\n\t line.widgets[i].height = line.widgets[i].node.parentNode.offsetHeight;\n\t }", "function updateWidgetHeight(line) {\n\t if (line.widgets) for (var i = 0; i < line.widgets.length; ++i)\n\t line.widgets[i].height = line.widgets[i].node.parentNode.offsetHeight;\n\t }", "function updateWidgetHeight(line) {\n\t if (line.widgets) for (var i = 0; i < line.widgets.length; ++i)\n\t line.widgets[i].height = line.widgets[i].node.parentNode.offsetHeight;\n\t }", "function updateWidgetHeight(line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i)\n { line.widgets[i].height = line.widgets[i].node.parentNode.offsetHeight } }\n}", "function updateWidgetHeight(line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i)\n { line.widgets[i].height = line.widgets[i].node.parentNode.offsetHeight } }\n}", "function updateWidgetHeight(line) {\n if (line.widgets) for (var i = 0; i < line.widgets.length; ++i)\n line.widgets[i].height = line.widgets[i].node.offsetHeight;\n }", "function updateWidgetHeight(line) {\n if (line.widgets) for (var i = 0; i < line.widgets.length; ++i)\n line.widgets[i].height = line.widgets[i].node.offsetHeight;\n }", "function updateWidgetHeight(line) {\n if (line.widgets) for (var i = 0; i < line.widgets.length; ++i)\n line.widgets[i].height = line.widgets[i].node.offsetHeight;\n }", "function updateWidgetHeight(line) {\n if (line.widgets) for (var i = 0; i < line.widgets.length; ++i)\n line.widgets[i].height = line.widgets[i].node.offsetHeight;\n }", "function updateWidgetHeight(line) {\n if (line.widgets) for (var i = 0; i < line.widgets.length; ++i)\n line.widgets[i].height = line.widgets[i].node.offsetHeight;\n }", "function updateWidgetHeight(line) {\n if (line.widgets) for (var i = 0; i < line.widgets.length; ++i)\n line.widgets[i].height = line.widgets[i].node.offsetHeight;\n }", "function updateWidgetHeight(line) {\n if (line.widgets) for (var i = 0; i < line.widgets.length; ++i)\n line.widgets[i].height = line.widgets[i].node.offsetHeight;\n }", "function updateWidgetHeight(line) {\r\n if (line.widgets) for (var i = 0; i < line.widgets.length; ++i)\r\n line.widgets[i].height = line.widgets[i].node.offsetHeight;\r\n }", "function updateWidgetHeight(line) {\n\t\t if (line.widgets) for (var i = 0; i < line.widgets.length; ++i)\n\t\t line.widgets[i].height = line.widgets[i].node.parentNode.offsetHeight;\n\t\t }", "function updateWidgetHeight(line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i)\n { line.widgets[i].height = line.widgets[i].node.parentNode.offsetHeight; } }\n}", "function updateWidgetHeight(line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i)\n { line.widgets[i].height = line.widgets[i].node.parentNode.offsetHeight; } }\n}", "function updateWidgetHeight(line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i)\n { line.widgets[i].height = line.widgets[i].node.parentNode.offsetHeight; } }\n}", "function lineHeight(){\n\t\thistoryLine.each(function(index, element){\n\t\t\tif(index == $('.line').length - 1){\n\t\t\t\treturn false;\n\t\t\t} else{\n\t\t\t\tvar thisBlock = $(this).closest('.history-item').height()/2;\n\t\t\t\tvar nextBlock = $(this).closest('.history-item').next().height()/2;\n\t\t\t\tvar h = thisBlock+nextBlock;\n\t\t\t\t$(this).height(h);\n\t\t\t}\n\t\t\t\n\t\t})\n\t}", "function heightAtLine(lineObj) {\n\t\t lineObj = visualLine(lineObj);\n\t\t\n\t\t var h = 0, chunk = lineObj.parent;\n\t\t for (var i = 0; i < chunk.lines.length; ++i) {\n\t\t var line = chunk.lines[i];\n\t\t if (line == lineObj) break;\n\t\t else h += line.height;\n\t\t }\n\t\t for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n\t\t for (var i = 0; i < p.children.length; ++i) {\n\t\t var cur = p.children[i];\n\t\t if (cur == chunk) break;\n\t\t else h += cur.height;\n\t\t }\n\t\t }\n\t\t return h;\n\t\t }", "function heightAtLine(lineObj) {\r\n lineObj = visualLine(lineObj);\r\n\r\n var h = 0, chunk = lineObj.parent;\r\n for (var i = 0; i < chunk.lines.length; ++i) {\r\n var line = chunk.lines[i];\r\n if (line == lineObj) break;\r\n else h += line.height;\r\n }\r\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\r\n for (var i = 0; i < p.children.length; ++i) {\r\n var cur = p.children[i];\r\n if (cur == chunk) break;\r\n else h += cur.height;\r\n }\r\n }\r\n return h;\r\n }", "function heightAtLine(lineObj) {\n\t\t lineObj = visualLine(lineObj);\n\n\t\t var h = 0, chunk = lineObj.parent;\n\t\t for (var i = 0; i < chunk.lines.length; ++i) {\n\t\t var line = chunk.lines[i];\n\t\t if (line == lineObj) { break }\n\t\t else { h += line.height; }\n\t\t }\n\t\t for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n\t\t for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n\t\t var cur = p.children[i$1];\n\t\t if (cur == chunk) { break }\n\t\t else { h += cur.height; }\n\t\t }\n\t\t }\n\t\t return h\n\t\t }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) break;\n else h += line.height;\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i = 0; i < p.children.length; ++i) {\n var cur = p.children[i];\n if (cur == chunk) break;\n else h += cur.height;\n }\n }\n return h;\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) break;\n else h += line.height;\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i = 0; i < p.children.length; ++i) {\n var cur = p.children[i];\n if (cur == chunk) break;\n else h += cur.height;\n }\n }\n return h;\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) break;\n else h += line.height;\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i = 0; i < p.children.length; ++i) {\n var cur = p.children[i];\n if (cur == chunk) break;\n else h += cur.height;\n }\n }\n return h;\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) break;\n else h += line.height;\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i = 0; i < p.children.length; ++i) {\n var cur = p.children[i];\n if (cur == chunk) break;\n else h += cur.height;\n }\n }\n return h;\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) break;\n else h += line.height;\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i = 0; i < p.children.length; ++i) {\n var cur = p.children[i];\n if (cur == chunk) break;\n else h += cur.height;\n }\n }\n return h;\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) break;\n else h += line.height;\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i = 0; i < p.children.length; ++i) {\n var cur = p.children[i];\n if (cur == chunk) break;\n else h += cur.height;\n }\n }\n return h;\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) break;\n else h += line.height;\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i = 0; i < p.children.length; ++i) {\n var cur = p.children[i];\n if (cur == chunk) break;\n else h += cur.height;\n }\n }\n return h;\n }" ]
[ "0.8321819", "0.8306112", "0.82823384", "0.82823384", "0.82823384", "0.82823384", "0.82823384", "0.82823384", "0.82823384", "0.8276702", "0.8276702", "0.8276702", "0.82609373", "0.82104254", "0.81633735", "0.8157468", "0.8157468", "0.8111964", "0.8111964", "0.8111964", "0.8111964", "0.8111964", "0.8111964", "0.8111964", "0.8111964", "0.8111964", "0.8111964", "0.8111964", "0.74380285", "0.74380285", "0.74380285", "0.74380285", "0.74380285", "0.74380285", "0.74380285", "0.74380285", "0.74380285", "0.74380285", "0.74380285", "0.74380285", "0.74380285", "0.74380285", "0.74380285", "0.74380285", "0.74380285", "0.7424029", "0.7424029", "0.7424029", "0.7424029", "0.7424029", "0.7424029", "0.7424029", "0.7424029", "0.73975164", "0.7390367", "0.73746127", "0.73646766", "0.73646766", "0.73646766", "0.73595494", "0.73595494", "0.7352681", "0.7352681", "0.7352681", "0.7352681", "0.7352681", "0.7352681", "0.7352681", "0.734548", "0.7342641", "0.7338037", "0.7338037", "0.7338037", "0.6992993", "0.6938268", "0.68637604", "0.6861947", "0.68516463", "0.68516463", "0.68516463", "0.68516463", "0.68516463", "0.68516463", "0.68516463" ]
0.82784945
23
Given a line object, find its line number by walking up through its parent links.
function lineNo(line) { if (line.parent == null) { return null } var cur = line.parent, no = indexOf(cur.lines, line); for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) { for (var i = 0;; ++i) { if (chunk.children[i] == cur) { break } no += chunk.children[i].chunkSize(); } } return no + cur.first }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function lineNo(line) {\n\t\t if (line.parent == null) { return null }\n\t\t var cur = line.parent, no = indexOf(cur.lines, line);\n\t\t for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n\t\t for (var i = 0;; ++i) {\n\t\t if (chunk.children[i] == cur) { break }\n\t\t no += chunk.children[i].chunkSize();\n\t\t }\n\t\t }\n\t\t return no + cur.first\n\t\t }", "function lineNo(line) {\n\t\t if (line.parent == null) return null;\n\t\t var cur = line.parent, no = indexOf(cur.lines, line);\n\t\t for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n\t\t for (var i = 0;; ++i) {\n\t\t if (chunk.children[i] == cur) break;\n\t\t no += chunk.children[i].chunkSize();\n\t\t }\n\t\t }\n\t\t return no + cur.first;\n\t\t }", "function lineNo(line) {\r\n if (line.parent == null) return null;\r\n var cur = line.parent, no = indexOf(cur.lines, line);\r\n for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\r\n for (var i = 0;; ++i) {\r\n if (chunk.children[i] == cur) break;\r\n no += chunk.children[i].chunkSize();\r\n }\r\n }\r\n return no + cur.first;\r\n }", "function lineNo(line) {\n\t if (line.parent == null) return null;\n\t var cur = line.parent, no = indexOf(cur.lines, line);\n\t for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n\t for (var i = 0;; ++i) {\n\t if (chunk.children[i] == cur) break;\n\t no += chunk.children[i].chunkSize();\n\t }\n\t }\n\t return no + cur.first;\n\t }", "function lineNo(line) {\n\t if (line.parent == null) return null;\n\t var cur = line.parent, no = indexOf(cur.lines, line);\n\t for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n\t for (var i = 0;; ++i) {\n\t if (chunk.children[i] == cur) break;\n\t no += chunk.children[i].chunkSize();\n\t }\n\t }\n\t return no + cur.first;\n\t }", "function lineNo(line) {\n\t if (line.parent == null) return null;\n\t var cur = line.parent, no = indexOf(cur.lines, line);\n\t for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n\t for (var i = 0;; ++i) {\n\t if (chunk.children[i] == cur) break;\n\t no += chunk.children[i].chunkSize();\n\t }\n\t }\n\t return no + cur.first;\n\t }", "function lineNo(line) {\r\n if (line.parent == null) { return null }\r\n var cur = line.parent, no = indexOf(cur.lines, line);\r\n for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\r\n for (var i = 0;; ++i) {\r\n if (chunk.children[i] == cur) { break }\r\n no += chunk.children[i].chunkSize();\r\n }\r\n }\r\n return no + cur.first\r\n}", "function lineNo(line) {\n if (line.parent == null) return null;\n var cur = line.parent, no = indexOf(cur.lines, line);\n for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n for (var i = 0;; ++i) {\n if (chunk.children[i] == cur) break;\n no += chunk.children[i].chunkSize();\n }\n }\n return no + cur.first;\n }", "function lineNo(line) {\n if (line.parent == null) return null;\n var cur = line.parent, no = indexOf(cur.lines, line);\n for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n for (var i = 0;; ++i) {\n if (chunk.children[i] == cur) break;\n no += chunk.children[i].chunkSize();\n }\n }\n return no + cur.first;\n }", "function lineNo(line) {\n if (line.parent == null) return null;\n var cur = line.parent, no = indexOf(cur.lines, line);\n for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n for (var i = 0;; ++i) {\n if (chunk.children[i] == cur) break;\n no += chunk.children[i].chunkSize();\n }\n }\n return no + cur.first;\n }", "function lineNo(line) {\n if (line.parent == null) return null;\n var cur = line.parent, no = indexOf(cur.lines, line);\n for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n for (var i = 0;; ++i) {\n if (chunk.children[i] == cur) break;\n no += chunk.children[i].chunkSize();\n }\n }\n return no + cur.first;\n }", "function lineNo(line) {\n if (line.parent == null) return null;\n var cur = line.parent, no = indexOf(cur.lines, line);\n for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n for (var i = 0;; ++i) {\n if (chunk.children[i] == cur) break;\n no += chunk.children[i].chunkSize();\n }\n }\n return no + cur.first;\n }", "function lineNo(line) {\n if (line.parent == null) return null;\n var cur = line.parent, no = indexOf(cur.lines, line);\n for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n for (var i = 0;; ++i) {\n if (chunk.children[i] == cur) break;\n no += chunk.children[i].chunkSize();\n }\n }\n return no + cur.first;\n }", "function lineNo(line) {\n if (line.parent == null) return null;\n var cur = line.parent, no = indexOf(cur.lines, line);\n for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n for (var i = 0;; ++i) {\n if (chunk.children[i] == cur) break;\n no += chunk.children[i].chunkSize();\n }\n }\n return no + cur.first;\n }", "function lineNo(line) {\n if (line.parent == null) { return null }\n var cur = line.parent, no = indexOf(cur.lines, line);\n for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n for (var i = 0;; ++i) {\n if (chunk.children[i] == cur) { break }\n no += chunk.children[i].chunkSize();\n }\n }\n return no + cur.first\n}", "function lineNo(line) {\n if (line.parent == null) { return null }\n var cur = line.parent, no = indexOf(cur.lines, line);\n for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n for (var i = 0;; ++i) {\n if (chunk.children[i] == cur) { break }\n no += chunk.children[i].chunkSize();\n }\n }\n return no + cur.first\n}", "function lineNo(line) {\n if (line.parent == null) { return null }\n var cur = line.parent, no = indexOf(cur.lines, line);\n for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n for (var i = 0;; ++i) {\n if (chunk.children[i] == cur) { break }\n no += chunk.children[i].chunkSize();\n }\n }\n return no + cur.first\n}", "function lineNo(line) {\n if (line.parent == null) { return null }\n var cur = line.parent, no = indexOf(cur.lines, line);\n for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n for (var i = 0;; ++i) {\n if (chunk.children[i] == cur) { break }\n no += chunk.children[i].chunkSize();\n }\n }\n return no + cur.first\n}", "function lineNo(line) {\n if (line.parent == null) { return null }\n var cur = line.parent, no = indexOf(cur.lines, line);\n for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n for (var i = 0;; ++i) {\n if (chunk.children[i] == cur) { break }\n no += chunk.children[i].chunkSize();\n }\n }\n return no + cur.first\n}", "function lineNo(line) {\n if (line.parent == null) { return null }\n var cur = line.parent, no = indexOf(cur.lines, line);\n for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n for (var i = 0;; ++i) {\n if (chunk.children[i] == cur) { break }\n no += chunk.children[i].chunkSize();\n }\n }\n return no + cur.first\n}", "function lineNo(line) {\n if (line.parent == null) { return null }\n var cur = line.parent, no = indexOf(cur.lines, line);\n for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n for (var i = 0;; ++i) {\n if (chunk.children[i] == cur) { break }\n no += chunk.children[i].chunkSize();\n }\n }\n return no + cur.first\n}", "function lineNo(line) {\n if (line.parent == null) { return null }\n var cur = line.parent, no = indexOf(cur.lines, line);\n for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n for (var i = 0;; ++i) {\n if (chunk.children[i] == cur) { break }\n no += chunk.children[i].chunkSize();\n }\n }\n return no + cur.first\n}", "function lineNo(line) {\n if (line.parent == null) { return null }\n var cur = line.parent, no = indexOf(cur.lines, line);\n for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n for (var i = 0;; ++i) {\n if (chunk.children[i] == cur) { break }\n no += chunk.children[i].chunkSize();\n }\n }\n return no + cur.first\n}", "function lineNo(line) {\n if (line.parent == null) { return null }\n var cur = line.parent, no = indexOf(cur.lines, line);\n for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n for (var i = 0;; ++i) {\n if (chunk.children[i] == cur) { break }\n no += chunk.children[i].chunkSize();\n }\n }\n return no + cur.first\n}", "function lineNo(line) {\n if (line.parent == null) { return null }\n var cur = line.parent, no = indexOf(cur.lines, line);\n for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n for (var i = 0;; ++i) {\n if (chunk.children[i] == cur) { break }\n no += chunk.children[i].chunkSize();\n }\n }\n return no + cur.first\n}", "function lineNo(line) {\n if (line.parent == null) { return null }\n var cur = line.parent, no = indexOf(cur.lines, line)\n for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n for (var i = 0;; ++i) {\n if (chunk.children[i] == cur) { break }\n no += chunk.children[i].chunkSize()\n }\n }\n return no + cur.first\n}", "function lineNo(line) {\n if (line.parent == null) { return null }\n var cur = line.parent, no = indexOf(cur.lines, line)\n for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n for (var i = 0;; ++i) {\n if (chunk.children[i] == cur) { break }\n no += chunk.children[i].chunkSize()\n }\n }\n return no + cur.first\n}", "_getStartRefLineNumber(referenceNumber) {\n var refRef = PassageMarkdown.START_REF_PREFIX + referenceNumber;\n var ref = this.refs[refRef];\n\n if (!ref) {\n return null;\n }\n\n var $ref = $$1(ReactDOM$c.findDOMNode(ref)); // We really care about the first text after the ref, not the\n // ref element itself:\n\n var $refText = $ref.next();\n\n if ($refText.length === 0) {\n // But if there are no elements after the ref, just\n // use the ref itself.\n $refText = $ref;\n }\n\n var vPos = $refText.offset().top;\n return this.state.startLineNumbersAfter + 1 + this._convertPosToLineNumber(vPos);\n }", "function heightAtLine(lineObj) {\n\t lineObj = visualLine(lineObj);\n\t\n\t var h = 0, chunk = lineObj.parent;\n\t for (var i = 0; i < chunk.lines.length; ++i) {\n\t var line = chunk.lines[i];\n\t if (line == lineObj) break;\n\t else h += line.height;\n\t }\n\t for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n\t for (var i = 0; i < p.children.length; ++i) {\n\t var cur = p.children[i];\n\t if (cur == chunk) break;\n\t else h += cur.height;\n\t }\n\t }\n\t return h;\n\t }", "function heightAtLine(lineObj) {\r\n lineObj = visualLine(lineObj);\r\n\r\n var h = 0, chunk = lineObj.parent;\r\n for (var i = 0; i < chunk.lines.length; ++i) {\r\n var line = chunk.lines[i];\r\n if (line == lineObj) break;\r\n else h += line.height;\r\n }\r\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\r\n for (var i = 0; i < p.children.length; ++i) {\r\n var cur = p.children[i];\r\n if (cur == chunk) break;\r\n else h += cur.height;\r\n }\r\n }\r\n return h;\r\n }", "function heightAtLine(lineObj) {\n\t\t lineObj = visualLine(lineObj);\n\t\t\n\t\t var h = 0, chunk = lineObj.parent;\n\t\t for (var i = 0; i < chunk.lines.length; ++i) {\n\t\t var line = chunk.lines[i];\n\t\t if (line == lineObj) break;\n\t\t else h += line.height;\n\t\t }\n\t\t for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n\t\t for (var i = 0; i < p.children.length; ++i) {\n\t\t var cur = p.children[i];\n\t\t if (cur == chunk) break;\n\t\t else h += cur.height;\n\t\t }\n\t\t }\n\t\t return h;\n\t\t }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) break;\n else h += line.height;\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i = 0; i < p.children.length; ++i) {\n var cur = p.children[i];\n if (cur == chunk) break;\n else h += cur.height;\n }\n }\n return h;\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) break;\n else h += line.height;\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i = 0; i < p.children.length; ++i) {\n var cur = p.children[i];\n if (cur == chunk) break;\n else h += cur.height;\n }\n }\n return h;\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) break;\n else h += line.height;\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i = 0; i < p.children.length; ++i) {\n var cur = p.children[i];\n if (cur == chunk) break;\n else h += cur.height;\n }\n }\n return h;\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) break;\n else h += line.height;\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i = 0; i < p.children.length; ++i) {\n var cur = p.children[i];\n if (cur == chunk) break;\n else h += cur.height;\n }\n }\n return h;\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) break;\n else h += line.height;\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i = 0; i < p.children.length; ++i) {\n var cur = p.children[i];\n if (cur == chunk) break;\n else h += cur.height;\n }\n }\n return h;\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) break;\n else h += line.height;\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i = 0; i < p.children.length; ++i) {\n var cur = p.children[i];\n if (cur == chunk) break;\n else h += cur.height;\n }\n }\n return h;\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) break;\n else h += line.height;\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i = 0; i < p.children.length; ++i) {\n var cur = p.children[i];\n if (cur == chunk) break;\n else h += cur.height;\n }\n }\n return h;\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj)\n\n var h = 0, chunk = lineObj.parent\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i]\n if (line == lineObj) { break }\n else { h += line.height }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1]\n if (cur == chunk) { break }\n else { h += cur.height }\n }\n }\n return h\n}", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj)\n\n var h = 0, chunk = lineObj.parent\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i]\n if (line == lineObj) { break }\n else { h += line.height }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1]\n if (cur == chunk) { break }\n else { h += cur.height }\n }\n }\n return h\n}", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n }", "function heightAtLine(lineObj) {\n\t lineObj = visualLine(lineObj);\n\n\t var h = 0, chunk = lineObj.parent;\n\t for (var i = 0; i < chunk.lines.length; ++i) {\n\t var line = chunk.lines[i];\n\t if (line == lineObj) break;\n\t else h += line.height;\n\t }\n\t for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n\t for (var i = 0; i < p.children.length; ++i) {\n\t var cur = p.children[i];\n\t if (cur == chunk) break;\n\t else h += cur.height;\n\t }\n\t }\n\t return h;\n\t }", "function heightAtLine(lineObj) {\n\t lineObj = visualLine(lineObj);\n\n\t var h = 0, chunk = lineObj.parent;\n\t for (var i = 0; i < chunk.lines.length; ++i) {\n\t var line = chunk.lines[i];\n\t if (line == lineObj) break;\n\t else h += line.height;\n\t }\n\t for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n\t for (var i = 0; i < p.children.length; ++i) {\n\t var cur = p.children[i];\n\t if (cur == chunk) break;\n\t else h += cur.height;\n\t }\n\t }\n\t return h;\n\t }", "function heightAtLine(lineObj) {\n\t\t lineObj = visualLine(lineObj);\n\n\t\t var h = 0, chunk = lineObj.parent;\n\t\t for (var i = 0; i < chunk.lines.length; ++i) {\n\t\t var line = chunk.lines[i];\n\t\t if (line == lineObj) { break }\n\t\t else { h += line.height; }\n\t\t }\n\t\t for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n\t\t for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n\t\t var cur = p.children[i$1];\n\t\t if (cur == chunk) { break }\n\t\t else { h += cur.height; }\n\t\t }\n\t\t }\n\t\t return h\n\t\t }", "function heightAtLine(lineObj) {\r\n lineObj = visualLine(lineObj);\r\n\r\n var h = 0, chunk = lineObj.parent;\r\n for (var i = 0; i < chunk.lines.length; ++i) {\r\n var line = chunk.lines[i];\r\n if (line == lineObj) { break }\r\n else { h += line.height; }\r\n }\r\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\r\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\r\n var cur = p.children[i$1];\r\n if (cur == chunk) { break }\r\n else { h += cur.height; }\r\n }\r\n }\r\n return h\r\n}", "getPrecedingValidLine(model, lineNumber, indentRulesSupport) {\r\n let languageID = model.getLanguageIdAtPosition(lineNumber, 0);\r\n if (lineNumber > 1) {\r\n let lastLineNumber;\r\n let resultLineNumber = -1;\r\n for (lastLineNumber = lineNumber - 1; lastLineNumber >= 1; lastLineNumber--) {\r\n if (model.getLanguageIdAtPosition(lastLineNumber, 0) !== languageID) {\r\n return resultLineNumber;\r\n }\r\n let text = model.getLineContent(lastLineNumber);\r\n if (indentRulesSupport.shouldIgnore(text) || /^\\s+$/.test(text) || text === '') {\r\n resultLineNumber = lastLineNumber;\r\n continue;\r\n }\r\n return lastLineNumber;\r\n }\r\n }\r\n return -1;\r\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n}", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n}", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n}", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n}", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n}", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n}", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n}", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n}", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n}", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n}", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n}", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n\n if (diff) {\n for (var n = line; n; n = n.parent) {\n n.height += diff;\n }\n }\n } // Given a line object, find its line number by walking up through", "function lineAtHeight(chunk, h) {\n\t\t var n = chunk.first;\n\t\t outer: do {\n\t\t for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n\t\t var child = chunk.children[i$1], ch = child.height;\n\t\t if (h < ch) { chunk = child; continue outer }\n\t\t h -= ch;\n\t\t n += child.chunkSize();\n\t\t }\n\t\t return n\n\t\t } while (!chunk.lines)\n\t\t var i = 0;\n\t\t for (; i < chunk.lines.length; ++i) {\n\t\t var line = chunk.lines[i], lh = line.height;\n\t\t if (h < lh) { break }\n\t\t h -= lh;\n\t\t }\n\t\t return n + i\n\t\t }", "get lineNumber() {\n return this._lineNum;\n }", "function lineAtHeight(chunk, h) {\n\t\t var n = chunk.first;\n\t\t outer: do {\n\t\t for (var i = 0; i < chunk.children.length; ++i) {\n\t\t var child = chunk.children[i], ch = child.height;\n\t\t if (h < ch) { chunk = child; continue outer; }\n\t\t h -= ch;\n\t\t n += child.chunkSize();\n\t\t }\n\t\t return n;\n\t\t } while (!chunk.lines);\n\t\t for (var i = 0; i < chunk.lines.length; ++i) {\n\t\t var line = chunk.lines[i], lh = line.height;\n\t\t if (h < lh) break;\n\t\t h -= lh;\n\t\t }\n\t\t return n + i;\n\t\t }", "function lineAtHeight(chunk, h) {\n\t var n = chunk.first;\n\t outer: do {\n\t for (var i = 0; i < chunk.children.length; ++i) {\n\t var child = chunk.children[i], ch = child.height;\n\t if (h < ch) { chunk = child; continue outer; }\n\t h -= ch;\n\t n += child.chunkSize();\n\t }\n\t return n;\n\t } while (!chunk.lines);\n\t for (var i = 0; i < chunk.lines.length; ++i) {\n\t var line = chunk.lines[i], lh = line.height;\n\t if (h < lh) break;\n\t h -= lh;\n\t }\n\t return n + i;\n\t }", "function lineAtHeight(chunk, h) {\n\t var n = chunk.first;\n\t outer: do {\n\t for (var i = 0; i < chunk.children.length; ++i) {\n\t var child = chunk.children[i], ch = child.height;\n\t if (h < ch) { chunk = child; continue outer; }\n\t h -= ch;\n\t n += child.chunkSize();\n\t }\n\t return n;\n\t } while (!chunk.lines);\n\t for (var i = 0; i < chunk.lines.length; ++i) {\n\t var line = chunk.lines[i], lh = line.height;\n\t if (h < lh) break;\n\t h -= lh;\n\t }\n\t return n + i;\n\t }", "function lineAtHeight(chunk, h) {\n\t var n = chunk.first;\n\t outer: do {\n\t for (var i = 0; i < chunk.children.length; ++i) {\n\t var child = chunk.children[i], ch = child.height;\n\t if (h < ch) { chunk = child; continue outer; }\n\t h -= ch;\n\t n += child.chunkSize();\n\t }\n\t return n;\n\t } while (!chunk.lines);\n\t for (var i = 0; i < chunk.lines.length; ++i) {\n\t var line = chunk.lines[i], lh = line.height;\n\t if (h < lh) break;\n\t h -= lh;\n\t }\n\t return n + i;\n\t }", "function _lineAtHeight(chunk, h) {\n var n = chunk.first;\n\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1],\n ch = child.height;\n\n if (h < ch) {\n chunk = child;\n continue outer;\n }\n\n h -= ch;\n n += child.chunkSize();\n }\n\n return n;\n } while (!chunk.lines);\n\n var i = 0;\n\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i],\n lh = line.height;\n\n if (h < lh) {\n break;\n }\n\n h -= lh;\n }\n\n return n + i;\n }", "function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height;\n if (h < ch) { chunk = child; continue outer }\n h -= ch;\n n += child.chunkSize();\n }\n return n\n } while (!chunk.lines)\n var i = 0;\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) { break }\n h -= lh;\n }\n return n + i\n }", "function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height;\n if (h < ch) { chunk = child; continue outer }\n h -= ch;\n n += child.chunkSize();\n }\n return n\n } while (!chunk.lines)\n var i = 0;\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) { break }\n h -= lh;\n }\n return n + i\n }", "function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height;\n if (h < ch) { chunk = child; continue outer }\n h -= ch;\n n += child.chunkSize();\n }\n return n\n } while (!chunk.lines)\n var i = 0;\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) { break }\n h -= lh;\n }\n return n + i\n }" ]
[ "0.7643142", "0.76322407", "0.7603572", "0.759263", "0.759263", "0.759263", "0.7586977", "0.7570517", "0.7570517", "0.7570517", "0.7570517", "0.7570517", "0.7570517", "0.7570517", "0.75112087", "0.75112087", "0.75112087", "0.75112087", "0.75112087", "0.75112087", "0.75112087", "0.75112087", "0.75112087", "0.75112087", "0.75112087", "0.7504268", "0.7504268", "0.6134262", "0.6117432", "0.61004794", "0.60922456", "0.60817695", "0.60817695", "0.60817695", "0.60817695", "0.60817695", "0.60817695", "0.60817695", "0.60703015", "0.60703015", "0.60600466", "0.60600466", "0.60600466", "0.60600466", "0.60600466", "0.60600466", "0.60600466", "0.60600466", "0.60600466", "0.60600466", "0.60600466", "0.60600466", "0.60600466", "0.60600466", "0.60600466", "0.60600466", "0.60600466", "0.60468405", "0.60468405", "0.60315716", "0.6020424", "0.6000995", "0.5986019", "0.5986019", "0.5986019", "0.5986019", "0.5986019", "0.5986019", "0.5986019", "0.5986019", "0.5986019", "0.5986019", "0.5986019", "0.5945535", "0.5918904", "0.5903622", "0.5898164", "0.5894079", "0.5894079", "0.5894079", "0.58852696", "0.5878318", "0.5878318", "0.5878318" ]
0.7586683
21
Find the line at the given vertical position, using the height information in the document tree.
function lineAtHeight(chunk, h) { var n = chunk.first; outer: do { for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) { var child = chunk.children[i$1], ch = child.height; if (h < ch) { chunk = child; continue outer } h -= ch; n += child.chunkSize(); } return n } while (!chunk.lines) var i = 0; for (; i < chunk.lines.length; ++i) { var line = chunk.lines[i], lh = line.height; if (h < lh) { break } h -= lh; } return n + i }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateLineHeight(line, height) {\n var diff = height - line.height;\n\n if (diff) {\n for (var n = line; n; n = n.parent) {\n n.height += diff;\n }\n }\n } // Given a line object, find its line number by walking up through", "lineBlockAtHeight(height) {\n this.readMeasured();\n return this.viewState.lineBlockAtHeight(height);\n }", "function lineAtHeight(chunk, h) {\n\t var n = chunk.first;\n\t outer: do {\n\t for (var i = 0; i < chunk.children.length; ++i) {\n\t var child = chunk.children[i], ch = child.height;\n\t if (h < ch) { chunk = child; continue outer; }\n\t h -= ch;\n\t n += child.chunkSize();\n\t }\n\t return n;\n\t } while (!chunk.lines);\n\t for (var i = 0; i < chunk.lines.length; ++i) {\n\t var line = chunk.lines[i], lh = line.height;\n\t if (h < lh) break;\n\t h -= lh;\n\t }\n\t return n + i;\n\t }", "function lineAtHeight(chunk, h) {\n\t var n = chunk.first;\n\t outer: do {\n\t for (var i = 0; i < chunk.children.length; ++i) {\n\t var child = chunk.children[i], ch = child.height;\n\t if (h < ch) { chunk = child; continue outer; }\n\t h -= ch;\n\t n += child.chunkSize();\n\t }\n\t return n;\n\t } while (!chunk.lines);\n\t for (var i = 0; i < chunk.lines.length; ++i) {\n\t var line = chunk.lines[i], lh = line.height;\n\t if (h < lh) break;\n\t h -= lh;\n\t }\n\t return n + i;\n\t }", "function lineAtHeight(chunk, h) {\n\t var n = chunk.first;\n\t outer: do {\n\t for (var i = 0; i < chunk.children.length; ++i) {\n\t var child = chunk.children[i], ch = child.height;\n\t if (h < ch) { chunk = child; continue outer; }\n\t h -= ch;\n\t n += child.chunkSize();\n\t }\n\t return n;\n\t } while (!chunk.lines);\n\t for (var i = 0; i < chunk.lines.length; ++i) {\n\t var line = chunk.lines[i], lh = line.height;\n\t if (h < lh) break;\n\t h -= lh;\n\t }\n\t return n + i;\n\t }", "function lineAtHeight(chunk, h) {\n\t\t var n = chunk.first;\n\t\t outer: do {\n\t\t for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n\t\t var child = chunk.children[i$1], ch = child.height;\n\t\t if (h < ch) { chunk = child; continue outer }\n\t\t h -= ch;\n\t\t n += child.chunkSize();\n\t\t }\n\t\t return n\n\t\t } while (!chunk.lines)\n\t\t var i = 0;\n\t\t for (; i < chunk.lines.length; ++i) {\n\t\t var line = chunk.lines[i], lh = line.height;\n\t\t if (h < lh) { break }\n\t\t h -= lh;\n\t\t }\n\t\t return n + i\n\t\t }", "function lineAtHeight(chunk, h) {\n\t\t var n = chunk.first;\n\t\t outer: do {\n\t\t for (var i = 0; i < chunk.children.length; ++i) {\n\t\t var child = chunk.children[i], ch = child.height;\n\t\t if (h < ch) { chunk = child; continue outer; }\n\t\t h -= ch;\n\t\t n += child.chunkSize();\n\t\t }\n\t\t return n;\n\t\t } while (!chunk.lines);\n\t\t for (var i = 0; i < chunk.lines.length; ++i) {\n\t\t var line = chunk.lines[i], lh = line.height;\n\t\t if (h < lh) break;\n\t\t h -= lh;\n\t\t }\n\t\t return n + i;\n\t\t }", "getYForLine(line) {\n const options = this.options;\n const spacing = options.spacing_between_lines_px;\n const headroom = options.space_above_staff_ln;\n\n const y = this.y + (line * spacing) + (headroom * spacing);\n\n return y;\n }", "vertLineAt (x) { return this._vert[this.vertIdxAt(x)] }", "function lineAtHeight(chunk, h) {\r\n var n = chunk.first;\r\n outer: do {\r\n for (var i = 0; i < chunk.children.length; ++i) {\r\n var child = chunk.children[i], ch = child.height;\r\n if (h < ch) { chunk = child; continue outer; }\r\n h -= ch;\r\n n += child.chunkSize();\r\n }\r\n return n;\r\n } while (!chunk.lines);\r\n for (var i = 0; i < chunk.lines.length; ++i) {\r\n var line = chunk.lines[i], lh = line.height;\r\n if (h < lh) break;\r\n h -= lh;\r\n }\r\n return n + i;\r\n }", "function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i = 0; i < chunk.children.length; ++i) {\n var child = chunk.children[i], ch = child.height;\n if (h < ch) { chunk = child; continue outer; }\n h -= ch;\n n += child.chunkSize();\n }\n return n;\n } while (!chunk.lines);\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) break;\n h -= lh;\n }\n return n + i;\n }", "function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i = 0; i < chunk.children.length; ++i) {\n var child = chunk.children[i], ch = child.height;\n if (h < ch) { chunk = child; continue outer; }\n h -= ch;\n n += child.chunkSize();\n }\n return n;\n } while (!chunk.lines);\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) break;\n h -= lh;\n }\n return n + i;\n }", "function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i = 0; i < chunk.children.length; ++i) {\n var child = chunk.children[i], ch = child.height;\n if (h < ch) { chunk = child; continue outer; }\n h -= ch;\n n += child.chunkSize();\n }\n return n;\n } while (!chunk.lines);\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) break;\n h -= lh;\n }\n return n + i;\n }", "function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i = 0; i < chunk.children.length; ++i) {\n var child = chunk.children[i], ch = child.height;\n if (h < ch) { chunk = child; continue outer; }\n h -= ch;\n n += child.chunkSize();\n }\n return n;\n } while (!chunk.lines);\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) break;\n h -= lh;\n }\n return n + i;\n }", "function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i = 0; i < chunk.children.length; ++i) {\n var child = chunk.children[i], ch = child.height;\n if (h < ch) { chunk = child; continue outer; }\n h -= ch;\n n += child.chunkSize();\n }\n return n;\n } while (!chunk.lines);\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) break;\n h -= lh;\n }\n return n + i;\n }", "function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i = 0; i < chunk.children.length; ++i) {\n var child = chunk.children[i], ch = child.height;\n if (h < ch) { chunk = child; continue outer; }\n h -= ch;\n n += child.chunkSize();\n }\n return n;\n } while (!chunk.lines);\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) break;\n h -= lh;\n }\n return n + i;\n }", "function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i = 0; i < chunk.children.length; ++i) {\n var child = chunk.children[i], ch = child.height;\n if (h < ch) { chunk = child; continue outer; }\n h -= ch;\n n += child.chunkSize();\n }\n return n;\n } while (!chunk.lines);\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) break;\n h -= lh;\n }\n return n + i;\n }", "function lineAtHeight(chunk, h) {\r\n var n = chunk.first;\r\n outer: do {\r\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\r\n var child = chunk.children[i$1], ch = child.height;\r\n if (h < ch) { chunk = child; continue outer }\r\n h -= ch;\r\n n += child.chunkSize();\r\n }\r\n return n\r\n } while (!chunk.lines)\r\n var i = 0;\r\n for (; i < chunk.lines.length; ++i) {\r\n var line = chunk.lines[i], lh = line.height;\r\n if (h < lh) { break }\r\n h -= lh;\r\n }\r\n return n + i\r\n}", "function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height;\n if (h < ch) { chunk = child; continue outer }\n h -= ch;\n n += child.chunkSize();\n }\n return n\n } while (!chunk.lines)\n var i = 0;\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) { break }\n h -= lh;\n }\n return n + i\n}", "function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height;\n if (h < ch) { chunk = child; continue outer }\n h -= ch;\n n += child.chunkSize();\n }\n return n\n } while (!chunk.lines)\n var i = 0;\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) { break }\n h -= lh;\n }\n return n + i\n}", "function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height;\n if (h < ch) { chunk = child; continue outer }\n h -= ch;\n n += child.chunkSize();\n }\n return n\n } while (!chunk.lines)\n var i = 0;\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) { break }\n h -= lh;\n }\n return n + i\n}", "function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height;\n if (h < ch) { chunk = child; continue outer }\n h -= ch;\n n += child.chunkSize();\n }\n return n\n } while (!chunk.lines)\n var i = 0;\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) { break }\n h -= lh;\n }\n return n + i\n}", "function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height;\n if (h < ch) { chunk = child; continue outer }\n h -= ch;\n n += child.chunkSize();\n }\n return n\n } while (!chunk.lines)\n var i = 0;\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) { break }\n h -= lh;\n }\n return n + i\n}", "function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height;\n if (h < ch) { chunk = child; continue outer }\n h -= ch;\n n += child.chunkSize();\n }\n return n\n } while (!chunk.lines)\n var i = 0;\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) { break }\n h -= lh;\n }\n return n + i\n}", "function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height;\n if (h < ch) { chunk = child; continue outer }\n h -= ch;\n n += child.chunkSize();\n }\n return n\n } while (!chunk.lines)\n var i = 0;\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) { break }\n h -= lh;\n }\n return n + i\n}", "function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height;\n if (h < ch) { chunk = child; continue outer }\n h -= ch;\n n += child.chunkSize();\n }\n return n\n } while (!chunk.lines)\n var i = 0;\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) { break }\n h -= lh;\n }\n return n + i\n}", "function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height;\n if (h < ch) { chunk = child; continue outer }\n h -= ch;\n n += child.chunkSize();\n }\n return n\n } while (!chunk.lines)\n var i = 0;\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) { break }\n h -= lh;\n }\n return n + i\n}", "function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height;\n if (h < ch) { chunk = child; continue outer }\n h -= ch;\n n += child.chunkSize();\n }\n return n\n } while (!chunk.lines)\n var i = 0;\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) { break }\n h -= lh;\n }\n return n + i\n}", "function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height;\n if (h < ch) { chunk = child; continue outer }\n h -= ch;\n n += child.chunkSize();\n }\n return n\n } while (!chunk.lines)\n var i = 0;\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) { break }\n h -= lh;\n }\n return n + i\n}", "function _lineAtHeight(chunk, h) {\n var n = chunk.first;\n\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1],\n ch = child.height;\n\n if (h < ch) {\n chunk = child;\n continue outer;\n }\n\n h -= ch;\n n += child.chunkSize();\n }\n\n return n;\n } while (!chunk.lines);\n\n var i = 0;\n\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i],\n lh = line.height;\n\n if (h < lh) {\n break;\n }\n\n h -= lh;\n }\n\n return n + i;\n }", "function lineAtHeight(chunk, h) {\n var n = chunk.first\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height\n if (h < ch) { chunk = child; continue outer }\n h -= ch\n n += child.chunkSize()\n }\n return n\n } while (!chunk.lines)\n var i = 0\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height\n if (h < lh) { break }\n h -= lh\n }\n return n + i\n}", "function lineAtHeight(chunk, h) {\n var n = chunk.first\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height\n if (h < ch) { chunk = child; continue outer }\n h -= ch\n n += child.chunkSize()\n }\n return n\n } while (!chunk.lines)\n var i = 0\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height\n if (h < lh) { break }\n h -= lh\n }\n return n + i\n}", "function getLocation(source, position) {\n let lastLineStart = 0;\n let line = 1;\n\n for (const match of source.body.matchAll(LineRegExp)) {\n typeof match.index === 'number' || invariant(false);\n\n if (match.index >= position) {\n break;\n }\n\n lastLineStart = match.index + match[0].length;\n line += 1;\n }\n\n return {\n line,\n column: position + 1 - lastLineStart,\n };\n}", "function heightAtLine(lineObj) {\n\t\t lineObj = visualLine(lineObj);\n\t\t\n\t\t var h = 0, chunk = lineObj.parent;\n\t\t for (var i = 0; i < chunk.lines.length; ++i) {\n\t\t var line = chunk.lines[i];\n\t\t if (line == lineObj) break;\n\t\t else h += line.height;\n\t\t }\n\t\t for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n\t\t for (var i = 0; i < p.children.length; ++i) {\n\t\t var cur = p.children[i];\n\t\t if (cur == chunk) break;\n\t\t else h += cur.height;\n\t\t }\n\t\t }\n\t\t return h;\n\t\t }", "function heightAtLine(lineObj) {\n\t\t lineObj = visualLine(lineObj);\n\n\t\t var h = 0, chunk = lineObj.parent;\n\t\t for (var i = 0; i < chunk.lines.length; ++i) {\n\t\t var line = chunk.lines[i];\n\t\t if (line == lineObj) { break }\n\t\t else { h += line.height; }\n\t\t }\n\t\t for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n\t\t for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n\t\t var cur = p.children[i$1];\n\t\t if (cur == chunk) { break }\n\t\t else { h += cur.height; }\n\t\t }\n\t\t }\n\t\t return h\n\t\t }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj)\n\n var h = 0, chunk = lineObj.parent\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i]\n if (line == lineObj) { break }\n else { h += line.height }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1]\n if (cur == chunk) { break }\n else { h += cur.height }\n }\n }\n return h\n}", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj)\n\n var h = 0, chunk = lineObj.parent\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i]\n if (line == lineObj) { break }\n else { h += line.height }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1]\n if (cur == chunk) { break }\n else { h += cur.height }\n }\n }\n return h\n}", "function heightAtLine(lineObj) {\n\t lineObj = visualLine(lineObj);\n\t\n\t var h = 0, chunk = lineObj.parent;\n\t for (var i = 0; i < chunk.lines.length; ++i) {\n\t var line = chunk.lines[i];\n\t if (line == lineObj) break;\n\t else h += line.height;\n\t }\n\t for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n\t for (var i = 0; i < p.children.length; ++i) {\n\t var cur = p.children[i];\n\t if (cur == chunk) break;\n\t else h += cur.height;\n\t }\n\t }\n\t return h;\n\t }", "function heightAtLine(lineObj) {\r\n lineObj = visualLine(lineObj);\r\n\r\n var h = 0, chunk = lineObj.parent;\r\n for (var i = 0; i < chunk.lines.length; ++i) {\r\n var line = chunk.lines[i];\r\n if (line == lineObj) break;\r\n else h += line.height;\r\n }\r\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\r\n for (var i = 0; i < p.children.length; ++i) {\r\n var cur = p.children[i];\r\n if (cur == chunk) break;\r\n else h += cur.height;\r\n }\r\n }\r\n return h;\r\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) break;\n else h += line.height;\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i = 0; i < p.children.length; ++i) {\n var cur = p.children[i];\n if (cur == chunk) break;\n else h += cur.height;\n }\n }\n return h;\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) break;\n else h += line.height;\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i = 0; i < p.children.length; ++i) {\n var cur = p.children[i];\n if (cur == chunk) break;\n else h += cur.height;\n }\n }\n return h;\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) break;\n else h += line.height;\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i = 0; i < p.children.length; ++i) {\n var cur = p.children[i];\n if (cur == chunk) break;\n else h += cur.height;\n }\n }\n return h;\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) break;\n else h += line.height;\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i = 0; i < p.children.length; ++i) {\n var cur = p.children[i];\n if (cur == chunk) break;\n else h += cur.height;\n }\n }\n return h;\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) break;\n else h += line.height;\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i = 0; i < p.children.length; ++i) {\n var cur = p.children[i];\n if (cur == chunk) break;\n else h += cur.height;\n }\n }\n return h;\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) break;\n else h += line.height;\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i = 0; i < p.children.length; ++i) {\n var cur = p.children[i];\n if (cur == chunk) break;\n else h += cur.height;\n }\n }\n return h;\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) break;\n else h += line.height;\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i = 0; i < p.children.length; ++i) {\n var cur = p.children[i];\n if (cur == chunk) break;\n else h += cur.height;\n }\n }\n return h;\n }", "getLine(x, y) {\n var cell = this.getCell(x, y)\n if (cell == null) return null\n if (cell.type !== 'line') return null\n return cell.line\n }", "function heightAtLine(lineObj) {\n\t lineObj = visualLine(lineObj);\n\n\t var h = 0, chunk = lineObj.parent;\n\t for (var i = 0; i < chunk.lines.length; ++i) {\n\t var line = chunk.lines[i];\n\t if (line == lineObj) break;\n\t else h += line.height;\n\t }\n\t for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n\t for (var i = 0; i < p.children.length; ++i) {\n\t var cur = p.children[i];\n\t if (cur == chunk) break;\n\t else h += cur.height;\n\t }\n\t }\n\t return h;\n\t }", "function heightAtLine(lineObj) {\n\t lineObj = visualLine(lineObj);\n\n\t var h = 0, chunk = lineObj.parent;\n\t for (var i = 0; i < chunk.lines.length; ++i) {\n\t var line = chunk.lines[i];\n\t if (line == lineObj) break;\n\t else h += line.height;\n\t }\n\t for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n\t for (var i = 0; i < p.children.length; ++i) {\n\t var cur = p.children[i];\n\t if (cur == chunk) break;\n\t else h += cur.height;\n\t }\n\t }\n\t return h;\n\t }", "vertLine (idx) { return this._vert[idx] }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n}", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n}", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n}", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n}", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n}", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n}", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n}", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n}", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n}", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n}", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n}", "function heightAtLine(lineObj) {\r\n lineObj = visualLine(lineObj);\r\n\r\n var h = 0, chunk = lineObj.parent;\r\n for (var i = 0; i < chunk.lines.length; ++i) {\r\n var line = chunk.lines[i];\r\n if (line == lineObj) { break }\r\n else { h += line.height; }\r\n }\r\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\r\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\r\n var cur = p.children[i$1];\r\n if (cur == chunk) { break }\r\n else { h += cur.height; }\r\n }\r\n }\r\n return h\r\n}", "function wordLinePosition() {\n $('.line-container').each(function () {\n line = $(this).find('.vertical-line');\n word = $(this).find('h2');\n wordInner = word.html();\n wordFuture = '';\n tran = .1 * wordInner.length;\n for (i = 0; i < wordInner.length; i++) {\n wordFuture += '<span style=\"right:' + 100 + 'px; \">' + wordInner[i] + '</span>';\n }\n word.html(wordFuture);\n line.attr('data-height', ($(this).height() - word.width() - 15));\n });\n}", "function updateLineHeight(line, height) {\n\t\t var diff = height - line.height;\n\t\t if (diff) for (var n = line; n; n = n.parent) n.height += diff;\n\t\t }", "lineAt(pos) {\n if (pos < 0 || pos > this.length)\n throw new RangeError(`Invalid position ${pos} in document of length ${this.length}`);\n return this.lineInner(pos, false, 1, 0);\n }", "function updateLineHeight(line, height) {\n\t var diff = height - line.height;\n\t if (diff) for (var n = line; n; n = n.parent) n.height += diff;\n\t }", "function updateLineHeight(line, height) {\n\t var diff = height - line.height;\n\t if (diff) for (var n = line; n; n = n.parent) n.height += diff;\n\t }" ]
[ "0.6573439", "0.6411567", "0.63364756", "0.63364756", "0.63364756", "0.63168085", "0.62935245", "0.62645507", "0.62553746", "0.6222597", "0.62026316", "0.62026316", "0.62026316", "0.62026316", "0.62026316", "0.62026316", "0.62026316", "0.6181615", "0.6169785", "0.6169785", "0.6169785", "0.6169785", "0.6169785", "0.6169785", "0.6169785", "0.6169785", "0.6169785", "0.6169785", "0.6169785", "0.61614215", "0.6131293", "0.6131293", "0.61194557", "0.6089744", "0.6042342", "0.60273045", "0.60273045", "0.6015956", "0.59893394", "0.5988382", "0.5988382", "0.5988382", "0.5988382", "0.5988382", "0.5988382", "0.5988382", "0.5988382", "0.5988382", "0.5988382", "0.5988382", "0.5988382", "0.5988382", "0.5988382", "0.5988382", "0.5988382", "0.5988382", "0.5987277", "0.5987277", "0.5987277", "0.5987277", "0.5987277", "0.5987277", "0.5987277", "0.598596", "0.5976732", "0.5976732", "0.5961951", "0.59532017", "0.59532017", "0.59532017", "0.59532017", "0.59532017", "0.59532017", "0.59532017", "0.59532017", "0.59532017", "0.59532017", "0.59532017", "0.59451103", "0.59124255", "0.5830241", "0.5812722", "0.58014405", "0.58014405" ]
0.6221541
23
A Pos instance represents a position within the text.
function Pos(line, ch, sticky) { if ( sticky === void 0 ) sticky = null; if (!(this instanceof Pos)) { return new Pos(line, ch, sticky) } this.line = line; this.ch = ch; this.sticky = sticky; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Pos (line, ch) {\n if (!(this instanceof Pos)) { return new Pos(line, ch) }\n this.line = line; this.ch = ch\n}", "function Pos(x, y) {\n this.x = x; this.y = y;\n}", "function Pos(line, ch, sticky) {\n\t\t if ( sticky === void 0 ) sticky = null;\n\n\t\t if (!(this instanceof Pos)) { return new Pos(line, ch, sticky) }\n\t\t this.line = line;\n\t\t this.ch = ch;\n\t\t this.sticky = sticky;\n\t\t }", "function Pos(x, y) {\n this.x = x || 0;\n this.y = y || 0;\n}", "function Pos(line, ch, sticky) {\n if ( sticky === void 0 ) sticky = null;\n\n if (!(this instanceof Pos)) { return new Pos(line, ch, sticky) }\n this.line = line\n this.ch = ch\n this.sticky = sticky\n}", "function Pos(line, ch, sticky) {\n if ( sticky === void 0 ) sticky = null;\n\n if (!(this instanceof Pos)) { return new Pos(line, ch, sticky) }\n this.line = line;\n this.ch = ch;\n this.sticky = sticky;\n}", "function Pos(line, ch, sticky) {\n if ( sticky === void 0 ) sticky = null;\n\n if (!(this instanceof Pos)) { return new Pos(line, ch, sticky) }\n this.line = line;\n this.ch = ch;\n this.sticky = sticky;\n}", "function Pos(line, ch, sticky) {\n if ( sticky === void 0 ) sticky = null;\n\n if (!(this instanceof Pos)) { return new Pos(line, ch, sticky) }\n this.line = line;\n this.ch = ch;\n this.sticky = sticky;\n}", "function Pos(line, ch, sticky) {\n if ( sticky === void 0 ) sticky = null;\n\n if (!(this instanceof Pos)) { return new Pos(line, ch, sticky) }\n this.line = line;\n this.ch = ch;\n this.sticky = sticky;\n}", "function Pos(line, ch, sticky) {\n if ( sticky === void 0 ) sticky = null;\n\n if (!(this instanceof Pos)) { return new Pos(line, ch, sticky) }\n this.line = line;\n this.ch = ch;\n this.sticky = sticky;\n}", "function Pos(line, ch, sticky) {\n if ( sticky === void 0 ) sticky = null;\n\n if (!(this instanceof Pos)) { return new Pos(line, ch, sticky) }\n this.line = line;\n this.ch = ch;\n this.sticky = sticky;\n}", "function Pos(line, ch, sticky) {\n if ( sticky === void 0 ) sticky = null;\n\n if (!(this instanceof Pos)) { return new Pos(line, ch, sticky) }\n this.line = line;\n this.ch = ch;\n this.sticky = sticky;\n}", "function Pos(line, ch, sticky) {\n if ( sticky === void 0 ) sticky = null;\n\n if (!(this instanceof Pos)) { return new Pos(line, ch, sticky) }\n this.line = line;\n this.ch = ch;\n this.sticky = sticky;\n}", "function Pos(line, ch, sticky) {\n if ( sticky === void 0 ) sticky = null;\n\n if (!(this instanceof Pos)) { return new Pos(line, ch, sticky) }\n this.line = line;\n this.ch = ch;\n this.sticky = sticky;\n}", "function Pos(line, ch, sticky) {\n if ( sticky === void 0 ) sticky = null;\n\n if (!(this instanceof Pos)) { return new Pos(line, ch, sticky) }\n this.line = line;\n this.ch = ch;\n this.sticky = sticky;\n}", "function Pos(line, ch, sticky) {\n if ( sticky === void 0 ) sticky = null;\n\n if (!(this instanceof Pos)) { return new Pos(line, ch, sticky) }\n this.line = line;\n this.ch = ch;\n this.sticky = sticky;\n}", "function Pos(x,y)\r\n{\r\n this.x = x;\r\n this.y = y;\r\n}", "function Pos(line, ch, sticky) {\r\n if ( sticky === void 0 ) sticky = null;\r\n\r\n if (!(this instanceof Pos)) { return new Pos(line, ch, sticky) }\r\n this.line = line;\r\n this.ch = ch;\r\n this.sticky = sticky;\r\n}", "function Posn(x, y) {\n\tthis.x = x;\n \tthis.y = y;\n}", "function Pos(row, col){\n this.row = row;\n this.col = col;\n this.toString = function(){\n return row + '/' + col;\n }\n}", "function Position (x, y) {\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}", "function position(val, norm_fn)\n{\n norm_fn = def(norm_fn, normalizePosition);\n\n var value = norm_fn(val);\n require(typeof value !== 'undefined',\n \"Cannot create Position instance from \" + repr(val));\n\n return new Position(value);\n}", "function position(val, norm_fn)\n{\n norm_fn = def(norm_fn, normalizePosition);\n\n var value = norm_fn(val);\n require(typeof value !== 'undefined',\n \"Cannot create Position instance from \" + repr(val));\n\n return new Position(value);\n}", "function Position (x, y) \n{\n\tthis.x = x;\n\tthis.y = y;\n}", "function Position() {\n this.x = 0;\n this.y = 0;\n}", "function Position(x, y)\n{\n\tthis.x = x;\n\tthis.y = y;\n}", "function Position(start) {\n this.start = start;\n this.end = { line: lineno, column: column };\n this.source = options.source;\n }", "function Position(start) {\n this.start = start;\n this.end = { line: lineno, column: column };\n this.source = options.source;\n }", "function Position(start) {\n this.start = start;\n this.end = { line: lineno, column: column };\n this.source = options.source;\n }", "function Position(start) {\n this.start = start;\n this.end = { line: lineno, column: column };\n this.source = options.source;\n }", "function Position(start) {\n this.start = start;\n this.end = { line: lineno, column: column };\n this.source = options.source;\n }", "function Position(start) {\n this.start = start;\n this.end = { line: lineno, column: column };\n this.source = options.source;\n }", "function Position(start) {\n this.start = start;\n this.end = {\n line: lineno,\n column\n };\n this.source = options.source;\n }", "function Position(x,y){\n this.x = x;\n this.y = y;\n}", "function Position(x,y){\n this.x = x;\n this.y = y;\n}", "function Pos(x, y, z) {\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n\r\n this.toString = function() {\r\n return this.x + ',' + this.y + (z ? ',' + z : '');\r\n };\r\n}", "function Position(x, y){\n this.x = x;\n this.y = y;\n}", "function Position(start) {\n this.start = start;\n this.end = now();\n }", "function Position(start) {\n this.start = start;\n this.end = now();\n }", "function Position(start) {\n this.start = start;\n this.end = now();\n }", "function Position(start) {\n this.start = start;\n this.end = now();\n }", "function Position(start) {\n this.start = start;\n this.end = now();\n }", "function Position(start) {\n\t this.start = start;\n\t this.end = { line: lineno, column: column };\n\t this.source = options.source;\n\t }", "function Position(start) {\n this.start = start\n this.end = {line: lineno, column: column}\n this.source = options.source\n }", "constructor(pos) {\n this.pos = pos;\n }", "function Position (x, y) {\n this.x = x;\n this.y = y;\n this.position = this;\n}", "function pos() {\r\n var p = _pfa(arguments);\r\n\r\n if (p) {\r\n self.moveTo(p.x, p.y);\r\n }\r\n\r\n return new Pos(ie ? self.screenLeft : self.screenX,\r\n ie ? self.screenTop : self.screenY);\r\n}", "function Position(start) {\n this.start = start\n this.end = now()\n }", "function pos(...args) {\n return {\n id: \"pos\",\n pos: vec2(...args),\n\n // TODO: check physics here?\n move(...args) {\n const p = vec2(...args);\n const dx = p.x * dt();\n const dy = p.y * dt();\n\n this.pos.x += dx;\n this.pos.y += dy;\n },\n\n screenPos() {\n // If you disable this, camera Matrix still works\n return game.camMatrix.multVec2(this.pos);\n },\n\n inspect() {\n return {\n pos: `(${~~this.pos.x}, ${~~this.pos.y})`,\n };\n },\n };\n }", "get pos()\n\t{\n\t\treturn new NodeGraph.Position(this.x, this.y);\n\t}", "function Position() {\n /**\n * @param {integer} x\n * @param {integer} y\n */\n var Position = function(x, y) {\n this.x = x;\n this.y = y;\n }\n\n /**\n * @param {Position} anotherPosition\n * @returns {boolean}\n */\n Position.prototype.equals = function (anotherPosition) {\n return anotherPosition.x == this.x && anotherPosition.y == this.y;\n }\n\n return Position;\n }", "coordsForChar(pos) {\n this.readMeasured();\n return this.docView.coordsForChar(pos);\n }", "function Position(line, column) {\n\tvar self = new Position.create();\n\tself.line = line;\n\tself.column = column;\n\treturn self;\n}", "function _pos() {\r\n var p = _pfa(arguments);\r\n if (p) {\r\n this.p = absPos(this, p);\r\n }\r\n return objCss(this, \"position\") == \"absolute\" ? this.p : absPos(this);\r\n}", "function Position(left, top) {\n this.left = left;\n this.top = top;\n}", "function Position(left, top) {\n this.left = left;\n this.top = top;\n}", "set pos(newPos) {\n this._pos = newPos;\n }", "function getPos() {\n\t\treturn _this.position;\n\t}", "positionAt(offset) {\n const before = this.textDocument.slice(0, offset);\n const newLines = before.match(/\\n/g);\n const line = newLines ? newLines.length : 0;\n const preCharacters = before.match(/(\\n|^).*$/g);\n return new tokenizer_1.Position(line, preCharacters ? preCharacters[0].length : 0);\n }", "constructor($pos) {\n let node = $pos.nodeAfter;\n let $end = $pos.node(0).resolve($pos.pos + node.nodeSize);\n super($pos, $end);\n this.node = node;\n }", "function Player(pos) {\n this.type = 'player';\n this.pos = pos.plus(new Vector(0.1, 0.1));\n this.size = new Vector(0.9, 0.9);\n this.speed = new Vector(0, 0);\n}", "function Line (position) {\n\tthis.position = position; \n}", "function position(token) {\n return {start: point(token.start), end: point(token.end)}\n }", "function PosWithInfo(line, ch, outside, xRel) {\n\t\t var pos = Pos(line, ch);\n\t\t pos.xRel = xRel;\n\t\t if (outside) pos.outside = true;\n\t\t return pos;\n\t\t }", "constructor(x_pos, y_pos) {\n this.x_pos = x_pos;\n this.y_pos = y_pos;\n }", "function position() {\n var before = now()\n\n return update\n\n // Add the position to a node.\n function update(node, indent) {\n var previous = node.position\n var start = previous ? previous.start : before\n var combined = []\n var n = previous && previous.end.line\n var l = before.line\n\n node.position = new Position(start)\n\n // If there was already a `position`, this node was merged. Fixing\n // `start` wasn’t hard, but the indent is different. Especially\n // because some information, the indent between `n` and `l` wasn’t\n // tracked. Luckily, that space is (should be?) empty, so we can\n // safely check for it now.\n if (previous && indent && previous.indent) {\n combined = previous.indent\n\n if (n < l) {\n while (++n < l) {\n combined.push((offset[n] || 0) + 1)\n }\n\n combined.push(before.column)\n }\n\n indent = combined.concat(indent)\n }\n\n node.position.indent = indent || []\n\n return node\n }\n }", "addPosition(pos) {\n this.positions += '=\"'+pos.line + ':' + pos.linePosition + '\",';\n }", "function PosWithInfo(line, ch, outside, xRel) {\n\t var pos = Pos(line, ch);\n\t pos.xRel = xRel;\n\t if (outside) pos.outside = true;\n\t return pos;\n\t }", "function PosWithInfo(line, ch, outside, xRel) {\n\t var pos = Pos(line, ch);\n\t pos.xRel = xRel;\n\t if (outside) pos.outside = true;\n\t return pos;\n\t }", "function PosWithInfo(line, ch, outside, xRel) {\n\t var pos = Pos(line, ch);\n\t pos.xRel = xRel;\n\t if (outside) pos.outside = true;\n\t return pos;\n\t }", "constructor(pos, mark) {\n super();\n this.pos = pos;\n this.mark = mark;\n }", "constructor(pos, mark) {\n super();\n this.pos = pos;\n this.mark = mark;\n }", "function Coordinates(posX, posY){\n\tthis.posX = posX;\n\tthis.posY = posY;\n}", "pos() {\n if (this.is_vertex()) {\n return this.position;\n } else {\n return this.offset;\n }\n }", "createPosition () {\n\t\treturn {\n\t\t\tstart: {\n\t\t\t\tline: this.line,\n\t\t\t\tcolumn: this.col\n\t\t\t},\n\t\t\tsource: this.source,\n\t\t\trange: [ this.pos ]\n\t\t};\n\t}", "positionAt(offset) {\n return (0, utils_1.positionAt)(offset, this.getText(), this.getLineOffsets());\n }", "function PosWithInfo(line, ch, outside, xRel) {\n var pos = Pos(line, ch);\n pos.xRel = xRel;\n if (outside) pos.outside = true;\n return pos;\n }", "function PosWithInfo(line, ch, outside, xRel) {\n var pos = Pos(line, ch);\n pos.xRel = xRel;\n if (outside) pos.outside = true;\n return pos;\n }", "function PosWithInfo(line, ch, outside, xRel) {\n var pos = Pos(line, ch);\n pos.xRel = xRel;\n if (outside) pos.outside = true;\n return pos;\n }", "function PosWithInfo(line, ch, outside, xRel) {\n var pos = Pos(line, ch);\n pos.xRel = xRel;\n if (outside) pos.outside = true;\n return pos;\n }", "function PosWithInfo(line, ch, outside, xRel) {\n var pos = Pos(line, ch);\n pos.xRel = xRel;\n if (outside) pos.outside = true;\n return pos;\n }", "function PosWithInfo(line, ch, outside, xRel) {\n var pos = Pos(line, ch);\n pos.xRel = xRel;\n if (outside) pos.outside = true;\n return pos;\n }", "function PosWithInfo(line, ch, outside, xRel) {\n var pos = Pos(line, ch);\n pos.xRel = xRel;\n if (outside) pos.outside = true;\n return pos;\n }", "function PosWithInfo(line, ch, outside, xRel) {\n var pos = Pos(line, ch);\n pos.xRel = xRel;\n if (outside) pos.outside = true;\n return pos;\n }" ]
[ "0.7743738", "0.73251367", "0.73067117", "0.72285366", "0.71545565", "0.7152565", "0.7152565", "0.7152565", "0.7152565", "0.7152565", "0.7152565", "0.7152565", "0.7152565", "0.7152565", "0.7152565", "0.7152565", "0.71458405", "0.71267843", "0.7100741", "0.684175", "0.66544276", "0.6566076", "0.6566076", "0.6506191", "0.64914435", "0.6490741", "0.64610595", "0.64610595", "0.64610595", "0.64610595", "0.64610595", "0.64610595", "0.64334375", "0.64154845", "0.64154845", "0.63969344", "0.63877594", "0.6336423", "0.6336423", "0.6336423", "0.6336423", "0.6336423", "0.6326423", "0.6299779", "0.62714994", "0.6271007", "0.6220605", "0.6217557", "0.620875", "0.62027705", "0.61779475", "0.6096117", "0.6080788", "0.6065728", "0.6058073", "0.6058073", "0.5964492", "0.58962923", "0.5861415", "0.5837144", "0.57979375", "0.57713366", "0.577048", "0.5753291", "0.57515323", "0.5736383", "0.57262385", "0.57233685", "0.57233685", "0.57233685", "0.5681281", "0.5681281", "0.56681323", "0.56679994", "0.56663215", "0.5660416", "0.5643661", "0.5643661", "0.5643661", "0.5643661", "0.5643661", "0.5643661", "0.5643661", "0.5643661" ]
0.7239422
17
Compare two positions, return 0 if they are the same, a negative number when a is less, and a positive number otherwise.
function cmp(a, b) { return a.line - b.line || a.ch - b.ch }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function posCompare(a, b) {\n const yDiff = a[1] - b[1];\n if (yDiff !== 0) return yDiff;\n return a[0] - b[0];\n}", "function compare(a,b) {\n if (a.x < b.x)\n return -1;\n if (a.x > b.x)\n return 1;\n return 0;\n }", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare(a, b) {\n if (a < b) {\n return -1\n } else if (b < a) {\n return 1\n } else {\n return 0\n }\n}", "function compare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}", "function compare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}", "function compare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}", "function compare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}", "function compare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}", "function _comparePosition(a,b){return a.compareDocumentPosition?a.compareDocumentPosition(b):a.contains?(a!=b&&a.contains(b)&&16)+(a!=b&&b.contains(a)&&8)+(0<=a.sourceIndex&&0<=b.sourceIndex?(a.sourceIndex<b.sourceIndex&&4)+(a.sourceIndex>b.sourceIndex&&2):1)+0:0}", "function compare(a, b) {\n\t return a < b ? -1 : a > b ? 1 : 0;\n\t}", "function compare(a, b) {\n\t return a < b ? -1 : a > b ? 1 : 0;\n\t}", "function compare(a, b) {\n return a > b ? 1 : a < b ? -1 : 0;\n}", "function compare (a, b) {\n if (a > b) {\n return 1\n }\n else if (a < b) {\n return -1\n }\n return 0\n \n }", "function compare(a, b) {\n if (a>b) return 1;\n if (a<b) return -1;\n }", "function compare(a, b) {\n if (a.index < b.index)\n return -1;\n else (a.index > b.index)\n return 1;\n }", "function compare(a, b) {\n if (a.index < b.index)\n return -1;\n else (a.index > b.index)\n return 1;\n }", "function compare(a,b) {\n\t\t\t if (a.index < b.index)\n\t\t\t\treturn -1;\n\t\t\t if (a.index > b.index)\n\t\t\t\treturn 1;\n\t\t\t return 0;\n\t\t\t}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n }", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n }", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n var x = a.length;\n var y = b.length;\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n }", "function compare( a, b ) {\n\tif ( a === b )\n\t\treturn 0;\n\tif ( a < b )\n\t\treturn -1;\n\treturn 1;\n}", "function compare(a,b){\n var x = a.totalDiff;\n var y = b.totalDiff;\n if (x < y) {return -1;}\n if (x > y) {return 1;}\n return 0;\n }", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n\n if (y < x) {\n return 1;\n }\n\n return 0;\n }", "comparePoints (a, b) {\n let comparison = 0\n\n if (a.points > b.points) {\n comparison = -1\n } else if (b.points > a.points) {\n comparison = 1\n }\n return comparison\n }", "function compare(a, b){\n if(a.value < b.value)\n return -1;\n if(a.value > b.value)\n return 1;\n return 0;\n}", "function compare(a, b) {\n if (a < b) return -1;\n if (a > b) return 1;\n return 0;\n}", "compare(a, b) {\n if (a === b) return 0;\n return a < b ? -1 : 1;\n }", "function compare(a,b){if(a===b)return 0;for(var x=a.length,y=b.length,i=0,len=Math.min(x,y);i<len;++i)if(a[i]!==b[i]){x=a[i],y=b[i];break}return x<y?-1:y<x?1:0}", "function compare(a,b){if(a===b)return 0;for(var x=a.length,y=b.length,i=0,len=Math.min(x,y);i<len;++i)if(a[i]!==b[i]){x=a[i],y=b[i];break}return x<y?-1:y<x?1:0}", "function compare(a,b){if(a===b)return 0;for(var x=a.length,y=b.length,i=0,len=Math.min(x,y);i<len;++i)if(a[i]!==b[i]){x=a[i],y=b[i];break}return x<y?-1:y<x?1:0}", "function compare(a, b) {\n if (a < b) {\n return -1;\n }\n if (a > b) {\n return 1;\n }\n // a must be equal to b\n return 0;\n }", "function compare(a, b) {\n\t\t\tif (a.y === b.y) {\n\t\t\t return (a.x < b.x) ? -1 : 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t return (a.y < b.y) ? -1 : 1;\n\t\t\t}\n\t\t}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n\n if (y < x) {\n return 1;\n }\n\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n\n if (y < x) {\n return 1;\n }\n\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n\n if (y < x) {\n return 1;\n }\n\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n\n if (y < x) {\n return 1;\n }\n\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}", "function compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}" ]
[ "0.7987589", "0.7315597", "0.7279519", "0.7279519", "0.7279519", "0.7279519", "0.7279519", "0.7279519", "0.7279519", "0.7279519", "0.7279519", "0.7279519", "0.7279519", "0.7279519", "0.7279519", "0.7279519", "0.7238396", "0.7220961", "0.7220961", "0.7220961", "0.7220961", "0.7220961", "0.72008085", "0.71982425", "0.71982425", "0.7174156", "0.7165152", "0.7156125", "0.71284276", "0.71284276", "0.7079822", "0.7077", "0.7061664", "0.7055741", "0.70555484", "0.70405567", "0.7030635", "0.7022319", "0.70082414", "0.7005806", "0.69948167", "0.6991198", "0.6991198", "0.6991198", "0.69726086", "0.697057", "0.69618845", "0.69618845", "0.69618845", "0.69618845", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879", "0.6960879" ]
0.0
-1
Most of the external API clips given positions to make sure they actually exist within the document.
function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1))}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function check_pos(){\n\t//Write our checking of all positions\n\n\tif (blob_pos_x > c_canvas.width - 20){\n\tblob_pos_x = blob_pos_x - 4;\n\t}\n\tif (blob_pos_x < 0){\n\tblob_pos_x = blob_pos_x + 4;\n\t}\n\tif (blob_pos_y > c_canvas.height - 20){\n\tblob_pos_y = blob_pos_y - 4;\n\t}\n\tif (blob_pos_y < 0){\n\tblob_pos_y = blob_pos_y + 4;\n\t}\n\n\n\t}", "isValidPos(pos) {\n try {\n let x = pos[0];\n let y = pos[1];\n return ( (x > -1 && x < 8) && (y > -1 && y < 8) );\n } catch (error) {\n \n }\n }", "function updateRelativePositions() {\n\n\tminPoiDistance = Number.MAX_VALUE;\n\tmaxPoiDistance = 0;\n\n\tfor (i=0, l=pois.length; i<l; i++) {\n\n\t\tvar poi = pois[i];\n\t\t\n\t\tif (poi.view) {\n\n\t\t\tpoi.distance = location_utils.calculateDistance(deviceLocation, poi);\n\t\t\t\n\t\t\t// this would ideally be more of a databinding event\n\t\t\tif (poi.controller) {\n\t\t\t\tpoi.controller.setDistance(location_utils.neatUSfromMeters(poi.distance));\n\t\t\t}\n\t\t\t\n\t\t\tif (poi.distance <= maxRange) {\n\t\t\t\t\n\t\t\t\tmaxPoiDistance = Math.max(maxPoiDistance, poi.distance);\n\t\t\t\tminPoiDistance = Math.min(minPoiDistance, poi.distance);\n\t\t\t\t\n\t\t\t\tpoi.inRange = true;\n\n\t\t\t\tpoi.bearing = location_utils.calculateBearing(deviceLocation, poi);\t\t\t\t\n\t\t\t} \n\t\t\telse {\n\t\t\t\t// don't show pois that are beyond maxDistance\n\t\t\t\tpoi.inRange = false;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tpoiDistanceRange = maxPoiDistance - minPoiDistance;\n\n\t// Sort by Distance\n\tpois.sort(function(a, b) {\n\t\treturn b.distance - a.distance;\n\t});\n\n\t\t\t\t\n\tradarRange = Math.max(100, pois[0].distance);\n\n\tvar cnt = pois.length;\n\trankHeight = yRange / cnt;\n\t\n\tfor (i=0; i<cnt; i++) {\n\t\tpois[i].view.zIndex = i;\n\t\tpois[i].distanceRank = i;\n\t\tpositionRadarBlip(pois[i]);\n\t}\n}", "function validatePosition()\n{\n this.p = collisionWithWallsInSector(this.p, this.prev_p, this.sector, DO_NOT_UPDATE_WALL_DIR);\n this.p = collisionWithSectorsInSector(this.p, this.prev_p, this.sector, DO_NOT_UPDATE_WALL_DIR);\n}", "validatePosition() {\n\n }", "static _checkRangesForContainment(rangeA, rangeB, collisionInfo, flipResultPositions)\n {\n if (flipResultPositions)\n {\n if (rangeA.max < rangeB.max || rangeA.min > rangeB.min) collisionInfo.shapeAContained = false;\t\t\t\t\n if (rangeB.max < rangeA.max || rangeB.min > rangeA.min) collisionInfo.shapeBContained = false;\t\n }\n else\n {\n if (rangeA.max > rangeB.max || rangeA.min < rangeB.min) collisionInfo.shapeAContained = false;\n if (rangeB.max > rangeA.max || rangeB.min < rangeA.min) collisionInfo.shapeBContained = false;\n }\n }", "fullPositionsUpdate(positions) {\n const openPositions = [];\n\n for (const positionItem of positions) {\n const position = positionItem.data;\n\n if (position.symbol in this.positions && !['buy', 'sell'].includes(position.side.toLowerCase())) {\n delete this.positions[position.symbol];\n continue;\n }\n\n openPositions.push(position);\n }\n\n const currentPositions = {};\n\n for (const position of Bybit.createPositionsWithOpenStateOnly(openPositions)) {\n currentPositions[position.symbol] = position;\n }\n\n this.logger.debug(`Bybit: Positions via API updated: ${Object.keys(currentPositions).length}`);\n this.positions = currentPositions;\n }", "function applyBoundaries(pos){\r\n\tif(pos.x < -planeWidth/2+5) pos.x = -planeWidth/2 + 5;\r\n\tif(pos.x > planeWidth/2-5) pos.x = planeWidth/2-5; \r\n\tif(pos.y > planeHeight/2-5) pos.y = planeHeight/2-5;\r\n\tif(pos.y < -planeHeight/2+5) pos.y = -planeHeight/2+5;\r\n}", "function checkColl(position){\n if(position.x>=500 && position.y>380)\n return true;\n var platforms = document.getElementById(\"platforms\");\n for (var i = 0; i < platforms.childNodes.length; i++) {\n var node = platforms.childNodes.item(i);\n if (node.nodeName != \"rect\" && node.nodeName != \"line\") continue;\n\n if(node.nodeName == \"rect\"){\n var x = parseFloat(node.getAttribute(\"x\"));\n var y = parseFloat(node.getAttribute(\"y\"));\n var w = parseFloat(node.getAttribute(\"width\"));\n var h = parseFloat(node.getAttribute(\"height\"));\n var pos = new Point(x, y);\n var size = new Size(w, h);\n if (intersect(position, PLAYER_SIZE, pos, size))\n return true;\n } \n else if(node.nodeName == \"line\"){\n var x1 = parseFloat(node.getAttribute(\"x1\"));\n var x2 = parseFloat(node.getAttribute(\"x2\"));\n var y1 = parseFloat(node.getAttribute(\"y1\"));\n var y = y1-10.0;\n var w = x2-x1;\n var h = 20.0;\n var pos = new Point(x1, y);\n var size = new Size(w, h);\n\n if (intersect(position, PLAYER_SIZE, pos, size)) {\n return true;\n }\n }\n }\n return false;\n}", "function checkPosition(id, x, y){\r\n let gameJson = reader.read(id).game;\r\n let gameMoves = gameJson.movements;\r\n if(x < 0 || x > 2 || y < 0 || y > 2)\r\n return WRONG_POS;\r\n for(let i = 0; i < gameMoves.length; i++){\r\n if(gameMoves[i].movement.x == x && gameMoves[i].movement.y == y)\r\n return WRONG_POS;\r\n }\r\n}", "function checkAllShipsPlaced() {\n for (var p = 0; p < this.game.PLAYERS; p++) {\n for (var s = 0; s < fleet[p].length; s++) {\n\n if (fleet[p][s].length != fleet[p][s].coords.length) return false;\n\n for (var c = 0; c < fleet[p][s].coords.length; c++) {\n coords = fleet[p][s].coords[c];\n \n if (typeof layout[p][coords] == 'undefined') {\n return false;\n };\n }\n\n }\n }\n return true;\n }", "function checkLoc(){\n for(var i = 0; i < food.length; i++){\n var distX = food[i].loc.x - snake.loc.x;\n var distY = food[i].loc.y - snake.loc.y;\n if(distX == (0) && distY == (0)){\n food.splice(i, 1);\n //removes the food\n //would add in a new food if that was the way I wanted it to be\n loadFood(0);\n snake.segments.push(createVector(0, 0));\n console.log(snake.segments.length)\n score++;\n }\n }\n}", "checkAvailable(x, y, newShip, posNewShip) {\n const currentShips = _.flatten(this.allShipsPosition(this.ships));\n\n // Check to see if any overlap ?\n const overlapPos = _.find(currentShips, (ship) => {\n return _.find(posNewShip, (pos) => {\n return pos.x === ship.x && pos.y === ship.y;\n });\n });\n\n if (overlapPos || !this.checkRange(x, y, newShip)) {\n return false;\n }\n\n return true;\n }", "isValidPosition(pos){\n return pos.x >=0 && pos.y >= 0 && pos.x < this.props.width && pos.y < this.props.height; \n }", "function observeBoundaries(oldPos, newPos) {\r\n return (\r\n newPos[0] >= 0 &&\r\n newPos[0] <= MAP_WIDTH - SPRITE_SIZE &&\r\n newPos[1] >= 0 &&\r\n newPos[1] <= MAP_HEIGHT - SPRITE_SIZE\r\n );\r\n }", "updatePositions(){\n this.api.get_positions(this.apiPositionListener)\n }", "function checkCoordinates (startCoordinate, direction, length) {\n let noOverlap = true\n for (let i = 0; i < length; i++) {\n let newCoordinate = [startCoordinate[0] + i * direction[0], startCoordinate[1] + i * direction[1]]\n this.reservedCoordinates.forEach(coordinate => {\n let reservedX = coordinate[0]\n let reservedY = coordinate[1]\n let newX = newCoordinate[0]\n let newY = newCoordinate[1]\n if (reservedX === newX && reservedY === newY) {\n noOverlap = false\n } \n })\n }\n return noOverlap\n}", "checkParticleBoundaries(){\n const particlesToRemove = [];\n Object.keys(this.particles).forEach( (id) => {\n const particle = this.particles[id];\n // if particle is out of bounds, add to particles to remove array\n if ( particle.posX > this.canvasWidth\n || particle.posX < 0\n || particle.posY > this.canvasHeight\n || particle.posY < 0\n ) {\n particlesToRemove.push(id);\n }\n });\n\n if (particlesToRemove.length > 0){\n\n particlesToRemove.forEach((id) => {\n // We're checking if the total particles exceed the max particles.\n // If the total particles exeeds max particles, we delete the particle\n // entry in the object. Otherwise, we just create a new particle\n // and insert it into the old particle's object id. This saves us\n // a little time above with generating a new UUID or running the delete command\n if (Object.keys(this.particles).length > this.maxParticles){\n delete this.particles[id];\n } else {\n this.particles[id] = this.makeRandomParticle();\n }\n });\n }\n }", "function createClipping(pos){\n // Plane Equation is a*X + b*Y +c*Z + d = 0\n let res = TETRAMESH.makeSlice(0, 1, 0, Number(pos));\n let triCoord = res[\"vertex\"];\n let trisetData = res[\"data\"];\n let sliderValues;\n if (triCoord.length !== 0) {\n x3domUtils.updateCoordPoint(get(\"triSetCoordinate\"), triCoord);\n x3domUtils.updateDataValue(get(\"triSetAttr\"), trisetData);\n sliderValues = utils.getSliderMinMax(\"isoColor\", DATA_REAL_MIN, DATA_REAL_MAX);\n get(\"triSetIsoColor\").setAttribute(\"min\", sliderValues.min);\n get(\"triSetIsoColor\").setAttribute(\"max\", sliderValues.max);\n }\n}", "isClear(positions) {\n const minX = min(positions.map(piece => piece.x));\n const maxX = max(positions.map(piece => piece.x));\n const minY = min(positions.map(piece => piece.y));\n const maxY = max(positions.map(piece => piece.y));\n\n if (minX < 0) { return false; }\n if (minY < 0) { return false; }\n if (maxX >= this.width) { return false; }\n if (maxY >= this.height) { return false; }\n\n return !some(positions, (position, a, b) => {\n if (this.getSquare(position.x, position.y)) { return true; }\n });\n }", "checkCollisions(position) {\n\n // AABB collision\n function checkCollision(obj1, obj2) {\n // TODO: remove these magic numbers\n // obj1 is the player and obj2 are the blocks\n let w1 = 32;\n let h1 = 40;\n let w2 = 32;\n let h2 = 32;\n let collideX = obj1.x < obj2.x + w2 && obj1.x + w1 > obj2.x;\n let collideY = obj1.y < obj2.y + h2 && obj1.y + h1 > obj2.y;\n return collideX && collideY;\n }\n\n // some fancy ES6 to get the objects that aren't the player\n let notPlayer = objects.filter(o => o.sprite !== \"player\");\n for(let o of notPlayer) {\n if(checkCollision(position, o.location)) {\n // if we collide return what we collided with\n return o;\n }\n }\n\n // otherwise return null\n return null;\n }", "function elementsOverlap(pos) {\n if (snake.x == pos.x && snake.y == pos.y)\n return true;\n if(food){\n if(food.x == pos.x && food.y == pos.y)\n return true;\n }\n if(barriers && barriers.length>0 && food){\n for(var i = 0; i < barriers.length; i++){\n for(var j = 0; j < barriers[i].positions.length; j++){\n if(barriers[i].positions[j].pos.x == pos.x && barriers[i].positions[j].pos.y == pos.y){\n return true;\n }\n if(barriers[i].positions[j].pos.x == food.x && barriers[i].positions[j].pos.y == food.y){\n return true;\n }\n }\n }\n }\n for (var i = 0; i < snake.tail.length; i++) {\n if (snake.tail[i].x == pos.x && snake.tail[i].y == pos.y)\n return true;\n }\n return false;\n}", "function areCoordinatesInBounds (body) {\n var coordsValid = isMarkerInSFRectangleBoundary(parseFloat(body['loc_lat']), parseFloat(body['loc_long']))\n if (coordsValid) {\n console.log('coord in SF: pass')\n return true\n } else {\n console.log('coord in SF: fail')\n return false\n }\n}", "function loadClippingURL(pos)\r\n\t{\r\n\tmarkRead(activeClippings[pos].id);\r\n\tn = open(activeClippings[pos].URL,\"win\"+activeClippings[pos].id);\r\n\t}", "function observeBoundaries(oldPos, newPos) {\n return (newPos[0] >= 0 && newPos[0] <= MAP_WIDTH - SPRITE_SIZE) &&\n (newPos[1] >= 0 && newPos[1] <= MAP_HEIGHT - SPRITE_SIZE)\n}", "function overlap(){ \n if(count === 0){\n console.log(\"Ok\");\n clearInterval(x);\n fall();\n }\n var fRect = floor.getBoundingClientRect();\n var cRect = cart.getBoundingClientRect();\n for(var i = 0; i < papers.length; i++){\n var p = document.querySelector(papers[i]);\n var pRect = p.getBoundingClientRect();\n var pcOffset = cRect.top - pRect.top;\n\tvar pcOffset2 = cRect.left - pRect.left;\n var pfOffset = pRect.top - fRect.top;\n if(pcOffset >= 0 && pcOffset <= 100){\n if(pcOffset2 >= -100 && pcOffset2 <= 100){\n p.style.display = \"none\";\n score += 1; \n count--;\n }\n }\n else if(pfOffset >= -200 && pfOffset <= -1){\n p.style.display = \"none\";\n count--;\n }\n }\n}", "function check_for_isolated_squares(squares_pos) {\r\n\t//console.log(squares_pos);\r\n\tlet isolated = false;\r\n\tfor(let i in squares_pos) {\r\n\t\tif(squares_pos[i].x == -1 || squares_pos[i].y == -1) {\r\n\t\t\tconsole.log(\"Isolated square: \" + i);\r\n\t\t\tisolated = true;\r\n\t\t}\r\n\t}\r\n\treturn isolated;\r\n}", "function legalmpos(x,y){\r\n\tif (x >= 0 && x <= 120 && y>=320) return false;\r\n var monsters = svgdoc.getElementById(\"monsters\");\r\n for (var i = 0; i < monsters.childNodes.length; i++) {\r\n\t\tpos1 = new Point(x,y);\r\n\t\tpos2 = new Point(monsters.childNodes[i].getAttribute(\"x\"), monsters.childNodes[i].getAttribute(\"y\"));\r\n\t\tif(intersect( pos1,OBJECT_DISTANCE,pos2,OBJECT_DISTANCE) )return false;\r\n\t}\r\n\treturn true;\r\n}", "function updatePositionsfinal() {\n var positions = line2.geometry.attributes.position.array;\n\n var x = 6; \n var y = 2.7; \n var z = -2.5;\n var index = 0;\n\n for ( var i = 0, l = MAX_POINTS; i < l; i ++ ) {\n\n positions[ index ++ ] = x;\n positions[ index ++ ] = y;\n positions[ index ++ ] = z;\n\n x += (9/MAX_POINTS);\n y += (2.6/MAX_POINTS);\n }\n}", "function updatePositionsincident() {\n var positions = line.geometry.attributes.position.array;\n\n var x = -16;\n var y = 0; \n var z = -2.5;\n var index = 0;\n\n for ( var i = 0, l = MAX_POINTS; i < l; i ++ ) {\n\n positions[ index ++ ] = x;\n positions[ index ++ ] = y;\n positions[ index ++ ] = z;\n\n x += (11.78/MAX_POINTS);\n y += (3/MAX_POINTS);\n }\n}", "function goodThingCollides(position) {\n var platforms = document.getElementById(\"platforms\");\n\n for (var i = 0; i < platforms.childNodes.length; ++i) {\n var node = platforms.childNodes.item(i);\n\n if (node.nodeName != \"rect\")\n continue;\n\n if (collides(node, position, GOOD_THING_SIZE))\n return true;\n }\n\n var goodThings = document.getElementById(\"goodthings\");\n\n for (var i = 0; i < goodThings.childNodes.length; ++i) {\n var goodThing = goodThings.childNodes.item(i);\n var x = parseInt(goodThing.getAttribute(\"x\"));\n var y = parseInt(goodThing.getAttribute(\"y\"));\n\n if (intersect(position, GOOD_THING_SIZE, new Point(x, y), GOOD_THING_SIZE))\n return true;\n }\n\n if (intersect(position, GOOD_THING_SIZE, player.position, PLAYER_SIZE))\n return true;\n\n if (intersect(position, GOOD_THING_SIZE, EXIT_POSITION, EXIT_SIZE))\n return true;\n\n if (intersect(position, GOOD_THING_SIZE, PORTAL1_POSITION, PORTAL1_SIZE))\n return true;\n\n if (intersect(position, GOOD_THING_SIZE, PORTAL2_POSITION, PORTAL2_SIZE))\n return true;\n\n return false;\n}", "fullPositionsUpdate(positions) {\n let openPositions = []\n\n for (const position of positions) {\n if (position['symbol'] in this.positions && !['buy', 'sell'].includes(position['side'].toLowerCase())) {\n delete this.positions[position.symbol]\n continue\n }\n\n openPositions.push(position)\n }\n\n let currentPositions = {}\n\n for(const position of Bybit.createPositionsWithOpenStateOnly(openPositions)) {\n currentPositions[position.symbol] = position\n }\n\n this.positions = currentPositions\n }", "checkObstruction(startCoordinates, endCoordinates) {\n if (startCoordinates.x != endCoordinates.x) //moves in x\n {\n if (startCoordinates.x < endCoordinates.x)\n return this.checkObstructionForward(startCoordinates, endCoordinates, 'x')\n else if (startCoordinates.x > endCoordinates.x)\n return this.checkObstructionBackwards(startCoordinates, endCoordinates, 'x')\n } else if (startCoordinates.y != endCoordinates.y) //moves in y\n {\n if (startCoordinates.y < endCoordinates.y)\n return this.checkObstructionForward(startCoordinates, endCoordinates, 'y')\n else if (startCoordinates.y > endCoordinates.y)\n return this.checkObstructionBackwards(startCoordinates, endCoordinates, 'y')\n }\n\n }", "checkForCollision(ps) {\n if( ps !== null ) { \n for(let i = 0; i < this.collisionSX.length; i++ ) {\n if( ps.position.x >= this.collisionSX[i] && ps.position.x <= this.collisionEX[i] ) {\n if( ps.position.y >= this.collisionSY[i] && ps.position.y <= this.collisionEY[i] ) {\n //print(\"collsion at shape \" + i);\n return true;\n }\n }\n }\n }\n\n return false; \n }", "function confineInContainer(position, width, height, api) {\n\t var viewWidth = api.getWidth();\n\t var viewHeight = api.getHeight();\n\t position[0] = Math.min(position[0] + width, viewWidth) - width;\n\t position[1] = Math.min(position[1] + height, viewHeight) - height;\n\t position[0] = Math.max(position[0], 0);\n\t position[1] = Math.max(position[1], 0);\n\t}", "function checkShipStatus(indShips, idAtPos, copyShips, ships) {\n\n for (var x = 0; x < indShips.length; x++) {\n\n //Looks for the ship position and removes it from indShips array\n if (indShips[x].includes(idAtPos)) {\n indShips[x].splice(indShips[x].indexOf(idAtPos), 1);\n\n //If after removing the ship returns an empty array, then return true\n if (indShips[x].length === 0) {\n copyShips.splice(copyShips.indexOf(ships[x]), 1);\n return [true, x, copyShips];\n }\n }\n }\n\n return [false, -1, copyShips];\n\n} //End checkShipStatus", "getAround(pos) {\n var around = [];\n var aroundNotFree = [];\n var positions = [\n {\n x: pos.x,\n y: pos.y + 1\n },\n {\n x: pos.x,\n y: pos.y - 1\n },\n {\n x: pos.x + 1,\n y: pos.y\n },\n {\n x: pos.x - 1,\n y: pos.y\n },\n ];\n\n for (var index in positions) {\n var position = positions[index];\n try {\n this._handleBound(position);\n if (this.isFree(position)) {\n around.push(position);\n }\n else {\n aroundNotFree.push(position);\n }\n } catch (e) {\n //do nothing in this case\n }\n }\n\n return {free: around, notFree: aroundNotFree};\n }", "function getNewPositionForFood(){\n // get all the xs and ys from snake body\n let xArr = yArr = [], xy;\n $.each(snake, function(index, value){\n if($.inArray(value.x, xArr) != -1){\n xArr.push(value.x);\n }\n if($.inArray(value.y, yArr) == -1) {\n yArr.push(value.y);\n }\n });\n xy = getEmptyXY(xArr, yArr);\n return xy;\n }", "isValid(position) {\n\t\treturn position.x >= 0 && position.x < this.width\n\t\t && position.y >= 0 && position.y < this.height;\n\t}", "function confineInContainer(position, width, height, api) {\n var viewWidth = api.getWidth();\n var viewHeight = api.getHeight();\n position[0] = Math.min(position[0] + width, viewWidth) - width;\n position[1] = Math.min(position[1] + height, viewHeight) - height;\n position[0] = Math.max(position[0], 0);\n position[1] = Math.max(position[1], 0);\n }", "function confineInContainer(position, width, height, api) {\n var viewWidth = api.getWidth();\n var viewHeight = api.getHeight();\n position[0] = Math.min(position[0] + width, viewWidth) - width;\n position[1] = Math.min(position[1] + height, viewHeight) - height;\n position[0] = Math.max(position[0], 0);\n position[1] = Math.max(position[1], 0);\n }", "function checkIfPosEmpty(targetPos: Vector3) { \n\tvar allObstacles: GameObject[] = GameObject.FindGameObjectsWithTag(\"Obstacle\"); \n\tfor each(var current in allObstacles) \n\t{ \n\t\tif(current.transform.position == targetPos){\n\t\t\t//Debug.Log(current.transform.position);\n\t\t\t// TODO: broadcast collide message\n\t\t\treturn false; \n\t\t}\n\t} \n\treturn true; \n}", "function confineInContainer(position, width, height, api) {\n var viewWidth = api.getWidth();\n var viewHeight = api.getHeight();\n position[0] = Math.min(position[0] + width, viewWidth) - width;\n position[1] = Math.min(position[1] + height, viewHeight) - height;\n position[0] = Math.max(position[0], 0);\n position[1] = Math.max(position[1], 0);\n}", "checkCoordinates(obj) {\n for (let elem of game.coordinates) {\n if (obj.x === elem.x && obj.y === elem.y) {\n if (elem.occupied) {\n return true;\n } else {\n return false;\n }\n }\n }\n }", "function checkPosition() {\n // Für Ameise Schwarz\n for (let i = 0; i < Sem.ant.length; i++) {\n let a = Sem.ant[i];\n // Wenn Ameisen Position auf X - Achse zwischen 567 & 750 \n if (a.x >= 567 && a.x <= 750) {\n // Wenn Ameisen Position auf Y - Achse zwischen 245 & 429\n if (a.y >= 245 && a.y <= 429) {\n // Ruft Funktion für Game Over Screen auf\n gameLost();\n }\n }\n }\n // Für Ameise Braun\n for (let i = 0; i < Sem.antBrown.length; i++) {\n let b = Sem.antBrown[i];\n // Wenn Ameisen Position auf X - Achse zwischen 567 & 750\n if (b.x >= 567 && b.x <= 750) {\n // Wenn Ameisen Position auf Y - Achse zwischen 245 & 429\n if (b.y >= 245 && b.y <= 429) {\n // Ruft Funktion für Game Over Screen auf\n gameLost();\n }\n }\n }\n // Für Ameise Rot\n for (let i = 0; i < Sem.antRed.length; i++) {\n let r = Sem.antRed[i];\n // Wenn Ameisen Position auf X - Achse zwischen 567 & 750\n if (r.x >= 567 && r.x <= 750) {\n // Wenn Ameisen Position auf Y - Achse zwischen 245 & 429\n if (r.y >= 245 && r.y <= 429) {\n // Ruft Funktion für Game Over Screen auf\n gameLost();\n }\n }\n }\n }", "function optimizeAnchors(positions) {\n return positions.map((position, index) => {\n const others = [...positions.slice(0, index), ...positions.slice(index + 1)];\n const othersBearing = getBearingFromOtherPoints(position, others);\n return {\n lngLat: position.lngLat,\n anchor: getAnchor(position.axis, othersBearing),\n };\n });\n}", "function checkShipPlacement() {\n if (!displayGrid.querySelector('.ship')) allShipsPlaced = true;\n }", "function checkFoodCordinates(){\n if (snakeCordinates[0].xaxis==foodxaxis && snakeCordinates[0].yaxis==foodyaxis){\n var addingTail={\n \txaxis:snakeCordinates[0].xaxis+dx,\n \tyaxis:snakeCordinates[0].yaxis+dy\n }\n snakeCordinates.unshift(addingTail);\n food();\n score+=1;\n functionscore();\n\n }\n}", "static computeClippedPointIndices(clippedPoints, originalPoints) {\n const isClipped = (p) => originalPoints.find(q => q.equals(p)) === undefined;\n return new Set(clippedPoints.map((p, i) => (isClipped(p) ? i : -1)).filter(i => i !== -1));\n }", "function checkStandingFLC(pos) {\n let legX = bodyParts[PartEnums.TORSO].x - bodyParts[PartEnums.TORSO].width / 2.5;\n let legY = bodyParts[PartEnums.TORSO].y;\n return pos.x >= legX && pos.x <= (legX + 30) && pos.y >= legY && pos.y <= legY + 100;\n}", "function checkForGuideArea(dataArray, position) {\n let possibleGuideAreas = getClosest(dataArray,position);\n if (possibleGuideAreas.distance < 0.1) {\n addGuide(possibleGuideAreas.closest.text);\n } else {\n removeGuide();\n }\n}", "fullPositionsUpdate(positions) {\n const openPositions = [];\n\n for (const position of positions) {\n if (position.symbol in this.positions && position.isOpen !== true) {\n delete this.positions[position.symbol];\n } else {\n openPositions.push(position);\n }\n }\n\n const currentPositions = {};\n\n for (const position of Bitmex.createPositionsWithOpenStateOnly(openPositions)) {\n currentPositions[position.symbol] = position;\n }\n\n this.positions = currentPositions;\n }", "getEmptyPositionsWithSpaceWithWalls() {\n var emptyPositions = this.getEmptyPositions();\n var res = emptyPositions.filter(p => (((GameConfig.WIDTH - 3) >= p.x) && ((GameConfig.HEIGHT - 3) >= p.y)) && ((2 <= p.x) && (2 <= p.y)));\n return res;\n }", "get positionOptions() {\n if (!this.args.positions) {\n return [];\n }\n\n // Include INACTVE positions if the person has it so it can be unchecked\n let filteredPositions = this.args.positions.filter(position => {\n return position.active || this.args.positionIds.includes(position.id)\n });\n\n return filteredPositions.map((position) => {\n return [positionLabel([position]), position.id];\n });\n }", "checkCollide(pos1, pos2){\n if (Math.abs(pos1[0] - pos2[0]) < 50 &&\n pos1[1] === pos2[1]){\n\n return true;\n } else {\n return false;\n }\n }", "function usePositions(props, hostElement, calloutElement, targetRef, getBounds) {\n var _a = react__WEBPACK_IMPORTED_MODULE_0__.useState(), positions = _a[0], setPositions = _a[1];\n var positionAttempts = react__WEBPACK_IMPORTED_MODULE_0__.useRef(0);\n var previousTarget = react__WEBPACK_IMPORTED_MODULE_0__.useRef();\n var async = (0,_fluentui_react_hooks__WEBPACK_IMPORTED_MODULE_6__.useAsync)();\n var hidden = props.hidden, target = props.target, finalHeight = props.finalHeight, onPositioned = props.onPositioned, directionalHint = props.directionalHint;\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(function () {\n if (!hidden) {\n var timerId_1 = async.requestAnimationFrame(function () {\n // If we expect a target element to position against, we need to wait until `targetRef.current`\n // is resolved. Otherwise we can try to position.\n var expectsTarget = !!target;\n if (hostElement.current && calloutElement.current && (!expectsTarget || targetRef.current)) {\n var currentProps = (0,tslib__WEBPACK_IMPORTED_MODULE_7__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_7__.__assign)({}, props), { target: targetRef.current, bounds: getBounds() });\n var previousPositions = previousTarget.current === target ? positions : undefined;\n // If there is a finalHeight given then we assume that the user knows and will handle\n // additional positioning adjustments so we should call positionCard\n var newPositions = finalHeight\n ? (0,_Positioning__WEBPACK_IMPORTED_MODULE_5__.positionCard)(currentProps, hostElement.current, calloutElement.current, previousPositions)\n : (0,_Positioning__WEBPACK_IMPORTED_MODULE_5__.positionCallout)(currentProps, hostElement.current, calloutElement.current, previousPositions);\n // Set the new position only when the positions are not exists or one of the new callout positions\n // are different. The position should not change if the position is within 2 decimal places.\n if ((!positions && newPositions) ||\n (positions && newPositions && !arePositionsEqual(positions, newPositions) && positionAttempts.current < 5)) {\n // We should not reposition the callout more than a few times, if it is then the content is likely resizing\n // and we should stop trying to reposition to prevent a stack overflow.\n positionAttempts.current++;\n setPositions(newPositions);\n }\n else if (positionAttempts.current > 0) {\n // Only call the onPositioned callback if the callout has been re-positioned at least once.\n positionAttempts.current = 0;\n onPositioned === null || onPositioned === void 0 ? void 0 : onPositioned(positions);\n }\n }\n }, calloutElement.current);\n previousTarget.current = target;\n return function () {\n async.cancelAnimationFrame(timerId_1);\n previousTarget.current = undefined;\n };\n }\n }, [\n hidden,\n directionalHint,\n async,\n calloutElement,\n hostElement,\n targetRef,\n finalHeight,\n getBounds,\n onPositioned,\n positions,\n props,\n target,\n ]);\n return positions;\n}", "closestPointTo(position, closest, exclude) {\n if (this.visible && this.objects !== undefined) {\n for (let i = 0; i < this.objects.length; i++) {\n this.objects[i].closestPointTo(position, closest, exclude);\n }\n }\n }", "function checkPos(androidReq){\n console.log(\"CHECK\");\n\n if(pos != null) {\n var point = null;\n var dist = null;\n\n Tour.find({_id: \"58d26bd01c539c795303bb2f\"}, function (err, docs) {\n if(pos < docs[0].tour.length) {\n if (!err) {\n point = docs[0].tour[pos];\n if (point != null) {\n dist = getDistanceFromLatLonInKm(point.latitude, point.longitude, androidReq.latitude, androidReq.longitude) * 1000;\n }\n }\n console.log(\"Distance: \" + dist);\n if (dist < 5) {\n console.log(point.name);\n if(pos + 1 < docs[0].tour.length){\n pos++;\n point =docs[0].tour[pos];\n main.updateDronePos(\n {\n \"latitude\": point.latitude,\n \"longitude\": point.longitude\n }\n );\n }\n\n }\n current_pos = docs[0].tour[pos-1];\n }\n });\n }\n}", "function validate_click(posClicked) {\r\n for(var i = 0;i<$scope.movidasPosibles.length;i++){\r\n var pos = JSON.parse(\"[\" + posClicked + \"]\");\r\n if($scope.movidasPosibles[i][0]===pos[0] && $scope.movidasPosibles[i][1] ===pos[1]){\r\n $scope.http_request.body.x = pos[0];//guarda las posiciones clickeadas\r\n $scope.http_request.body.y = pos[1];//al final se va mantener siempre una posicion guardada\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "moveTo(pos) {\n let { cursor } = this, p = pos - this.offset;\n while (!this.done && cursor.from < p) {\n if (cursor.to >= pos && cursor.enter(p, 1, exports.IterMode.IgnoreOverlays | exports.IterMode.ExcludeBuffers)) ;\n else if (!cursor.next(false))\n this.done = true;\n }\n }", "function addClipping()\r\n\t{\r\n\tnewClipping = this.id.substring(3,this.id.length)\r\n\tduplicate = false;\r\n\tfor (i=0; i < allClippings.length; i++) //find the position the allClippings array of the selected clipping\r\n\t\t{\r\n\t\tif (newClipping == allClippings[i].id) {pos = i; i = allClippings.length}\r\n\t\t}\r\n\t\t\r\n\tif (activeClippings.length > 0)\tcheckForDuplicates() //make sure clipping is not already seletected\r\n\t\r\n\tif (!duplicate)\r\n\t{\t\r\n\t\teventCheckForCookies();\r\n\t\tif (cookiesOn == true)\r\n\t\t\t{\r\n\t\t\tactiveClippings[activeClippings.length] = new Clipping(allClippings[pos].id,allClippings[pos].headline,allClippings[pos].URL);\r\n\t\t\t\r\n\t\t\t//find all instances of the clipping in article and hides it\r\n\t \t\tclippingInstanceVisibility(this.id,'hidden') \r\n\t \t\t\r\n\t \t\tdrawClippings();\t\r\n\t \t\tevent.cancleBubble = true;\r\n\t \t\tupdateClippingCounter();\r\n\t\t\tsaveClippings();\r\n\t\t \t}\r\n\t \t}\r\n\t}", "function checkPosition() {\n const offset = reposition(prevFocused);\n if (offset.top !== prevOffset.top || offset.left !== prevOffset.left || offset.width !== prevOffset.width || offset.height !== prevOffset.height) {\n // console.log(\"Changed focus position\", offset, prevFocused);\n prevOffset = offset;\n staticCounter = 0;\n } else {\n staticCounter++;\n }\n if (staticCounter < 3) {\n // at the beginning and as long as we see position changes\n // we will check the position/bounds more often\n positionTimeout = setTimeout(checkPosition, 100);\n } else {\n // we want to measure at least every 2 seconds\n positionTimeout = setTimeout(checkPosition, 1000);\n }\n }", "ifInBound(currentPos, coordinates1, coordinates2){\n \n //check for inverted squares\n if(coordinates1.latitude < coordinates2.latitude){\n //swap\n var temp = coordinates1\n coordinates1 = coordinates2\n coordinates2 = temp\n }\n else{\n\n }\n console.log(\"====ALL MY COORDINATES ==== \")\n console.log(currentPos)\n console.log(coordinates1)\n console.log(coordinates2)\n\n if((currentPos.coords.latitude <= coordinates1.latitude) && (currentPos.coords.latitude >= coordinates2.latitude)){\n console.log(\"latitude inbound\")\n if((currentPos.coords.longitude >= coordinates1.longitude) && (currentPos.coords.longitude <= coordinates2.longitude)){\n console.log(\"longitude inbound\")\n return true\n }\n }\n return false\n\n }", "function checkLaps(laps, lapCount) {\n\n for (var j = 0;\n j < laps.length;\n j++) {\n\n // Has name?\n var name = laps[j].name;\n // if (name == undefined || name.length == 0) {\n\n // alert(\"Warning: invalid name for element \" + j);\n // }\n\n // Has placings?\n var places = laps[j].placing;\n // if (places == undefined) {\n\n // alert(\"Warning: missing placings for element \" + j + \" (\" + name + \")\");\n // }\n // else if (places.length == 0 || places.length > lapCount + 1) {\n\n // alert(\"Warning: invalid number of placings (\" + places.length + \") for element \" + j +\n // \" (\" + name + \") - expected between 1 and \" + (lapCount - 1));\n // }\n\n // Check markers.\n var maxLaps = places.length;\n //checkMarker(laps[j].pitstops, \"pitstop\", maxLaps, j, name);\n //checkMarker(laps[j].mechanical, \"mechanical\", maxLaps, j, name);\n checkMarker(laps[j].accident, \"accident\", maxLaps, j, name);\n }\n\n for (var i = 0;\n i < lapCount;\n i++) {\n\n var positions = [];\n for (j = 0;\n j < laps.length;\n j++) {\n\n places = laps[j].placing;\n if (places.length > i) {\n\n // Valid placing?\n var placing = places[i];\n // if (isNaN(placing) || placing < 1 || placing % 1 != 0) {\n\n // alert(\"Warning: invalid placing '\" + placing + \"' for \" + laps[j].name)\n // }\n // else {\n\n // var count = positions[placing];\n // positions[placing] = isNaN(count) ? 1 : count + 1\n // }\n }\n }\n\n // Check for duplicate/missing positions.\n for (j = 1;\n j < positions.length;\n j++) {\n\n count = positions[j];\n if (count != 1) {\n\n alert(\"Warning: data inconsistent: lap \" + i + \", position \" + j + \", count \" + count);\n }\n }\n }\n}", "function markOccupiedSpots() {\n \n\t\tif(!spotsInitialized || playersInitialized < 2) {\n \n\t\t\treturn null;\n \n } // end if statement\n\t\n\t\tfor(var i = 0; i<10; i++) {\n \n\t\t\tfindClosestSpot(myMarbles[i].x, myMarbles[i].y).isEmpty = false;\n\t\t\tfindClosestSpot(othersMarbles[i].x, othersMarbles[i].y).isEmpty = false;\n \n\t\t} // end for loop\n \n\t} // end markOccupiedSpots()", "checkPosition(){\r\n if(isCriticalPosition(this.pos)){\r\n //if((this.pos.x-8)%16 == 0 && (this.pos.y-8)%16 == 0){//checks if pacman is on a critical spot\r\n //let arrPosition = createVector((this.pos.x-8)/16, (this.pos.y-8)/16);//changes location to an array position\r\n let arrPosition = pixelToTile(this.pos);\r\n //resets all paths for the ghosts\r\n //this.blinky.setPath();\r\n //this.pinky.setPath();\r\n //this.clyde.setPath();\r\n //this.inky.setPath();\r\n //Checks if the position has been eaten or not, blank spaces are considered eaten\r\n if(!this.tiles[floor(arrPosition.y)][floor(arrPosition.x)].eaten){\r\n this.tiles[floor(arrPosition.y)][floor(arrPosition.x)].eaten = true;\r\n //score+=10;//adds points for eating\r\n this.score+=1;\r\n this.dotsEaten++;\r\n this.ttl = 600;\r\n if(this.tiles[floor(arrPosition.y)][floor(arrPosition.x)].bigDot){//checks if the big dot is eaten\r\n //set all ghosts to frightened mode\r\n if(!this.blinky.goHome && !this.blinky.tempDead){\r\n this.blinky.frightened = true;\r\n this.blinky.flashCount = 0;\r\n }if(!this.clyde.goHome && !this.clyde.tempDead){\r\n this.clyde.frightened = true;\r\n this.clyde.flashCount = 0;\r\n }if(!this.pinky.goHome && !this.pinky.tempDead){\r\n this.pinky.frightened = true;\r\n this.pinky.flashCount = 0;\r\n }if(!this.inky.goHome && !this.inky.tempDead){\r\n this.inky.frightened = true;\r\n this.inky.flashCount = 0;\r\n }\r\n }\r\n }\r\n //the position in the tiles array that pacman is turning towards\r\n let positionToCheck = new createVector(arrPosition.x + this.goTo.x, arrPosition.y + this.goTo.y);\r\n //console.log(\"Position to Check X: \", positionToCheck.x, \" Y: \", positionToCheck.y);\r\n if(this.tiles[floor(positionToCheck.y)][floor(positionToCheck.x)].tunnel){//checks if the next position will be in the tunnel\r\n this.specialCase(this.pos);\r\n }if(this.tiles[floor(positionToCheck.y)][floor(positionToCheck.x)].wall){//checks if the space is not a wall\r\n if(tiles[floor(arrPosition.y + vel.y)][floor(arrPosition.x + vel.x)].wall){\r\n this.vel = createVector(this.goTo.x, this.goTo.y);//Not sure about this line...\r\n return false;\r\n }else{//moving ahead is free\r\n return true;\r\n }//return !(this.tiles[floor(arrPosition.y + this.vel.y)][floor(arrPosition.x + this.vel.x)].wall);//if both are walls then don't move\r\n }else{//allows pacman to turn\r\n this.vel = createVector(this.goTo.x, this.goTo.y);\r\n return true;\r\n }\r\n }else{//if pacman is not on a critial spot\r\n let ahead = createVector(this.pos.x+10*this.vel.x, this.pos.y+10*this.vel.y);\r\n //if((this.pos.x+10*this.vel.x-8)%16 == 0 && (this.pos.y+10*this.vel.y-8)%16 == 0){\r\n if(isCriticalPosition(ahead)){\r\n //let arrPosition = createVector((this.pos.x+10*this.vel.y-8)/16, (this.pos.y+10*this.vel.y)/16);\r\n let arrPostion = pixelToTile(ahead);//convert to an array position\r\n if(!this.tiles[floor(arrPosition.y)][floor(arrPosition.x)].eaten){\r\n this.tiles[floor(arrPosition.y)][floor(arrPosition.x)].eaten = true;//eat the dot\r\n this.score+=1;//10\r\n this.dotsEaten++;\r\n ttl = 600;\r\n if(this.tiles[floor(arrPosition.y)][floor(arrPosition.x)].bigDot && bigDotsActive){\r\n //this.score+=40;//could be used to give a better reward for getting the big dots\r\n //sets all ghosts to frightened mode\r\n if(!this.blinky.goHome && !this.blinky.tempDead){\r\n this.blinky.frightened = true;\r\n this.blinky.flashCount = 0;\r\n }if(!this.clyde.goHome && !this.clyde.tempDead){\r\n this.clyde.frightened = true;\r\n this.clyde.flashCount = 0;\r\n }if(!this.pinky.goHome && !this.pinky.tempDead){\r\n this.pinky.frightened = true;\r\n this.pinky.flashCount = 0;\r\n }if(!this.inky.goHome && !this.inky.tempDead){\r\n this.inky.frightened = true;\r\n this.inky.flashCount = 0;\r\n }\r\n }\r\n } \r\n }if(this.goTo.x+this.vel.x == 0 && this.vel.y+this.goTo.y == 0){//if turning change directions entirely, 180 degrees\r\n this.vel = createVector(this.goTo.x, this.goTo.y);//turn\r\n return true;\r\n }return true;//if it is not a critical position then it will continue forward\r\n }\r\n }", "function checkHasPositionalTracking () {\n\t var vrDisplay = controls.getVRDisplay();\n\t if (isMobile() || isGearVR()) { return false; }\n\t return vrDisplay && vrDisplay.capabilities.hasPosition;\n\t}", "function observeBoundaries(oldPos, newPos) {\n return (newPos[0] >= 0 && newPos[0] <= mapWidth - spriteSize) &&\n (newPos[1] >= 0 && newPos[1] <= mapHeight - spriteSize)\n }", "function isClippedInViewport(domElement) {\n var rect = domElement.getBoundingClientRect();\n return rect.top < 0 || rect.bottom > document.documentElement.clientHeight || rect.left < 0 || rect.right > document.documentElement.clientWidth;\n } // don't need to check for \"both items null/empty\", and don't need to null-check item, since item required to be length-1 JQ object", "_checkCollision() {\n\n for (let ship of this.ships) {\n let pos = ship.getPosition();\n if (pos.y >= this.canvas.height) {\n // Killed ships are not moved, they stay at their location, but are invisible.\n // I don't want to kill the player with one invisible ship :)\n if (!ship.dead) {\n ship.kill();\n this.score.damage();\n this.base.removeShield();\n }\n }\n }\n }", "function updatePositionsRandincident() {\n var positions = new Array(4);\n\n for(var i =0 ;i<4 ; i++) {\n positions[i] = new Array(MAX_POINTS * 3);\n positions[i] = randAllLines[i].geometry.attributes.position.array;\n }\n\n var x = [-16,-16,-16,-16]; \n var y = [-0.5,-0.3,0.3,0.5]; \n var y2 = [1,0.5,1.5,2];\n var z = -2.5;\n var index = 0;\n\n for ( var i = 0, l = MAX_POINTS; i < l; i ++ ) {\n for(var j=0;j<4;j++){\n positions[j][ index ++ ] = x[j];\n positions[j][ index ++ ] = y[j];\n positions[j][ index ++ ] = z;\n\n x[j] += ((4.5)/MAX_POINTS);\n if(j==0 || j==1){\n y[j] -= ((y2[j])/MAX_POINTS);\n } else {\n y[j] += ((y2[j])/MAX_POINTS);\n }\n index-=3;\n }\n index+=3;\n }\n}", "function getpositions(id){\n let res = [];\n let pos = id.split('_');\n let xLastPos = parseInt(pos[0]);\n let yLastPos = parseInt(pos[1]);\n\n for(let i = 0 ; i < offsets.length ; i++){\n\n let xNewPos = xLastPos + offsets[i][0];\n\n if(xNewPos >= 1 && xNewPos <= 8 ){\n let yNewPos = yLastPos + offsets[i][1];\n\n if(yNewPos >= 1 && yNewPos <= 8){\n \n res.push(xNewPos+\"_\"+yNewPos);\n }\n }\n }\n return res;\n}", "inBounds(){\n if (this.pos.x <= 0) {\n this.pos.x = 0;\n }\n if (this.pos.y <= 0) {\n this.pos.y = 0;\n }\n if (this.pos.x >= width ) {\n this.pos.x = width;\n }\n if (this.pos.y >= height) {\n this.pos.y = height;\n }\n }", "calculate() {\n let mvecs = [];\n super.setPkt(Status.GRAB,\"SOLID\");\n let i = 0;\n if(super.getResp()[0]){\n let data = super.getResp()[0];\n data.forEach(element => {\n if(PVector.getDistance(this.pos,element.pos) < 64){\n let mtv = Polygon.isColliding(this.hitbox,element.hitbox);\n if(mtv){\n mvecs.push(element.hitbox);\n }\n }\n });\n }\n if(mvecs.length > 0){;\n this.rot *= -1;\n this.movement.scale(-1);\n this.applyMovement();\n this.applyRotation();\n this.movement.scale(-1);\n this.rot *= -1;\n }\n super.clearResp();\n }", "_isOverlappingExisting(x, y, w, h) {\n if(!this._positions.length) return false;\n let over = false;\n this._positions.forEach((item) => {\n if (!(item.x > x + w ||\n item.x + item.width < x ||\n item.y > y + h ||\n item.y + item.height < y)) over = true;\n });\n\n return over;\n }", "function positions() {\n\t\t\tfor (var z=0;z<divs.length;z++) {\n\t\t\t\tvar xPos = $( \"#\" + z ).css(\"left\");\n\t\t\t\tvar word = $( \"#\" + z ).text();\n\t\t\t\tvar t = $( \"#\" + z ).text();\n\n\t\t\t\tif (parseInt(xPos) > 700) {\n\t\t\t\t\t$( \"#\" + z ).css(\"background-color\", \"red\");\n\t\t\t\t\tnewSentence.push(word);\n\n\t\t\t\t\tnewSentence = newSentence.filter(function(item,index,inputArray) {\n\t\t\t return inputArray.indexOf(item) == index;\n\t\t\t \t});\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\t// join newly formed sentence \n\t\t\t\tvar yes = newSentence.join(' ');\n\t\t\t\t// send sentence via socket to server to text \n\t\t\t\tsocket.emit('text', yes);\n\t\t\t};\n\t\t}", "updateOlliPositionsAoSimNoSmooth(positions) {\n for (let position of positions) {\n let coordinates = [position.coordinates[0], position.coordinates[1]];\n const data = {\n 'type': 'FeatureCollection',\n 'features': [{\n 'type': 'Feature',\n 'geometry': {\n 'type': 'Point',\n 'coordinates': coordinates\n }\n }]\n };\n let layerId = `olli-bus-${position.olliId}`;\n let layer = this.map.getSource(layerId);\n if (layer) {\n layer.setData(data);\n }\n else {\n this.map.addLayer({\n 'id': layerId,\n 'source': {\n 'type': 'geojson',\n 'data': data\n },\n 'type': 'symbol',\n 'layout': {\n 'icon-image': 'olli',\n 'icon-size': 0.75\n }\n });\n }\n }\n }", "function captureSquareOffsets () {\n squareElsOffsets = {}\n\n for (var i in squareElsIds) {\n if (!squareElsIds.hasOwnProperty(i)) continue\n\n squareElsOffsets[i] = $('#' + squareElsIds[i]).offset()\n }\n }", "function thereIsRover(position) {\n for (rover in RoversDeployed) {\n if (rover.position == position) {\n return true;\n }\n }\n return false;\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 isFoodPosOK(x,y){\n //not on snake0\n for (var i = 0; i < snakes[0].body.length; i++){\n if (x == snakes[0].body[i][0] && y == snakes[0].body[i][1])\n return false;\n }\n //not on snake1\n for (var i = 0; i < snakes[1].body.length; i++){\n if (x == snakes[1].body[i][0] && y == snakes[1].body[i][1])\n return false;\n }\n return true;\n }", "function checkForDuplicates()\r\n\t{\r\n\tfor (i=0; i < activeClippings.length; i++)\r\n\t\t{\r\n\t\tif (newClipping == activeClippings[i].id) {i = allClippings.length; duplicate = true;}\r\n\t\t}\r\n\t}", "validCoords(coords) {\n const [r, c] = coords;\n return r >= 0 && r < this.rows && c >= 0 && c < this.cols;\n }", "function checkHits(coords) {\n var hits = Object.values(roaches).filter(function(x){\n return Math.abs(x.x - coords.x) + Math.abs(x.y - coords.y) < HITBOX;\n });\n return hits;\n}", "function movesFromPos(pos,plyr){\n \"use strict\";\n var mvs = cartesianProd([0,1,2],[0,1,2]);\n mvs = mvs.filter(function(loc){\n\t\t\t return pos[loc[0]][loc[1]] === 0;\n\t\t });\n return mvs.map(function(l){\n\t\t return [l]\n\t\t ;});\n}", "checkCoordinates(ship,position){\n if(ship.vertical == false){\n // prevents a ship from extending horizontally off of grid when placed\n if(10 - parseInt(position.charAt(1)) < ship.length){\n this.message = 'Not Enough Space'\n return false\n }\n else{\n // checks each potential position the ship could occupy, based on length, horizontally from the right of the position coordinate\n for(let i = 0; i < ship.length; i++){\n // if the grid is empty at a given coordinate the next is checked, the process is repeated for the length of the ship\n if(this.grid[parseInt(position.charAt(0))][(parseInt(position.charAt(1)))+i] === ''){\n continue\n }\n else{\n this.message = 'A ship cannot be placed over another ship'\n return false\n }\n }\n return true\n }\n }\n // '10' is the botom of the grid and so a vertical ship cannot begin in the '10' row / (9'x')\n else if(ship.vertical == true){\n if(10 - parseInt(position.charAt(0)) < ship.length){\n this.message = 'Not Enough Space'\n return false\n }\n else{\n // checks each potential position the ship could occupy, based on length, horizontally from the right of the position coordinate\n for(let i = 0; i < ship.length; i++){\n // if the grid is empty at a given coordinate the next is checked, the process is repeated for the length of the ship\n if(this.grid[(parseInt(position.charAt(0))+i)][parseInt(position.charAt(1))] === ''){\n continue\n }\n else{\n this.message = 'A ship cannot be placed over another ship'\n return false\n }\n }\n return true\n }\n } \n }", "function initPositionBonus() {\n xBonus = Math.trunc(Math.random()*nombreBlockParWidth)*tailleSerp;\n yBonus = Math.trunc(Math.random()*nombreBlockParHeight)*tailleSerp;\n\n // Verification que le Bonus soit en-dehors du Serpent\n for (var i = 0; i < bodySerp.length; i++) {\n if (xBonus == xSerp && yBonus == xSerp) {\n initPositionBonus();\n }\n }\n }", "intersectsWith(object, position) {\n let direction = new THREE.Vector3(-1, 0, 0).normalize();\n const raycaster = new THREE.Raycaster();\n raycaster.set(position, direction);\n const intersects = raycaster.intersectObject(object);\n if (intersects.length === 0) { return false; }\n else { return true; }\n }", "function isOccupied(position) {\n let div = document.getElementById(position)\n // if (div == null)\n // return false;\n console.log(position)\n if (div.firstChild.className === 'none') {\n return false\n } else {\n return true\n }\n }", "function checkHasPositionalTracking () {\n var vrDisplay = getVRDisplay();\n if (isMobile() || isGearVR()) { return false; }\n return vrDisplay && vrDisplay.capabilities.hasPosition;\n}", "contains(i) { return this.#pos[i] != 0; }", "function isSnakePosOK(x,y){\n //not on the other snake\n for (var k = 0; k < snakes[1-i].body.length; k++){\n if ((x == snakes[1-i].body[k][0] || x-1 == snakes[1-i].body[k][0] || x-2 == snakes[1-i].body[k][0]) && y == snakes[1-i].body[k][1])\n return false; \n }\n //not on food\n if ((x == foodPos[0] || x-1 == foodPos[0] || x-2 == foodPos[0]) && y == foodPos[1])\n return false;\n return true;\n }", "_updatePosition() {\n const position = this._overlayRef.getConfig().positionStrategy;\n const origin = this._getOrigin();\n const overlay = this._getOverlayPosition();\n position.withPositions([\n Object.assign(Object.assign({}, origin.main), overlay.main),\n Object.assign(Object.assign({}, origin.fallback), overlay.fallback)\n ]);\n }", "function checkPlacement() {\r\n for(index of shipArray) {\r\n if(boardObj.message[index].ship != \"none\") { //If there is already a ship here...\r\n shipArray = finalShipArray.slice();\r\n return false; //...don't move the ship here!\r\n }\r\n }\r\n return true; //If all cells at the indices of shipArray are empty, then return true\r\n}", "query(range, found) {\n if (!found) {\n found = [];\n }\n if (!this.boundary.intersects(range)) {\n return found;\n } else {\n for (let p of this.particles) {\n if (range.contains(p.x, p.y)) {\n found.push(p);\n }\n }\n if (this.divided) {\n this.northeast.query(range, found);\n this.northwest.query(range, found);\n this.southeast.query(range, found);\n this.southwest.query(range, found);\n }\n return found;\n }\n }", "function clampPosition (pos) {\n var line = pos.line\n var column = pos.column\n return {\n // According to\n // <https://github.com/gotwarlost/istanbul/blob/d919f7355027e3c213aa81af5464962d9dc8350b/coverage.json.md#location-objects>\n // lines start at 1 and columns at 0.\n line: Math.max(1, line),\n column: Math.max(0, column)\n }\n}", "checkCollide(pos1, pos2){\n\t if (Math.abs(pos1[0] - pos2[0]) < 50 &&\n\t pos1[1] === pos2[1]){\n\t\n\t return true;\n\t } else {\n\t return false;\n\t }\n\t }", "function fetchPositions() {\n console.log('Querying Critical Maps Api');\n\n get(config.criticalmaps.baseUrl, processResult);\n}", "function _testRectPolyCollision_clipRectSegs(mRect, moveBox) {\n return _.chain(mRect.toSegments())\n .filter(seg => {\n let u = VecMath.sub(seg[1], seg[0]);\n let testPt = [seg[0][0], moveBox.height*2, 1];\n let v = VecMath.sub(testPt, seg[0]);\n let cross = VecMath.cross(u, v);\n\n // Keep the segment if the test point is on its \"left\" side.\n return cross[2] < 0;\n })\n .map(seg => {\n let p = seg[0];\n let q = seg[1];\n\n // let p be the leftmost point.\n if(p[0] > q[0]) {\n let swap = q;\n q = p;\n p = swap;\n }\n\n // Get the segment's line equation data.\n let dx = q[0] - p[0];\n let dy = q[1] - p[1];\n let m = dy/dx;\n let b = p[1] - m*p[0];\n let newSeg = [p, q];\n newSeg.m = m;\n newSeg.b = b;\n return newSeg;\n })\n .value();\n }", "function snakeAtPosition(pos) {\n\n\t\tvar conflict = false;\n\n\t\tfor (var i = 0; i < snake.snakePieces.length; i++) {\n\n\t\t\tif (snake.snakePieces[i].position.x == pos.x && snake.snakePieces[i].position.y == pos.y) {\n\t\t\t\tconflict == true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn conflict;\n\t}", "validatePositioning() {\n if (!this.positioningValid) {\n this.calculateAndSetPopupPosition();\n }\n }" ]
[ "0.58655846", "0.5677319", "0.55963266", "0.55354923", "0.55068874", "0.5477934", "0.5437027", "0.5401844", "0.5392482", "0.539082", "0.53700304", "0.5357655", "0.5323163", "0.53189015", "0.53059256", "0.53028315", "0.52992606", "0.5290811", "0.52904624", "0.5288167", "0.5287783", "0.52852947", "0.5283376", "0.5274956", "0.5260273", "0.5254441", "0.5240339", "0.5231472", "0.52184415", "0.5217607", "0.5216388", "0.5201846", "0.5174741", "0.5173453", "0.51617765", "0.51580495", "0.51492256", "0.5145717", "0.5145059", "0.51418376", "0.51418376", "0.51364267", "0.51317567", "0.512091", "0.51001704", "0.5085536", "0.50705564", "0.5048729", "0.5046993", "0.5038811", "0.503527", "0.50300324", "0.5021558", "0.50209314", "0.50079113", "0.50058216", "0.50050765", "0.5004938", "0.49940735", "0.49879408", "0.49872828", "0.4978007", "0.4965908", "0.4965073", "0.49599165", "0.4945513", "0.49432334", "0.49371853", "0.49366945", "0.49297985", "0.49276578", "0.49216488", "0.4921114", "0.49144867", "0.4912193", "0.49117202", "0.49099615", "0.49091187", "0.4900552", "0.48983392", "0.48959404", "0.48933423", "0.48911056", "0.48897496", "0.48811328", "0.4881055", "0.48808077", "0.48725852", "0.48682076", "0.48676622", "0.48669374", "0.48551318", "0.48536846", "0.4852121", "0.48491448", "0.48488274", "0.48477376", "0.48477343", "0.4847588", "0.48465946", "0.48455134" ]
0.0
-1
Compute a style array (an array starting with a mode generation for invalidation followed by pairs of end positions and style strings), which is used to highlight the tokens on the line.
function highlightLine(cm, line, context, forceToEnd) { // A styles array always starts with a number identifying the // mode/overlays that it is based on (for easy invalidation). var st = [cm.state.modeGen], lineClasses = {}; // Compute the base array of styles runMode(cm, line.text, cm.doc.mode, context, function (end, style) { return st.push(end, style); }, lineClasses, forceToEnd); var state = context.state; // Run overlays, adjust style array. var loop = function ( o ) { context.baseTokens = st; var overlay = cm.state.overlays[o], i = 1, at = 0; context.state = true; runMode(cm, line.text, overlay.mode, context, function (end, style) { var start = i; // Ensure there's a token end at the current position, and that i points at it while (at < end) { var i_end = st[i]; if (i_end > end) { st.splice(i, 1, end, st[i+1], i_end); } i += 2; at = Math.min(end, i_end); } if (!style) { return } if (overlay.opaque) { st.splice(start, i - start, end, "overlay " + style); i = start + 2; } else { for (; start < i; start += 2) { var cur = st[start+1]; st[start+1] = (cur ? cur + " " : "") + "overlay " + style; } } }, lineClasses); context.state = state; context.baseTokens = null; context.baseTokenPos = 1; }; for (var o = 0; o < cm.state.overlays.length; ++o) loop( o ); return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getStyleArrayForBlock(block) {\n var text = block.text,\n inlineStyleRanges = block.inlineStyleRanges;\n\n var inlineStyles = {\n BOLD: new Array(text.length),\n ITALIC: new Array(text.length),\n UNDERLINE: new Array(text.length),\n STRIKETHROUGH: new Array(text.length),\n CODE: new Array(text.length),\n SUPERSCRIPT: new Array(text.length),\n SUBSCRIPT: new Array(text.length),\n COLOR: new Array(text.length),\n BGCOLOR: new Array(text.length),\n FONTSIZE: new Array(text.length),\n FONTFAMILY: new Array(text.length),\n length: text.length\n };\n if (inlineStyleRanges && inlineStyleRanges.length > 0) {\n inlineStyleRanges.forEach(function (range) {\n var offset = range.offset;\n\n var length = offset + range.length;\n for (var i = offset; i < length; i += 1) {\n if (range.style.indexOf('color-') === 0) {\n inlineStyles.COLOR[i] = range.style.substring(6);\n } else if (range.style.indexOf('bgcolor-') === 0) {\n inlineStyles.BGCOLOR[i] = range.style.substring(8);\n } else if (range.style.indexOf('fontsize-') === 0) {\n inlineStyles.FONTSIZE[i] = range.style.substring(9);\n } else if (range.style.indexOf('fontfamily-') === 0) {\n inlineStyles.FONTFAMILY[i] = range.style.substring(11);\n } else if (inlineStyles[range.style]) {\n inlineStyles[range.style][i] = true;\n }\n }\n });\n }\n return inlineStyles;\n}", "function parseStyle(text) {\n\tconst result = [];\n\tlet start = 0;\n\tlet position = 0;\n\n\t// At any given time, these carry style information since last time a styling\n\t// control code was met.\n\tlet colorCodes, bold, textColor, bgColor, hexColor, hexBgColor, italic, underline, strikethrough, monospace;\n\n\tconst resetStyle = () => {\n\t\tbold = false;\n\t\ttextColor = undefined;\n\t\tbgColor = undefined;\n\t\thexColor = undefined;\n\t\thexBgColor = undefined;\n\t\titalic = false;\n\t\tunderline = false;\n\t\tstrikethrough = false;\n\t\tmonospace = false;\n\t};\n\n\tresetStyle();\n\n\t// When called, this \"closes\" the current fragment by adding an entry to the\n\t// `result` array using the styling information set last time a control code\n\t// was met.\n\tconst emitFragment = () => {\n\t\t// Uses the text fragment starting from the last control code position up to\n\t\t// the current position\n\t\tconst textPart = text.slice(start, position);\n\n\t\t// Filters out all non-style related control codes present in this text\n\t\tconst processedText = textPart.replace(controlCodesRx, \"\");\n\n\t\tif (processedText.length) {\n\t\t\t// Current fragment starts where the previous one ends, or at 0 if none\n\t\t\tconst fragmentStart = result.length ? result[result.length - 1].end : 0;\n\n\t\t\tresult.push({\n\t\t\t\tbold,\n\t\t\t\ttextColor,\n\t\t\t\tbgColor,\n\t\t\t\thexColor,\n\t\t\t\thexBgColor,\n\t\t\t\titalic,\n\t\t\t\tunderline,\n\t\t\t\tstrikethrough,\n\t\t\t\tmonospace,\n\t\t\t\ttext: processedText,\n\t\t\t\tstart: fragmentStart,\n\t\t\t\tend: fragmentStart + processedText.length,\n\t\t\t});\n\t\t}\n\n\t\t// Now that a fragment has been \"closed\", the next one will start after that\n\t\tstart = position + 1;\n\t};\n\n\t// This loop goes through each character of the given text one by one by\n\t// bumping the `position` cursor. Every time a new special \"styling\" character\n\t// is met, an object gets created (with `emitFragment()`)information on text\n\t// encountered since the previous styling character.\n\twhile (position < text.length) {\n\t\tswitch (text[position]) {\n\t\tcase RESET:\n\t\t\temitFragment();\n\t\t\tresetStyle();\n\t\t\tbreak;\n\n\t\t// Meeting a BOLD character means that the ongoing text is either going to\n\t\t// be in bold or that the previous one was in bold and the following one\n\t\t// must be reset.\n\t\t// This same behavior applies to COLOR, REVERSE, ITALIC, and UNDERLINE.\n\t\tcase BOLD:\n\t\t\temitFragment();\n\t\t\tbold = !bold;\n\t\t\tbreak;\n\n\t\tcase COLOR:\n\t\t\temitFragment();\n\n\t\t\t// Go one step further to find the corresponding color\n\t\t\tcolorCodes = text.slice(position + 1).match(colorRx);\n\n\t\t\tif (colorCodes) {\n\t\t\t\ttextColor = Number(colorCodes[1]);\n\n\t\t\t\tif (colorCodes[2]) {\n\t\t\t\t\tbgColor = Number(colorCodes[2]);\n\t\t\t\t}\n\n\t\t\t\t// Color code length is > 1, so bump the current position cursor by as\n\t\t\t\t// much (and reset the start cursor for the current text block as well)\n\t\t\t\tposition += colorCodes[0].length;\n\t\t\t\tstart = position + 1;\n\t\t\t} else {\n\t\t\t\t// If no color codes were found, toggles back to no colors (like BOLD).\n\t\t\t\ttextColor = undefined;\n\t\t\t\tbgColor = undefined;\n\t\t\t}\n\n\t\t\tbreak;\n\n\t\tcase HEX_COLOR:\n\t\t\temitFragment();\n\n\t\t\tcolorCodes = text.slice(position + 1).match(hexColorRx);\n\n\t\t\tif (colorCodes) {\n\t\t\t\thexColor = colorCodes[1].toUpperCase();\n\n\t\t\t\tif (colorCodes[2]) {\n\t\t\t\t\thexBgColor = colorCodes[2].toUpperCase();\n\t\t\t\t}\n\n\t\t\t\t// Color code length is > 1, so bump the current position cursor by as\n\t\t\t\t// much (and reset the start cursor for the current text block as well)\n\t\t\t\tposition += colorCodes[0].length;\n\t\t\t\tstart = position + 1;\n\t\t\t} else {\n\t\t\t\t// If no color codes were found, toggles back to no colors (like BOLD).\n\t\t\t\thexColor = undefined;\n\t\t\t\thexBgColor = undefined;\n\t\t\t}\n\n\t\t\tbreak;\n\n\t\tcase REVERSE: {\n\t\t\temitFragment();\n\t\t\tconst tmp = bgColor;\n\t\t\tbgColor = textColor;\n\t\t\ttextColor = tmp;\n\t\t\tbreak;\n\t\t}\n\n\t\tcase ITALIC:\n\t\t\temitFragment();\n\t\t\titalic = !italic;\n\t\t\tbreak;\n\n\t\tcase UNDERLINE:\n\t\t\temitFragment();\n\t\t\tunderline = !underline;\n\t\t\tbreak;\n\n\t\tcase STRIKETHROUGH:\n\t\t\temitFragment();\n\t\t\tstrikethrough = !strikethrough;\n\t\t\tbreak;\n\n\t\tcase MONOSPACE:\n\t\t\temitFragment();\n\t\t\tmonospace = !monospace;\n\t\t\tbreak;\n\t\t}\n\n\t\t// Evaluate the next character at the next iteration\n\t\tposition += 1;\n\t}\n\n\t// The entire text has been parsed, so we finalize the current text fragment.\n\temitFragment();\n\n\treturn result;\n}", "getStyle(){\r\n if (this.style === 'DOTTED') return [2,5]\r\n return []\r\n }", "static get styles() { return []; }", "static getStyleAsArray(feature) {\n const styles = feature.getStyleFunction()();\n return Array.isArray(styles) ? styles : [styles];\n }", "function highlightLine(cm, line, state, forceToEnd) {\n\t // A styles array always starts with a number identifying the\n\t // mode/overlays that it is based on (for easy invalidation).\n\t var st = [cm.state.modeGen], lineClasses = {};\n\t // Compute the base array of styles\n\t runMode(cm, line.text, cm.doc.mode, state, function(end, style) {\n\t st.push(end, style);\n\t }, lineClasses, forceToEnd);\n\t\n\t // Run overlays, adjust style array.\n\t for (var o = 0; o < cm.state.overlays.length; ++o) {\n\t var overlay = cm.state.overlays[o], i = 1, at = 0;\n\t runMode(cm, line.text, overlay.mode, true, function(end, style) {\n\t var start = i;\n\t // Ensure there's a token end at the current position, and that i points at it\n\t while (at < end) {\n\t var i_end = st[i];\n\t if (i_end > end)\n\t st.splice(i, 1, end, st[i+1], i_end);\n\t i += 2;\n\t at = Math.min(end, i_end);\n\t }\n\t if (!style) return;\n\t if (overlay.opaque) {\n\t st.splice(start, i - start, end, \"cm-overlay \" + style);\n\t i = start + 2;\n\t } else {\n\t for (; start < i; start += 2) {\n\t var cur = st[start+1];\n\t st[start+1] = (cur ? cur + \" \" : \"\") + \"cm-overlay \" + style;\n\t }\n\t }\n\t }, lineClasses);\n\t }\n\t\n\t return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null};\n\t }", "function highlightLine(cm, line, state, forceToEnd) {\n\t // A styles array always starts with a number identifying the\n\t // mode/overlays that it is based on (for easy invalidation).\n\t var st = [cm.state.modeGen], lineClasses = {};\n\t // Compute the base array of styles\n\t runMode(cm, line.text, cm.doc.mode, state, function(end, style) {\n\t st.push(end, style);\n\t }, lineClasses, forceToEnd);\n\n\t // Run overlays, adjust style array.\n\t for (var o = 0; o < cm.state.overlays.length; ++o) {\n\t var overlay = cm.state.overlays[o], i = 1, at = 0;\n\t runMode(cm, line.text, overlay.mode, true, function(end, style) {\n\t var start = i;\n\t // Ensure there's a token end at the current position, and that i points at it\n\t while (at < end) {\n\t var i_end = st[i];\n\t if (i_end > end)\n\t st.splice(i, 1, end, st[i+1], i_end);\n\t i += 2;\n\t at = Math.min(end, i_end);\n\t }\n\t if (!style) return;\n\t if (overlay.opaque) {\n\t st.splice(start, i - start, end, \"cm-overlay \" + style);\n\t i = start + 2;\n\t } else {\n\t for (; start < i; start += 2) {\n\t var cur = st[start+1];\n\t st[start+1] = (cur ? cur + \" \" : \"\") + \"cm-overlay \" + style;\n\t }\n\t }\n\t }, lineClasses);\n\t }\n\n\t return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null};\n\t }", "function highlightLine(cm, line, state, forceToEnd) {\n\t // A styles array always starts with a number identifying the\n\t // mode/overlays that it is based on (for easy invalidation).\n\t var st = [cm.state.modeGen], lineClasses = {};\n\t // Compute the base array of styles\n\t runMode(cm, line.text, cm.doc.mode, state, function(end, style) {\n\t st.push(end, style);\n\t }, lineClasses, forceToEnd);\n\n\t // Run overlays, adjust style array.\n\t for (var o = 0; o < cm.state.overlays.length; ++o) {\n\t var overlay = cm.state.overlays[o], i = 1, at = 0;\n\t runMode(cm, line.text, overlay.mode, true, function(end, style) {\n\t var start = i;\n\t // Ensure there's a token end at the current position, and that i points at it\n\t while (at < end) {\n\t var i_end = st[i];\n\t if (i_end > end)\n\t st.splice(i, 1, end, st[i+1], i_end);\n\t i += 2;\n\t at = Math.min(end, i_end);\n\t }\n\t if (!style) return;\n\t if (overlay.opaque) {\n\t st.splice(start, i - start, end, \"cm-overlay \" + style);\n\t i = start + 2;\n\t } else {\n\t for (; start < i; start += 2) {\n\t var cur = st[start+1];\n\t st[start+1] = (cur ? cur + \" \" : \"\") + \"cm-overlay \" + style;\n\t }\n\t }\n\t }, lineClasses);\n\t }\n\n\t return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null};\n\t }", "function highlightLine(cm, line, state, 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, state, function(end, style) {\n st.push(end, style);\n }, lineClasses, forceToEnd);\n\n // Run overlays, adjust style array.\n for (var o = 0; o < cm.state.overlays.length; ++o) {\n var overlay = cm.state.overlays[o], i = 1, at = 0;\n runMode(cm, line.text, overlay.mode, true, 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, \"cm-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 + \" \" : \"\") + \"cm-overlay \" + style;\n }\n }\n }, lineClasses);\n }\n\n return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null};\n }", "function highlightLine(cm, line, state, 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, state, function(end, style) {\n st.push(end, style);\n }, lineClasses, forceToEnd);\n\n // Run overlays, adjust style array.\n for (var o = 0; o < cm.state.overlays.length; ++o) {\n var overlay = cm.state.overlays[o], i = 1, at = 0;\n runMode(cm, line.text, overlay.mode, true, 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, \"cm-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 + \" \" : \"\") + \"cm-overlay \" + style;\n }\n }\n }, lineClasses);\n }\n\n return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null};\n }", "function highlightLine(cm, line, state, 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, state, function(end, style) {\n st.push(end, style);\n }, lineClasses, forceToEnd);\n\n // Run overlays, adjust style array.\n for (var o = 0; o < cm.state.overlays.length; ++o) {\n var overlay = cm.state.overlays[o], i = 1, at = 0;\n runMode(cm, line.text, overlay.mode, true, 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, \"cm-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 + \" \" : \"\") + \"cm-overlay \" + style;\n }\n }\n }, lineClasses);\n }\n\n return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null};\n }", "function highlightLine(cm, line, state, 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, state, function(end, style) {\n st.push(end, style);\n }, lineClasses, forceToEnd);\n\n // Run overlays, adjust style array.\n for (var o = 0; o < cm.state.overlays.length; ++o) {\n var overlay = cm.state.overlays[o], i = 1, at = 0;\n runMode(cm, line.text, overlay.mode, true, 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, \"cm-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 + \" \" : \"\") + \"cm-overlay \" + style;\n }\n }\n }, lineClasses);\n }\n\n return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null};\n }", "function highlightLine(cm, line, state, 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, state, function(end, style) {\n st.push(end, style);\n }, lineClasses, forceToEnd);\n\n // Run overlays, adjust style array.\n for (var o = 0; o < cm.state.overlays.length; ++o) {\n var overlay = cm.state.overlays[o], i = 1, at = 0;\n runMode(cm, line.text, overlay.mode, true, 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, \"cm-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 + \" \" : \"\") + \"cm-overlay \" + style;\n }\n }\n }, lineClasses);\n }\n\n return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null};\n }", "function highlightLine(cm, line, state, 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, state, function(end, style) {\n st.push(end, style);\n }, lineClasses, forceToEnd);\n\n // Run overlays, adjust style array.\n for (var o = 0; o < cm.state.overlays.length; ++o) {\n var overlay = cm.state.overlays[o], i = 1, at = 0;\n runMode(cm, line.text, overlay.mode, true, 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, \"cm-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 + \" \" : \"\") + \"cm-overlay \" + style;\n }\n }\n }, lineClasses);\n }\n\n return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null};\n }", "function highlightLine(cm, line, state, 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, state, function(end, style) {\n st.push(end, style);\n }, lineClasses, forceToEnd);\n\n // Run overlays, adjust style array.\n for (var o = 0; o < cm.state.overlays.length; ++o) {\n var overlay = cm.state.overlays[o], i = 1, at = 0;\n runMode(cm, line.text, overlay.mode, true, 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, \"cm-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 + \" \" : \"\") + \"cm-overlay \" + style;\n }\n }\n }, lineClasses);\n }\n\n return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null};\n }", "function highlightLine(cm, line, state, 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, state, function (end, style) { return st.push(end, style); },\n lineClasses, forceToEnd)\n\n // Run overlays, adjust style array.\n var loop = function ( o ) {\n var overlay = cm.state.overlays[o], i = 1, at = 0\n runMode(cm, line.text, overlay.mode, true, 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 };\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, state, 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, state, function (end, style) { return st.push(end, style); },\n lineClasses, forceToEnd)\n\n // Run overlays, adjust style array.\n var loop = function ( o ) {\n var overlay = cm.state.overlays[o], i = 1, at = 0\n runMode(cm, line.text, overlay.mode, true, 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 };\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, state, 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, state, function(end, style) {\r\n st.push(end, style);\r\n }, lineClasses, forceToEnd);\r\n\r\n // Run overlays, adjust style array.\r\n for (var o = 0; o < cm.state.overlays.length; ++o) {\r\n var overlay = cm.state.overlays[o], i = 1, at = 0;\r\n runMode(cm, line.text, overlay.mode, true, 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, \"cm-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 + \" \" : \"\") + \"cm-overlay \" + style;\r\n }\r\n }\r\n }, lineClasses);\r\n }\r\n\r\n return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null};\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], 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) {\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 tokenizeWithTheme(theme, colorMap, fileContents, grammar, options) {\r\n let lines = fileContents.split(/\\r\\n|\\r|\\n/);\r\n let ruleStack = main.exports.INITIAL;\r\n let actual = [];\r\n let final = [];\r\n for (let i = 0, len = lines.length; i < len; i++) {\r\n let line = lines[i];\r\n if (line === '') {\r\n actual = [];\r\n final.push([]);\r\n continue;\r\n }\r\n let resultWithScopes;\r\n let tokensWithScopes;\r\n let tokensWithScopesIndex;\r\n if (options.includeExplanation) {\r\n resultWithScopes = grammar.tokenizeLine(line, ruleStack);\r\n tokensWithScopes = resultWithScopes.tokens;\r\n tokensWithScopesIndex = 0;\r\n }\r\n let result = grammar.tokenizeLine2(line, ruleStack);\r\n let tokensLength = result.tokens.length / 2;\r\n for (let j = 0; j < tokensLength; j++) {\r\n let startIndex = result.tokens[2 * j];\r\n let nextStartIndex = j + 1 < tokensLength ? result.tokens[2 * j + 2] : line.length;\r\n if (startIndex === nextStartIndex) {\r\n continue;\r\n }\r\n let metadata = result.tokens[2 * j + 1];\r\n let foreground = StackElementMetadata.getForeground(metadata);\r\n let foregroundColor = colorMap[foreground];\r\n let fontStyle = StackElementMetadata.getFontStyle(metadata);\r\n let explanation = [];\r\n if (options.includeExplanation) {\r\n let offset = 0;\r\n while (startIndex + offset < nextStartIndex) {\r\n let tokenWithScopes = tokensWithScopes[tokensWithScopesIndex];\r\n let tokenWithScopesText = line.substring(tokenWithScopes.startIndex, tokenWithScopes.endIndex);\r\n offset += tokenWithScopesText.length;\r\n explanation.push({\r\n content: tokenWithScopesText,\r\n scopes: explainThemeScopes(theme, tokenWithScopes.scopes)\r\n });\r\n tokensWithScopesIndex++;\r\n }\r\n }\r\n actual.push({\r\n content: line.substring(startIndex, nextStartIndex),\r\n color: foregroundColor,\r\n fontStyle,\r\n explanation: explanation\r\n });\r\n }\r\n final.push(actual);\r\n actual = [];\r\n ruleStack = result.ruleStack;\r\n }\r\n return final;\r\n}", "function highlightLine(cm, line, state, 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, state, function(end, style) {\n\t\t st.push(end, style);\n\t\t }, lineClasses, forceToEnd);\n\t\t\n\t\t // Run overlays, adjust style array.\n\t\t for (var o = 0; o < cm.state.overlays.length; ++o) {\n\t\t var overlay = cm.state.overlays[o], i = 1, at = 0;\n\t\t runMode(cm, line.text, overlay.mode, true, 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, \"cm-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 + \" \" : \"\") + \"cm-overlay \" + style;\n\t\t }\n\t\t }\n\t\t }, lineClasses);\n\t\t }\n\t\t\n\t\t return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null};\n\t\t }", "readStyles(styles) {\n let add = Mark$1.none, remove = Mark$1.none;\n style:\n for (let i = 0; i < styles.length; i += 2) {\n for (let after = void 0; ; ) {\n let rule = this.parser.matchStyle(styles[i], styles[i + 1], this, after);\n if (!rule)\n continue style;\n if (rule.ignore)\n return null;\n if (rule.clearMark) {\n this.top.pendingMarks.forEach((m) => {\n if (rule.clearMark(m))\n remove = m.addToSet(remove);\n });\n } else {\n add = this.parser.schema.marks[rule.mark].create(rule.attrs).addToSet(add);\n }\n if (rule.consuming === false)\n after = rule;\n else\n break;\n }\n }\n return [add, remove];\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 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 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 }", "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 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 };\n\n for (var o = 0; o < cm.state.overlays.length; ++o) loop( o );\n context.state = state;\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 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 };\n\n for (var o = 0; o < cm.state.overlays.length; ++o) loop( o );\n context.state = state;\n\n return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null}\n}", "function parseArray(parser, _ref, style) {\n var hskipBeforeAndAfter = _ref.hskipBeforeAndAfter,\n addJot = _ref.addJot,\n cols = _ref.cols,\n arraystretch = _ref.arraystretch,\n colSeparationType = _ref.colSeparationType;\n // Parse body of array with \\\\ temporarily mapped to \\cr\n parser.gullet.beginGroup();\n parser.gullet.macros.set(\"\\\\\\\\\", \"\\\\cr\"); // Get current arraystretch if it's not set by the environment\n\n if (!arraystretch) {\n var stretch = parser.gullet.expandMacroAsText(\"\\\\arraystretch\");\n\n if (stretch == null) {\n // Default \\arraystretch from lttab.dtx\n arraystretch = 1;\n } else {\n arraystretch = parseFloat(stretch);\n\n if (!arraystretch || arraystretch < 0) {\n throw new src_ParseError(\"Invalid \\\\arraystretch: \" + stretch);\n }\n }\n }\n\n var row = [];\n var body = [row];\n var rowGaps = [];\n var hLinesBeforeRow = []; // Test for \\hline at the top of the array.\n\n hLinesBeforeRow.push(getHLines(parser));\n\n while (true) {\n // eslint-disable-line no-constant-condition\n var cell = parser.parseExpression(false, \"\\\\cr\");\n cell = {\n type: \"ordgroup\",\n mode: parser.mode,\n body: cell\n };\n\n if (style) {\n cell = {\n type: \"styling\",\n mode: parser.mode,\n style: style,\n body: [cell]\n };\n }\n\n row.push(cell);\n var next = parser.nextToken.text;\n\n if (next === \"&\") {\n parser.consume();\n } else if (next === \"\\\\end\") {\n // Arrays terminate newlines with `\\crcr` which consumes a `\\cr` if\n // the last line is empty.\n // NOTE: Currently, `cell` is the last item added into `row`.\n if (row.length === 1 && cell.type === \"styling\" && cell.body[0].body.length === 0) {\n body.pop();\n }\n\n if (hLinesBeforeRow.length < body.length + 1) {\n hLinesBeforeRow.push([]);\n }\n\n break;\n } else if (next === \"\\\\cr\") {\n var cr = assertNodeType(parser.parseFunction(), \"cr\");\n rowGaps.push(cr.size); // check for \\hline(s) following the row separator\n\n hLinesBeforeRow.push(getHLines(parser));\n row = [];\n body.push(row);\n } else {\n throw new src_ParseError(\"Expected & or \\\\\\\\ or \\\\cr or \\\\end\", parser.nextToken);\n }\n }\n\n parser.gullet.endGroup();\n return {\n type: \"array\",\n mode: parser.mode,\n addJot: addJot,\n arraystretch: arraystretch,\n body: body,\n cols: cols,\n rowGaps: rowGaps,\n hskipBeforeAndAfter: hskipBeforeAndAfter,\n hLinesBeforeRow: hLinesBeforeRow,\n colSeparationType: colSeparationType\n };\n} // Decides on a style for cells in an array according to whether the given", "function getStyleBasedFormatState(editor) {\n var range = editor.getSelectionRange();\n var node = range && roosterjs_editor_dom_1.Position.getStart(range).normalize().node;\n var styles = node ? roosterjs_editor_dom_1.getComputedStyles(node) : [];\n return {\n fontName: styles[0],\n fontSize: styles[1],\n textColor: styles[2],\n backgroundColor: styles[3],\n };\n}", "static get styles() {\n return [style];\n }", "function encodeInlineStyleRanges(block){var styleList=block.getCharacterList().map(function(c){return c.getStyle();}).toList();var ranges=styleList.flatten().toSet().map(function(style){return getEncodedInlinesForType(block,styleList,style);});return Array.prototype.concat.apply(EMPTY_ARRAY,ranges.toJS());}", "function getCurrentStyles(startNode, endNode) {\n var nodes = (0, _getNodeTree2['default'])(startNode, endNode);\n var commands = [];\n\n nodes.forEach(function (node) {\n var tagName = node.tagName;\n\n for (var style in STYLES) {\n if (style === STYLES) {\n commands.push(STYLES[style]);\n }\n }\n\n for (var command in COMMANDS) {\n if (command === tagName) {\n commands.push(COMMANDS[command]);\n }\n }\n });\n return commands;\n}", "function parseArray(parser, _ref, style) {\n var hskipBeforeAndAfter = _ref.hskipBeforeAndAfter,\n addJot = _ref.addJot,\n cols = _ref.cols,\n arraystretch = _ref.arraystretch;\n // Parse body of array with \\\\ temporarily mapped to \\cr\n parser.gullet.beginGroup();\n parser.gullet.macros.set(\"\\\\\\\\\", \"\\\\cr\"); // Get current arraystretch if it's not set by the environment\n\n if (!arraystretch) {\n var stretch = parser.gullet.expandMacroAsText(\"\\\\arraystretch\");\n\n if (stretch == null) {\n // Default \\arraystretch from lttab.dtx\n arraystretch = 1;\n } else {\n arraystretch = parseFloat(stretch);\n\n if (!arraystretch || arraystretch < 0) {\n throw new src_ParseError(\"Invalid \\\\arraystretch: \" + stretch);\n }\n }\n }\n\n var row = [];\n var body = [row];\n var rowGaps = [];\n var hLinesBeforeRow = []; // Test for \\hline at the top of the array.\n\n hLinesBeforeRow.push(getHLines(parser));\n\n while (true) {\n // eslint-disable-line no-constant-condition\n var cell = parser.parseExpression(false, \"\\\\cr\");\n cell = {\n type: \"ordgroup\",\n mode: parser.mode,\n body: cell\n };\n\n if (style) {\n cell = {\n type: \"styling\",\n mode: parser.mode,\n style: style,\n body: [cell]\n };\n }\n\n row.push(cell);\n var next = parser.nextToken.text;\n\n if (next === \"&\") {\n parser.consume();\n } else if (next === \"\\\\end\") {\n // Arrays terminate newlines with `\\crcr` which consumes a `\\cr` if\n // the last line is empty.\n // NOTE: Currently, `cell` is the last item added into `row`.\n if (row.length === 1 && cell.type === \"styling\" && cell.body[0].body.length === 0) {\n body.pop();\n }\n\n if (hLinesBeforeRow.length < body.length + 1) {\n hLinesBeforeRow.push([]);\n }\n\n break;\n } else if (next === \"\\\\cr\") {\n var cr = assertNodeType(parser.parseFunction(), \"cr\");\n rowGaps.push(cr.size); // check for \\hline(s) following the row separator\n\n hLinesBeforeRow.push(getHLines(parser));\n row = [];\n body.push(row);\n } else {\n throw new src_ParseError(\"Expected & or \\\\\\\\ or \\\\cr or \\\\end\", parser.nextToken);\n }\n }\n\n parser.gullet.endGroup();\n return {\n type: \"array\",\n mode: parser.mode,\n addJot: addJot,\n arraystretch: arraystretch,\n body: body,\n cols: cols,\n rowGaps: rowGaps,\n hskipBeforeAndAfter: hskipBeforeAndAfter,\n hLinesBeforeRow: hLinesBeforeRow\n };\n} // Decides on a style for cells in an array according to whether the given", "function parseArray(parser, _ref, style) {\n var hskipBeforeAndAfter = _ref.hskipBeforeAndAfter,\n addJot = _ref.addJot,\n cols = _ref.cols,\n arraystretch = _ref.arraystretch;\n // Parse body of array with \\\\ temporarily mapped to \\cr\n parser.gullet.beginGroup();\n parser.gullet.macros.set(\"\\\\\\\\\", \"\\\\cr\"); // Get current arraystretch if it's not set by the environment\n\n if (!arraystretch) {\n var stretch = parser.gullet.expandMacroAsText(\"\\\\arraystretch\");\n\n if (stretch == null) {\n // Default \\arraystretch from lttab.dtx\n arraystretch = 1;\n } else {\n arraystretch = parseFloat(stretch);\n\n if (!arraystretch || arraystretch < 0) {\n throw new src_ParseError(\"Invalid \\\\arraystretch: \" + stretch);\n }\n }\n }\n\n var row = [];\n var body = [row];\n var rowGaps = [];\n var hLinesBeforeRow = []; // Test for \\hline at the top of the array.\n\n hLinesBeforeRow.push(getHLines(parser));\n\n while (true) {\n // eslint-disable-line no-constant-condition\n var cell = parser.parseExpression(false, \"\\\\cr\");\n cell = {\n type: \"ordgroup\",\n mode: parser.mode,\n body: cell\n };\n\n if (style) {\n cell = {\n type: \"styling\",\n mode: parser.mode,\n style: style,\n body: [cell]\n };\n }\n\n row.push(cell);\n var next = parser.nextToken.text;\n\n if (next === \"&\") {\n parser.consume();\n } else if (next === \"\\\\end\") {\n // Arrays terminate newlines with `\\crcr` which consumes a `\\cr` if\n // the last line is empty.\n // NOTE: Currently, `cell` is the last item added into `row`.\n if (row.length === 1 && cell.type === \"styling\" && cell.body[0].body.length === 0) {\n body.pop();\n }\n\n if (hLinesBeforeRow.length < body.length + 1) {\n hLinesBeforeRow.push([]);\n }\n\n break;\n } else if (next === \"\\\\cr\") {\n var cr = assertNodeType(parser.parseFunction(), \"cr\");\n rowGaps.push(cr.size); // check for \\hline(s) following the row separator\n\n hLinesBeforeRow.push(getHLines(parser));\n row = [];\n body.push(row);\n } else {\n throw new src_ParseError(\"Expected & or \\\\\\\\ or \\\\cr or \\\\end\", parser.nextToken);\n }\n }\n\n parser.gullet.endGroup();\n return {\n type: \"array\",\n mode: parser.mode,\n addJot: addJot,\n arraystretch: arraystretch,\n body: body,\n cols: cols,\n rowGaps: rowGaps,\n hskipBeforeAndAfter: hskipBeforeAndAfter,\n hLinesBeforeRow: hLinesBeforeRow\n };\n} // Decides on a style for cells in an array according to whether the given", "getStyles(styleType) {\n if (this.viewer) {\n return this.viewer.styles.getStyles(styleType);\n }\n return [];\n }", "function getProcessedStyle(reference, cellUnit, includeRegionStyles) {\n var styles = [];\n var ids = reference.match(/\\S+/g);\n ids.forEach(function (id) {\n // Find the style for each id received.\n var cueStyle = findStyleFromID(ttmlStyling, id);\n if (cueStyle) {\n // Process the style for the cue in CSS form.\n // Send a copy of the style object, so it does not modify the original by cleaning it.\n var stylesFromId = processStyle(JSON.parse(JSON.stringify(cueStyle)), cellUnit, includeRegionStyles);\n styles = styles.concat(stylesFromId);\n }\n });\n return styles;\n }", "function getProcessedStyle(reference, cellUnit, includeRegionStyles) {\n var styles = [];\n var ids = reference.match(/\\S+/g);\n ids.forEach(function (id) {\n // Find the style for each id received.\n var cueStyle = findStyleFromID(ttmlStyling, id);\n if (cueStyle) {\n // Process the style for the cue in CSS form.\n // Send a copy of the style object, so it does not modify the original by cleaning it.\n var stylesFromId = processStyle(JSON.parse(JSON.stringify(cueStyle)), cellUnit, includeRegionStyles);\n styles = styles.concat(stylesFromId);\n }\n });\n return styles;\n }", "getStyles() {\n\t\tif (!this.props.children) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [\n\t\t\t{\n\t\t\t\tkey: this.props.children.key,\n\t\t\t\tdata: this.props.children,\n\t\t\t\tstyle: ensureSpring(this.props.atActive)\n\t\t\t}\n\t\t];\n\t}", "function addOrvCoreStyles() {\n let s = [],s2=[];\n const o1 = \".\"+sOrvCoreLibClassName+\" \"\n let sPos\n\n try {\n if (typeof styleBlk !== \"undefined\") {\n return; // aleady set up\n } // end if\n\n styleBlk = document.createElement(\"STYLE\")\n styleBlk.id = orvCoreLibStyleBlockId;\n\n\n // s.push(\"\")\n\n s.push(o1+\"{\")\n s.push(\" box-sizing:border-box;\")\n s.push(\" margin:0px;\")\n s.push(\" padding:0px;\")\n s.push(\"}\")\n\n s.push(o1+\".bx {\")\n s.push(\" position:absolute;\")\n s.push(\" overflow:hidden;\")\n s.push(\"}\")\n\n s.push(o1+\".tint{\")\n s.push(\" background-color:black;\")\n s.push(\" top:0px;\")\n s.push(\" bottom:0px;\")\n s.push(\" left:0px;\")\n s.push(\" right:0px;\")\n s.push(\" opacity:.6;\")\n s.push(\" z-index:\"+(nHighestZIndex+1)+\";\")\n s.push(\"}\")\n\n // s2.push(\"\")\n s2 = []\n s2.push(o1+\".debugIcon{\")\n s2.push(\" text-align:center;\") \n s2.push(\" width:15px;\")\n s2.push(\" height:15px;\")\n s2.push(\" line-height:12px;\")\n s2.push(\" font-family:Tahoma;\")\n s2.push(\" font-size:11px;\")\n s2.push(\" padding:0px;\")\n s2.push(\" margin:0px;\")\n s2.push(\" margin-right:6px;\") \n s2.push(\" color: white;\")\n s2.push(\" border-radius:3px;\")\n s2.push(\" overflow:hidden;\")\n s2.push(\" display:inline-block;\")\n s2.push(\"}\")\n s.push(s2.join(\"\\n\"))\n\n\n s2 = []\n s2.push(o1+\".debugIconGreen{\")\n s2.push(\" border:solid #799876 1.5px;\")\n s2.push(\" text-shadow: 1px 1px #799876,-1px -1px #799876, 1px -1px #799876,-1px 1px #799876;\") \n s2.push(\" background-color: #A8C9A6;\")\n s2.push(\"}\")\n s.push(s2.join(\"\\n\"))\n\n s2 = []\n s2.push(o1+\".debugIconBlue{\")\n s2.push(\" border:solid #6B89A8 1.5px;\")\n s2.push(\" text-shadow: 1px 1px #6B89A8,-1px -1px #6B89A8, 1px -1px #6B89A8,-1px 1px #6B89A8;\") \n s2.push(\" background-color: #96B9D9;\")\n s2.push(\"}\")\n s.push(s2.join(\"\\n\"))\n\n s2 = []\n s2.push(o1+\".debugIconTan{\")\n s2.push(\" border:solid #CAB471 1.5px;\")\n s2.push(\" text-shadow: 1px 1px #CAB471,-1px -1px #CAB471, 1px -1px #CAB471,-1px 1px #CAB471;\") \n s2.push(\" background-color: #F5DE97;\")\n s2.push(\"}\")\n s.push(s2.join(\"\\n\"))\n\n s2 = []\n s2.push(o1+\".debugIconPurple{\")\n s2.push(\" border:solid #8C7698 1.5px;\")\n s2.push(\" text-shadow: 1px 1px #8C7698,-1px -1px #8C7698, 1px -1px #8C7698,-1px 1px #8C7698;\") \n s2.push(\" background-color: #BDA6C9;\")\n s2.push(\"}\")\n s.push(s2.join(\"\\n\"))\n\n s2 = []\n s2.push(o1+\".debugIconRed{\")\n s2.push(\" border:solid #BC6F70 1.5px;\")\n s2.push(\" text-shadow: 1px 1px #BC6F70,-1px -1px #BC6F70, 1px -1px #BC6F70,-1px 1px #BC6F70;\") \n s2.push(\" background-color: #E9999A;\")\n s2.push(\"}\")\n s.push(s2.join(\"\\n\"))\n\n s2 = []\n s2.push(o1+\".debugIconGray{\")\n s2.push(\" border:solid #999999 1.5px;\")\n s2.push(\" text-shadow: 1px 1px #999999,-1px -1px #999999, 1px -1px #999999,-1px 1px #999999;\") \n s2.push(\" background-color: #D9D9D9;\")\n s2.push(\"}\")\n s.push(s2.join(\"\\n\"))\n\n\n // s.push(\" \")\n sPos = \"30px\"\n s.push(o1+\".dialog {\")\n s.push(\" background-color:silver;\")\n s.push(\" border:solid yellow 3px;\")\n s.push(\" width:700px;\")\n s.push(\" left:\"+sPos+\";\")\n s.push(\" top:\"+sPos+\";\")\n s.push(\" bottom:\"+sPos+\";\")\n s.push(\" z-index:\"+(nHighestZIndex+2)+\";\")\n s.push(\"}\")\n\n s.push(o1+\".diaTitleBar {\")\n s.push(\" left:0px;\")\n s.push(\" right:0px;\")\n s.push(\" top:0px;\")\n s.push(\" height:35px;\")\n s.push(\" line-height:35px;\")\n s.push(\" color:white;\")\n s.push(\" font-size:18pt;\")\n s.push(\" background-color:gray;\")\n s.push(\" text-align:center;\") \n s.push(\"}\")\n\n s.push(o1+\".varArrayLen {\")\n s.push(\" color:gray; \") \n s.push(\" font-size:14px;\") \n s.push(\"}\")\n\n s.push(o1+\".varLst {\")\n s.push(\" list-style-type: none; \") \n s.push(\" background-color:white;\")\n s.push(\" border-radius:4px;\") \n s.push(\" padding-left:4px;\") \n s.push(\" padding-bottom:8px;\") \n s.push(\"}\")\n\n s.push(o1+\".varPropCntr {\") \n s.push(\" margin-left:16px;\") \n s.push(\"}\")\n\n\n // 🔴🔵🔴🔵🔴🔵🔴🔵🔴🔵🔴🔵🔴🔵🔴🔵🔴🔵🔴🔵🔴🔵🔴🔵🔴🔵🔴🔵\n s.push(o1+\"LI {\")\n s.push(\" font-family: Menlo, Monaco, 'Courier New', monospace;\")\n s.push(\" font-size:16px;\")\n s.push(\" width:655px;\")\n //s.push(\" background-color:lightblue;\") \n s.push(\"}\")\n\n s.push(o1+\".varCntr2 {\")\n s.push(\" font-family: Monaco, MonoSpace;\")\n s.push(\" width:655px;\")\n s.push(\" height:20px;\")\n s.push(\" position:relative; \") \n s.push(\" top:0px;\")\n s.push(\" left:0px;\")\n s.push(\" padding-left:17px;\")\n // s.push(\" background-color:lightgreen;\") \n s.push(\"}\")\n\n // s.push(\" \")\n s.push(o1+\".dataType_lbl {\")\n s.push(\" position:absolute; \") \n s.push(\" right:0px;\")\n s.push(\" top:2px;\")\n s.push(\" margin-right:4px;\")\n s.push(\" padding-left:4px;\")\n s.push(\" padding-right:4px;\")\n s.push(\" border-radius:4px;\")\n s.push(\" font-size:9pt;\")\n s.push(\" background-color:#800000;\")\n s.push(\" color:white;\")\n s.push(\"}\")\n\n // alert(s.join(\"\\n\"))\n s.push(o1+\".codeBackground {\")\n s.push(\"}\")\n\n s.push(o1+\".numberValue {\")\n s.push(\"}\")\n\n s.push(o1+\".stringValue {\")\n s.push(\"}\")\n\n s.push(o1+\".typeLabel {\")\n s.push(\"}\")\n\n // s.push(\"\")\n s.push(o1+\".booleanValue {\")\n s.push(\"}\")\n\n s.push(o1+\".dateValue {\")\n s.push(\"}\")\n\n\n styleBlk.innerHTML = s.join(\"\\n\")\n document.body.append(styleBlk)\n\n } catch(err) {\n console.dir(err)\n debugger \n } // end of try/catch\n //styleBlk\n \n }", "function decodeInlineStyleRanges(text,ranges){var styles=Array(text.length).fill(EMPTY_SET);if(ranges){ranges.forEach(function(/*object*/range){var cursor=substr(text,0,range.offset).length;var end=cursor+substr(text,range.offset,range.length).length;while(cursor<end){styles[cursor]=styles[cursor].add(range.style);cursor++;}});}return styles;}", "_getInlineColors() {\n const that = this;\n let trackColor = '',\n fillColor = '',\n lineColor = '';\n\n if (that._track) {\n trackColor = that._track.style.fill;\n }\n\n if (that._fill) {\n fillColor = that._fill.style.fill;\n }\n\n if (that._line) {\n lineColor = that._line.style.stroke;\n }\n\n return [trackColor, fillColor, lineColor];\n }", "function scssTokenize(input) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var css = input.css.valueOf();\n var ignore = options.ignoreErrors;\n\n var code = void 0,\n next = void 0,\n quote = void 0,\n lines = void 0,\n last = void 0,\n content = void 0,\n escape = void 0,\n nextLine = void 0,\n nextOffset = void 0,\n escaped = void 0,\n escapePos = void 0,\n prev = void 0,\n n = void 0,\n currentToken = void 0;\n\n var brackets = void 0; // SCSS PATCH\n\n var length = css.length;\n var offset = -1;\n var line = 1;\n var pos = 0;\n var buffer = [];\n var returned = [];\n\n function unclosed(what) {\n throw input.error('Unclosed ' + what, line, pos - offset);\n }\n\n function endOfFile() {\n return returned.length === 0 && pos >= length;\n }\n\n function nextToken() {\n if (returned.length) return returned.pop();\n if (pos >= length) return;\n\n code = css.charCodeAt(pos);\n if (code === NEWLINE || code === FEED || code === CR && css.charCodeAt(pos + 1) !== NEWLINE) {\n offset = pos;\n line += 1;\n }\n\n switch (code) {\n case NEWLINE:\n case SPACE:\n case TAB:\n case CR:\n case FEED:\n next = pos;\n do {\n next += 1;\n code = css.charCodeAt(next);\n if (code === NEWLINE) {\n offset = next;\n line += 1;\n }\n } while (code === SPACE || code === NEWLINE || code === TAB || code === CR || code === FEED);\n\n currentToken = ['space', css.slice(pos, next)];\n pos = next - 1;\n break;\n\n case OPEN_SQUARE:\n currentToken = ['[', '[', line, pos - offset];\n break;\n\n case CLOSE_SQUARE:\n currentToken = [']', ']', line, pos - offset];\n break;\n\n case OPEN_CURLY:\n currentToken = ['{', '{', line, pos - offset];\n break;\n\n case CLOSE_CURLY:\n currentToken = ['}', '}', line, pos - offset];\n break;\n\n // SCSS PATCH {\n case COMMA:\n currentToken = ['word', ',', line, pos - offset, line, pos - offset + 1];\n break;\n // } SCSS PATCH\n\n case COLON:\n currentToken = [':', ':', line, pos - offset];\n break;\n\n case SEMICOLON:\n currentToken = [';', ';', line, pos - offset];\n break;\n\n case OPEN_PARENTHESES:\n prev = buffer.length ? buffer.pop()[1] : '';\n n = css.charCodeAt(pos + 1);\n if (prev === 'url' && n !== SINGLE_QUOTE && n !== DOUBLE_QUOTE && n !== SPACE && n !== NEWLINE && n !== TAB && n !== FEED && n !== CR) {\n // SCSS PATCH {\n brackets = 1;\n escaped = false;\n next = pos + 1;\n while (next <= css.length - 1) {\n n = css.charCodeAt(next);\n if (n === BACKSLASH) {\n escaped = !escaped;\n } else if (n === OPEN_PARENTHESES) {\n brackets += 1;\n } else if (n === CLOSE_PARENTHESES) {\n brackets -= 1;\n if (brackets === 0) break;\n }\n next += 1;\n }\n // } SCSS PATCH\n\n currentToken = ['brackets', css.slice(pos, next + 1), line, pos - offset, line, next - offset];\n\n pos = next;\n } else {\n next = css.indexOf(')', pos + 1);\n content = css.slice(pos, next + 1);\n\n if (next === -1 || RE_BAD_BRACKET.test(content)) {\n currentToken = ['(', '(', line, pos - offset];\n } else {\n currentToken = ['brackets', content, line, pos - offset, line, next - offset];\n pos = next;\n }\n }\n\n break;\n\n case CLOSE_PARENTHESES:\n currentToken = [')', ')', line, pos - offset];\n break;\n\n case SINGLE_QUOTE:\n case DOUBLE_QUOTE:\n quote = code === SINGLE_QUOTE ? '\\'' : '\"';\n next = pos;\n do {\n escaped = false;\n next = css.indexOf(quote, next + 1);\n if (next === -1) {\n if (ignore) {\n next = pos + 1;\n break;\n } else {\n unclosed('string');\n }\n }\n escapePos = next;\n while (css.charCodeAt(escapePos - 1) === BACKSLASH) {\n escapePos -= 1;\n escaped = !escaped;\n }\n } while (escaped);\n\n content = css.slice(pos, next + 1);\n lines = content.split('\\n');\n last = lines.length - 1;\n\n if (last > 0) {\n nextLine = line + last;\n nextOffset = next - lines[last].length;\n } else {\n nextLine = line;\n nextOffset = offset;\n }\n\n currentToken = ['string', css.slice(pos, next + 1), line, pos - offset, nextLine, next - nextOffset];\n\n offset = nextOffset;\n line = nextLine;\n pos = next;\n break;\n\n case AT:\n RE_AT_END.lastIndex = pos + 1;\n RE_AT_END.test(css);\n if (RE_AT_END.lastIndex === 0) {\n next = css.length - 1;\n } else {\n next = RE_AT_END.lastIndex - 2;\n }\n\n currentToken = ['at-word', css.slice(pos, next + 1), line, pos - offset, line, next - offset];\n\n pos = next;\n break;\n\n case BACKSLASH:\n next = pos;\n escape = true;\n while (css.charCodeAt(next + 1) === BACKSLASH) {\n next += 1;\n escape = !escape;\n }\n code = css.charCodeAt(next + 1);\n if (escape && code !== SLASH && code !== SPACE && code !== NEWLINE && code !== TAB && code !== CR && code !== FEED) {\n next += 1;\n }\n\n currentToken = ['word', css.slice(pos, next + 1), line, pos - offset, line, next - offset];\n\n pos = next;\n break;\n\n default:\n // SCSS PATCH {\n n = css.charCodeAt(pos + 1);\n\n if (code === HASH && n === OPEN_CURLY) {\n var deep = 1;\n next = pos;\n while (deep > 0) {\n next += 1;\n if (css.length <= next) unclosed('interpolation');\n\n code = css.charCodeAt(next);\n n = css.charCodeAt(next + 1);\n\n if (code === CLOSE_CURLY) {\n deep -= 1;\n } else if (code === HASH && n === OPEN_CURLY) {\n deep += 1;\n }\n }\n\n content = css.slice(pos, next + 1);\n lines = content.split('\\n');\n last = lines.length - 1;\n\n if (last > 0) {\n nextLine = line + last;\n nextOffset = next - lines[last].length;\n } else {\n nextLine = line;\n nextOffset = offset;\n }\n\n currentToken = ['word', content, line, pos - offset, nextLine, next - nextOffset];\n\n offset = nextOffset;\n line = nextLine;\n pos = next;\n } else if (code === SLASH && n === ASTERISK) {\n // } SCSS PATCH\n next = css.indexOf('*/', pos + 2) + 1;\n if (next === 0) {\n if (ignore) {\n next = css.length;\n } else {\n unclosed('comment');\n }\n }\n\n content = css.slice(pos, next + 1);\n lines = content.split('\\n');\n last = lines.length - 1;\n\n if (last > 0) {\n nextLine = line + last;\n nextOffset = next - lines[last].length;\n } else {\n nextLine = line;\n nextOffset = offset;\n }\n\n currentToken = ['comment', content, line, pos - offset, nextLine, next - nextOffset];\n\n offset = nextOffset;\n line = nextLine;\n pos = next;\n\n // SCSS PATCH {\n } else if (code === SLASH && n === SLASH) {\n RE_NEW_LINE.lastIndex = pos + 1;\n RE_NEW_LINE.test(css);\n if (RE_NEW_LINE.lastIndex === 0) {\n next = css.length - 1;\n } else {\n next = RE_NEW_LINE.lastIndex - 2;\n }\n\n content = css.slice(pos, next + 1);\n\n currentToken = ['comment', content, line, pos - offset, line, next - offset, 'inline'];\n\n pos = next;\n // } SCSS PATCH\n } else {\n RE_WORD_END.lastIndex = pos + 1;\n RE_WORD_END.test(css);\n if (RE_WORD_END.lastIndex === 0) {\n next = css.length - 1;\n } else {\n next = RE_WORD_END.lastIndex - 2;\n }\n\n currentToken = ['word', css.slice(pos, next + 1), line, pos - offset, line, next - offset];\n\n buffer.push(currentToken);\n\n pos = next;\n }\n\n break;\n }\n\n pos++;\n return currentToken;\n }\n\n function back(token) {\n returned.push(token);\n }\n\n return {\n back: back,\n nextToken: nextToken,\n endOfFile: endOfFile\n };\n}", "function tokenize(str, maxWidth) {\n\t var result = [];\n\t /* first tokenization pass - split texts and color formatting commands */\n\n\t var offset = 0;\n\t str.replace(RE_COLORS, function (match, type, name, index) {\n\t /* string before */\n\t var part = str.substring(offset, index);\n\n\t if (part.length) {\n\t result.push({\n\t type: TYPE_TEXT,\n\t value: part\n\t });\n\t }\n\t /* color command */\n\n\n\t result.push({\n\t type: type == \"c\" ? TYPE_FG : TYPE_BG,\n\t value: name.trim()\n\t });\n\t offset = index + match.length;\n\t return \"\";\n\t });\n\t /* last remaining part */\n\n\t var part = str.substring(offset);\n\n\t if (part.length) {\n\t result.push({\n\t type: TYPE_TEXT,\n\t value: part\n\t });\n\t }\n\n\t return breakLines(result, maxWidth);\n\t }", "function getStyle()\n {\tvar p = \"hatch\";\n debugger\n return [ new ol.style.Style(\n {\tfill: new ol.style.FillPattern(\n {\tpattern: (p!='Image (PNG)') ? p : undefined,\n image: (p=='Image (PNG)') ? new ol.style.Icon({ src : 'data/pattern.png' }) : undefined,\n ratio: 1,\n icon: p=='Image (PNG)' ? new ol.style.Icon ({src:'data/target.png'}) : undefined,\n color: \"white\",\n offset:0,\n scale: 0.5,\n fill: new ol.style.Fill ({ color:\"rgba(255,255,255,0)\" }),\n size: 3.5,\n spacing: 14,\n angle: -45\n }),\n stroke: new ol.style.Stroke({\n color: '#ffffff',\n width: 2.8\n })\n })];\n }", "getRawStyling(instance, scene) {\n const styling = [];\n\n for (let i = 0, len = this.selectors.length; i < len; i++) {\n const selector = this.selectors[i].getRawStyling(instance, scene);\n styling.push(selector);\n }\n\n return styling;\n }", "function decodeInlineStyleRanges(text, ranges) {\n var styles = Array(text.length).fill(EMPTY_SET);\n if (ranges) {\n ranges.forEach(function ( /*object*/range) {\n var cursor = substr(text, 0, range.offset).length;\n var end = cursor + substr(text, range.offset, range.length).length;\n while (cursor < end) {\n styles[cursor] = styles[cursor].add(range.style);\n cursor++;\n }\n });\n }\n return styles;\n}", "function decodeInlineStyleRanges(text, ranges) {\n var styles = Array(text.length).fill(EMPTY_SET);\n if (ranges) {\n ranges.forEach(function ( /*object*/range) {\n var cursor = substr(text, 0, range.offset).length;\n var end = cursor + substr(text, range.offset, range.length).length;\n while (cursor < end) {\n styles[cursor] = styles[cursor].add(range.style);\n cursor++;\n }\n });\n }\n return styles;\n}", "function decodeInlineStyleRanges(text, ranges) {\n var styles = Array(text.length).fill(EMPTY_SET);\n if (ranges) {\n ranges.forEach(function ( /*object*/range) {\n var cursor = substr(text, 0, range.offset).length;\n var end = cursor + substr(text, range.offset, range.length).length;\n while (cursor < end) {\n styles[cursor] = styles[cursor].add(range.style);\n cursor++;\n }\n });\n }\n return styles;\n}", "function decodeInlineStyleRanges(text, ranges) {\n var styles = Array(text.length).fill(EMPTY_SET);\n if (ranges) {\n ranges.forEach(function ( /*object*/range) {\n var cursor = substr(text, 0, range.offset).length;\n var end = cursor + substr(text, range.offset, range.length).length;\n while (cursor < end) {\n styles[cursor] = styles[cursor].add(range.style);\n cursor++;\n }\n });\n }\n return styles;\n}", "function decodeInlineStyleRanges(text, ranges) {\n var styles = Array(text.length).fill(EMPTY_SET);\n if (ranges) {\n ranges.forEach(function ( /*object*/range) {\n var cursor = substr(text, 0, range.offset).length;\n var end = cursor + substr(text, range.offset, range.length).length;\n while (cursor < end) {\n styles[cursor] = styles[cursor].add(range.style);\n cursor++;\n }\n });\n }\n return styles;\n}", "function decodeInlineStyleRanges(text, ranges) {\n var styles = Array(text.length).fill(EMPTY_SET);\n if (ranges) {\n ranges.forEach(function ( /*object*/range) {\n var cursor = substr(text, 0, range.offset).length;\n var end = cursor + substr(text, range.offset, range.length).length;\n while (cursor < end) {\n styles[cursor] = styles[cursor].add(range.style);\n cursor++;\n }\n });\n }\n return styles;\n}", "function decodeInlineStyleRanges(text, ranges) {\n var styles = Array(text.length).fill(EMPTY_SET);\n if (ranges) {\n ranges.forEach(function ( /*object*/range) {\n var cursor = substr(text, 0, range.offset).length;\n var end = cursor + substr(text, range.offset, range.length).length;\n while (cursor < end) {\n styles[cursor] = styles[cursor].add(range.style);\n cursor++;\n }\n });\n }\n return styles;\n}", "function decodeInlineStyleRanges(text, ranges) {\n var styles = Array(text.length).fill(EMPTY_SET);\n if (ranges) {\n ranges.forEach(function ( /*object*/range) {\n var cursor = substr(text, 0, range.offset).length;\n var end = cursor + substr(text, range.offset, range.length).length;\n while (cursor < end) {\n styles[cursor] = styles[cursor].add(range.style);\n cursor++;\n }\n });\n }\n return styles;\n}", "function decodeInlineStyleRanges(text, ranges) {\n var styles = Array(text.length).fill(EMPTY_SET);\n if (ranges) {\n ranges.forEach(function ( /*object*/range) {\n var cursor = substr(text, 0, range.offset).length;\n var end = cursor + substr(text, range.offset, range.length).length;\n while (cursor < end) {\n styles[cursor] = styles[cursor].add(range.style);\n cursor++;\n }\n });\n }\n return styles;\n}", "function kStyle() {\n this.arrayStyle = [];\n this.myclass = null;\n this.addStyle = function (name, value) {\n var style = [name, value];\n this.arrayStyle.push(style);\n };\n this.setClassName = function (name) {\n this.myClass = name;\n };\n this.getClassName = function (name) {\n return this.myClass;\n };\n this.removeStyle = function (name) {\n //not implemented\n };\n this.removeAllStyles = function () {\n //not implemented\n };\n this.getArray = function () {\n return this.arrayStyle;\n };\n}", "function getInlineStyleSections(block, styles, start, end) {\n var styleSections = [];\n var text = block.text;\n\n if (text.length > 0) {\n var inlineStyles = getStyleArrayForBlock(block);\n var section = void 0;\n for (var i = start; i < end; i += 1) {\n if (i !== start && sameStyleAsPrevious(inlineStyles, styles, i)) {\n section.text.push(text[i]);\n section.end = i + 1;\n } else {\n section = {\n styles: getStylesAtOffset(inlineStyles, i),\n text: [text[i]],\n start: i,\n end: i + 1\n };\n styleSections.push(section);\n }\n }\n }\n return styleSections;\n}", "function parseArray(parser, result, style) {\n var row = [];\n var body = [row];\n var rowGaps = [];\n while (true) {\n // eslint-disable-line no-constant-condition\n var cell = parser.parseExpression(false, undefined);\n cell = new __WEBPACK_IMPORTED_MODULE_4__ParseNode__[\"a\" /* default */](\"ordgroup\", cell, parser.mode);\n if (style) {\n cell = new __WEBPACK_IMPORTED_MODULE_4__ParseNode__[\"a\" /* default */](\"styling\", {\n style: style,\n value: [cell]\n }, parser.mode);\n }\n row.push(cell);\n var next = parser.nextToken.text;\n if (next === \"&\") {\n parser.consume();\n } else if (next === \"\\\\end\") {\n // Arrays terminate newlines with `\\crcr` which consumes a `\\cr` if\n // the last line is empty.\n var lastRow = body[body.length - 1];\n if (body.length > 1 && lastRow.length === 1 && lastRow[0].value.value[0].value.length === 0) {\n body.pop();\n }\n break;\n } else if (next === \"\\\\\\\\\" || next === \"\\\\cr\") {\n var cr = parser.parseFunction();\n if (!cr) {\n throw new __WEBPACK_IMPORTED_MODULE_3__ParseError__[\"a\" /* default */](\"Failed to parse function after \" + next);\n }\n rowGaps.push(cr.value.size);\n row = [];\n body.push(row);\n } else {\n throw new __WEBPACK_IMPORTED_MODULE_3__ParseError__[\"a\" /* default */](\"Expected & or \\\\\\\\ or \\\\end\", parser.nextToken);\n }\n }\n result.body = body;\n result.rowGaps = rowGaps;\n return new __WEBPACK_IMPORTED_MODULE_4__ParseNode__[\"a\" /* default */](result.type, result, parser.mode);\n}", "extractStyles() {\n\t\tconst options = this.options\n\t\tlet full_code = this.full_code\n\t\tlet first = true\n\t\tlet res = ''\n\n\t\tlet styles = pregMatchAll(styleRegex, full_code)\n\t\tif (!styles.length) return ''\n\t\t\n\t\tfor (let style of styles) {\n\t\t\tres += style[1] + '\\n'\n\n\t\t\t// Style tag spacer\n\t\t\tlet spacer = options.openDelimiter + options.delimiter\n\t\t\t\t+ '// ' + style[0].replace(/\\r?\\n/g, '\\n// ')\n\t\t\t\t+ options.delimiter + options.closeDelimiter\n\t\t\t\n\t\t\t// Add <%= styles %> for the first tag\n\t\t\tif (first) {\n\t\t\t\tfirst = false\n\t\t\t\tspacer = options.openDelimiter + options.delimiter\n\t\t\t\t\t+ '- styles '\n\t\t\t\t\t+ options.delimiter + options.closeDelimiter\n\t\t\t\t\t+ spacer\n\t\t\t}\n\t\t\t\n\t\t\tfull_code = full_code.replace(style[0], spacer)\n\t\t}\n\n\t\t//TODO: Sass?\n\n\t\tthis.styles = res\n\t\tthis.full_code = full_code\n\t}", "function decodeInlineStyleRanges(text, ranges) {\n\t var styles = Array(text.length).fill(EMPTY_SET);\n\t if (ranges) {\n\t ranges.forEach(function ( /*object*/range) {\n\t var cursor = substr(text, 0, range.offset).length;\n\t var end = cursor + substr(text, range.offset, range.length).length;\n\t while (cursor < end) {\n\t styles[cursor] = styles[cursor].add(range.style);\n\t cursor++;\n\t }\n\t });\n\t }\n\t return styles;\n\t}", "_normalizeIntralineHighlights(content, highlights) {\n let contentIndex = 0;\n let idx = 0;\n const normalized = [];\n for (const hl of highlights) {\n let line = content[contentIndex] + '\\n';\n let j = 0;\n while (j < hl[0]) {\n if (idx === line.length) {\n idx = 0;\n line = content[++contentIndex] + '\\n';\n continue;\n }\n idx++;\n j++;\n }\n let lineHighlight = {\n contentIndex,\n startIndex: idx,\n };\n\n j = 0;\n while (line && j < hl[1]) {\n if (idx === line.length) {\n idx = 0;\n line = content[++contentIndex] + '\\n';\n normalized.push(lineHighlight);\n lineHighlight = {\n contentIndex,\n startIndex: idx,\n };\n continue;\n }\n idx++;\n j++;\n }\n lineHighlight.endIndex = idx;\n normalized.push(lineHighlight);\n }\n return normalized;\n }", "reparsePretties(range) {\r\n range = this.document.validateRange(range);\r\n const startCharacter = 0;\r\n const newUglyRanges = new DisjointRangeSet_1.DisjointRangeSet();\r\n const newStyledRanges = new DisjointRangeSet_1.DisjointRangeSet();\r\n const newScopedRanges = [];\r\n const newUnscopedRanges = [];\r\n const newConditionalRanges = new RangeSet_1.RangeSet();\r\n // initialize an empty range set for every id\r\n this.prettyDecorations.unscoped.forEach(() => newUnscopedRanges.push(new DisjointRangeSet_1.DisjointRangeSet()));\r\n this.prettyDecorations.scoped.forEach(() => newScopedRanges.push(new DisjointRangeSet_1.DisjointRangeSet()));\r\n let invalidatedTokenState = false;\r\n // Collect new pretties\r\n const lineCount = this.document.getLineCount();\r\n let lineIdx;\r\n for (lineIdx = range.start.line; lineIdx <= range.end.line || (invalidatedTokenState && lineIdx < lineCount); ++lineIdx) {\r\n const line = this.document.getLine(lineIdx);\r\n const { tokens: tokens, invalidated: invalidated } = this.refreshTokensOnLine(line, lineIdx);\r\n invalidatedTokenState = invalidated;\r\n for (let ugly of this.iterateLineUglies(line, tokens)) {\r\n const uglyRange = new vscode.Range(lineIdx, ugly.start, lineIdx, ugly.end);\r\n newConditionalRanges.add(new vscode.Range(lineIdx, ugly.matchStart, lineIdx, ugly.matchEnd));\r\n if (ugly.type === \"scoped\") {\r\n if (this.prettyDecorations.scoped[ugly.id].pretty)\r\n newUglyRanges.insert(uglyRange);\r\n else\r\n newStyledRanges.insert(uglyRange);\r\n newScopedRanges[ugly.id].insert(uglyRange);\r\n }\r\n else if (ugly.type === \"unscoped\") {\r\n if (this.prettyDecorations.unscoped[ugly.id].pretty)\r\n newUglyRanges.insert(uglyRange);\r\n else\r\n newStyledRanges.insert(uglyRange);\r\n newUnscopedRanges[ugly.id].insert(uglyRange);\r\n }\r\n }\r\n }\r\n if (lineIdx - 1 > range.end.line) {\r\n // console.info('Aditional tokens reparsed: ' + (lineIdx-range.end.line) + ' lines');\r\n range = range.with({ end: range.end.with({ line: lineIdx, character: 0 }) });\r\n }\r\n // compute the total reparsed range\r\n // use this to clear any preexisting substitutions\r\n const newUglyTotalRange = newUglyRanges.getTotalRange();\r\n const newStyledTotalRange = newStyledRanges.getTotalRange();\r\n let hiddenOverlap = range.with({ start: range.start.with({ character: startCharacter }) });\r\n let styledOverlap = range.with({ start: range.start.with({ character: startCharacter }) });\r\n if (!newUglyTotalRange.isEmpty)\r\n hiddenOverlap = hiddenOverlap.union(newUglyRanges.getTotalRange());\r\n if (!newStyledTotalRange.isEmpty)\r\n styledOverlap = styledOverlap.union(newStyledRanges.getTotalRange());\r\n const overlap = hiddenOverlap.union(styledOverlap);\r\n this.conditionalRanges.removeOverlapping(overlap, { includeTouchingStart: false, includeTouchingEnd: false });\r\n this.uglyDecorationRanges.removeOverlapping(hiddenOverlap);\r\n // this.styledDecorationRanges.removeOverlapping(styledOverlap);\r\n this.prettyDecorations.unscoped.forEach(r => r.ranges.removeOverlapping(overlap));\r\n this.prettyDecorations.scoped.forEach(r => r.ranges.removeOverlapping(overlap));\r\n // add the new pretties & ugly ducklings\r\n newConditionalRanges.getRanges().forEach(r => this.conditionalRanges.add(r));\r\n this.uglyDecorationRanges.insertRanges(newUglyRanges);\r\n this.prettyDecorations.unscoped.forEach((pretty, idx) => pretty.ranges.insertRanges(newUnscopedRanges[idx]));\r\n this.prettyDecorations.scoped.forEach((pretty, idx) => {\r\n pretty.ranges.insertRanges(newScopedRanges[idx]);\r\n });\r\n if (!newStyledRanges.isEmpty() || !newUglyRanges.isEmpty())\r\n this.changedUglies = true;\r\n return hiddenOverlap.union(styledOverlap);\r\n }", "function createHighlights(root, cssClass = '') {\n let highlights = [];\n\n for (let i = 0; i < 3; i++) {\n const span = document.createElement('span');\n span.textContent = 'Test text';\n const range = new Range();\n range.setStartBefore(span.childNodes[0]);\n range.setEndAfter(span.childNodes[0]);\n root.appendChild(span);\n highlights.push(...highlightRange(range, cssClass));\n }\n\n return highlights;\n }", "getStyleElements() {\n return this.styleElements.slice();\n }", "static get styles () {\n return css`${unsafeCSS(style)}`\n }", "function r(e,t,n,i,o,a,r,s){for(var l=m[\"default\"](n,i,function(e,n){var i=t(n);return null==i?null:x[\"default\"](o[e],i,a[e])?null:{key:n.key,data:n.data,style:i}}),u=[],p=[],d=[],h=[],f=0;f<l.length;f++){for(var g=l[f],y=null,v=0;v<n.length;v++)if(n[v].key===g.key){y=v;break}if(null==y){var b=e(g);u[f]=b,d[f]=b;var w=c[\"default\"](g.style);p[f]=w,h[f]=w}else u[f]=o[y],d[f]=r[y],p[f]=a[y],h[f]=s[y]}return[l,u,p,d,h]}", "function separateStyles(stylesArray) {\n var aphroditeStyles = [];\n\n // Since determining if an Object is empty requires collecting all of its\n // keys, and we want the best performance in this code because we are in the\n // render path, we are going to do a little bookkeeping ourselves.\n var hasInlineStyles = false;\n var inlineStyles = {};\n\n // This is run on potentially every node in the tree when rendering, where\n // performance is critical. Normally we would prefer using `forEach`, but\n // old-fashioned for loops are faster so that's what we have chosen here.\n for (var i = 0; i < stylesArray.length; i++) {\n // eslint-disable-line no-plusplus\n var style = stylesArray[i];\n\n // If this style is falsey, we just want to disregard it. This allows for\n // syntax like:\n //\n // css(isFoo && styles.foo)\n if (style) {\n if ((0, _has2['default'])(style, '_name') && (0, _has2['default'])(style, '_definition')) {\n // This looks like a reference to an Aphrodite style object, so that's\n // where it goes.\n aphroditeStyles.push(style);\n } else {\n Object.assign(inlineStyles, style);\n hasInlineStyles = true;\n }\n }\n }\n\n return {\n aphroditeStyles: aphroditeStyles,\n hasInlineStyles: hasInlineStyles,\n inlineStyles: inlineStyles\n };\n}", "function Ze(e,t,a,n){\n // A styles array always starts with a number identifying the\n // mode/overlays that it is based on (for easy invalidation).\n var r=[e.state.modeGen],f={};\n // Compute the base array of styles\n nt(e,t.text,e.doc.mode,a,function(e,t){return r.push(e,t)},f,n);for(var o=a.state,i=0;i<e.state.overlays.length;++i)!function(n){a.baseTokens=r;var i=e.state.overlays[n],s=1,c=0;a.state=!0,nt(e,t.text,i.mode,a,function(e,t){\n // Ensure there's a token end at the current position, and that i points at it\n for(var a=s;c<e;){var n=r[s];n>e&&r.splice(s,1,e,r[s+1],n),s+=2,c=Math.min(e,n)}if(t)if(i.opaque)r.splice(a,s-a,e,\"overlay \"+t),s=a+2;else for(;a<s;a+=2){var f=r[a+1];r[a+1]=(f?f+\" \":\"\")+\"overlay \"+t}},f),a.state=o,a.baseTokens=null,a.baseTokenPos=1}(i);return{styles:r,classes:f.bgClass||f.textClass?f:null}}", "function parseTheme(source) {\r\n if (!source) {\r\n return [];\r\n }\r\n if (!source.settings || !Array.isArray(source.settings)) {\r\n return [];\r\n }\r\n var settings = source.settings;\r\n var result = [], resultLen = 0;\r\n for (var i = 0, len = settings.length; i < len; i++) {\r\n var entry = settings[i];\r\n if (!entry.settings) {\r\n continue;\r\n }\r\n var scopes = void 0;\r\n if (typeof entry.scope === 'string') {\r\n var _scope = entry.scope;\r\n // remove leading commas\r\n _scope = _scope.replace(/^[,]+/, '');\r\n // remove trailing commans\r\n _scope = _scope.replace(/[,]+$/, '');\r\n scopes = _scope.split(',');\r\n }\r\n else if (Array.isArray(entry.scope)) {\r\n scopes = entry.scope;\r\n }\r\n else {\r\n scopes = [''];\r\n }\r\n var fontStyle = -1 /* NotSet */;\r\n if (typeof entry.settings.fontStyle === 'string') {\r\n fontStyle = 0 /* None */;\r\n var segments = entry.settings.fontStyle.split(' ');\r\n for (var j = 0, lenJ = segments.length; j < lenJ; j++) {\r\n var segment = segments[j];\r\n switch (segment) {\r\n case 'italic':\r\n fontStyle = fontStyle | 1 /* Italic */;\r\n break;\r\n case 'bold':\r\n fontStyle = fontStyle | 2 /* Bold */;\r\n break;\r\n case 'underline':\r\n fontStyle = fontStyle | 4 /* Underline */;\r\n break;\r\n }\r\n }\r\n }\r\n var foreground = null;\r\n if (typeof entry.settings.foreground === 'string' && isValidHexColor(entry.settings.foreground)) {\r\n foreground = entry.settings.foreground;\r\n }\r\n var background = null;\r\n if (typeof entry.settings.background === 'string' && isValidHexColor(entry.settings.background)) {\r\n background = entry.settings.background;\r\n }\r\n for (var j = 0, lenJ = scopes.length; j < lenJ; j++) {\r\n var _scope = scopes[j].trim();\r\n var segments = _scope.split(' ');\r\n var scope = segments[segments.length - 1];\r\n var parentScopes = null;\r\n if (segments.length > 1) {\r\n parentScopes = segments.slice(0, segments.length - 1);\r\n parentScopes.reverse();\r\n }\r\n result[resultLen++] = new ParsedThemeRule(scope, parentScopes, i, fontStyle, foreground, background);\r\n }\r\n }\r\n return result;\r\n}", "function parseArray(parser, result, style) {\n var row = [];\n var body = [row];\n var rowGaps = [];\n while (true) {\n // eslint-disable-line no-constant-condition\n var cell = parser.parseExpression(false, null);\n cell = new _ParseNode2.default(\"ordgroup\", cell, parser.mode);\n if (style) {\n cell = new _ParseNode2.default(\"styling\", {\n style: style,\n value: [cell]\n }, parser.mode);\n }\n row.push(cell);\n var next = parser.nextToken.text;\n if (next === \"&\") {\n parser.consume();\n } else if (next === \"\\\\end\") {\n // Arrays terminate newlines with `\\crcr` which consumes a `\\cr` if\n // the last line is empty.\n var lastRow = body[body.length - 1];\n if (body.length > 1 && lastRow.length === 1 && lastRow[0].value.value[0].value.length === 0) {\n body.pop();\n }\n break;\n } else if (next === \"\\\\\\\\\" || next === \"\\\\cr\") {\n var cr = parser.parseFunction();\n rowGaps.push(cr.value.size);\n row = [];\n body.push(row);\n } else {\n throw new _ParseError2.default(\"Expected & or \\\\\\\\ or \\\\end\", parser.nextToken);\n }\n }\n result.body = body;\n result.rowGaps = rowGaps;\n return new _ParseNode2.default(result.type, result, parser.mode);\n}", "function TStylingRange() {}", "function TStylingRange() {}", "function getStylesAtOffset(inlineStyles, offset) {\n var styles = {};\n if (inlineStyles.COLOR[offset]) {\n styles.COLOR = inlineStyles.COLOR[offset];\n }\n if (inlineStyles.BGCOLOR[offset]) {\n styles.BGCOLOR = inlineStyles.BGCOLOR[offset];\n }\n if (inlineStyles.FONTSIZE[offset]) {\n styles.FONTSIZE = inlineStyles.FONTSIZE[offset];\n }\n if (inlineStyles.FONTFAMILY[offset]) {\n styles.FONTFAMILY = inlineStyles.FONTFAMILY[offset];\n }\n if (inlineStyles.UNDERLINE[offset]) {\n styles.UNDERLINE = true;\n }\n if (inlineStyles.ITALIC[offset]) {\n styles.ITALIC = true;\n }\n if (inlineStyles.BOLD[offset]) {\n styles.BOLD = true;\n }\n if (inlineStyles.STRIKETHROUGH[offset]) {\n styles.STRIKETHROUGH = true;\n }\n if (inlineStyles.CODE[offset]) {\n styles.CODE = true;\n }\n if (inlineStyles.SUBSCRIPT[offset]) {\n styles.SUBSCRIPT = true;\n }\n if (inlineStyles.SUPERSCRIPT[offset]) {\n styles.SUPERSCRIPT = true;\n }\n return styles;\n}", "function copyArrays(textStyle) {\n // These color fields were arrays, but will set to WASM pointers before we pass this\n // object over the WASM interface.\n textStyle['_colorPtr'] = copyColorToWasm(textStyle['color']);\n textStyle['_foregroundColorPtr'] = nullptr; // nullptr is 0, from helper.js\n textStyle['_backgroundColorPtr'] = nullptr;\n textStyle['_decorationColorPtr'] = nullptr;\n if (textStyle['foregroundColor']) {\n textStyle['_foregroundColorPtr'] = copyColorToWasm(textStyle['foregroundColor'], scratchForegroundColorPtr);\n }\n if (textStyle['backgroundColor']) {\n textStyle['_backgroundColorPtr'] = copyColorToWasm(textStyle['backgroundColor'], scratchBackgroundColorPtr);\n }\n if (textStyle['decorationColor']) {\n textStyle['_decorationColorPtr'] = copyColorToWasm(textStyle['decorationColor'], scratchDecorationColorPtr);\n }\n\n if (Array.isArray(textStyle['fontFamilies']) && textStyle['fontFamilies'].length) {\n textStyle['_fontFamiliesPtr'] = naiveCopyStrArray(textStyle['fontFamilies']);\n textStyle['_fontFamiliesLen'] = textStyle['fontFamilies'].length;\n } else {\n textStyle['_fontFamiliesPtr'] = nullptr;\n textStyle['_fontFamiliesLen'] = 0;\n Debug('no font families provided, text may draw wrong or not at all');\n }\n\n if (textStyle['locale']) {\n var str = textStyle['locale'];\n textStyle['_localePtr'] = cacheOrCopyString(str);\n textStyle['_localeLen'] = lengthBytesUTF8(str) + 1; // add 1 for the null terminator.\n } else {\n textStyle['_localePtr'] = nullptr;\n textStyle['_localeLen'] = 0;\n }\n\n if (Array.isArray(textStyle['shadows']) && textStyle['shadows'].length) {\n var shadows = textStyle['shadows'];\n var shadowColors = shadows.map(function (s) { return s['color'] || CanvasKit.BLACK; });\n var shadowBlurRadii = shadows.map(function (s) { return s['blurRadius'] || 0.0; });\n textStyle['_shadowLen'] = shadows.length;\n // 2 floats per point, 4 bytes per float\n var ptr = CanvasKit._malloc(shadows.length * 2 * 4);\n var adjustedPtr = ptr / 4; // 4 bytes per float\n for (var i = 0; i < shadows.length; i++) {\n var offset = shadows[i]['offset'] || [0, 0];\n CanvasKit.HEAPF32[adjustedPtr] = offset[0];\n CanvasKit.HEAPF32[adjustedPtr + 1] = offset[1];\n adjustedPtr += 2;\n }\n textStyle['_shadowColorsPtr'] = copyFlexibleColorArray(shadowColors).colorPtr;\n textStyle['_shadowOffsetsPtr'] = ptr;\n textStyle['_shadowBlurRadiiPtr'] = copy1dArray(shadowBlurRadii, 'HEAPF32');\n } else {\n textStyle['_shadowLen'] = 0;\n textStyle['_shadowColorsPtr'] = nullptr;\n textStyle['_shadowOffsetsPtr'] = nullptr;\n textStyle['_shadowBlurRadiiPtr'] = nullptr;\n }\n\n if (Array.isArray(textStyle['fontFeatures']) && textStyle['fontFeatures'].length) {\n var fontFeatures = textStyle['fontFeatures'];\n var fontFeatureNames = fontFeatures.map(function (s) { return s['name']; });\n var fontFeatureValues = fontFeatures.map(function (s) { return s['value']; });\n textStyle['_fontFeatureLen'] = fontFeatures.length;\n textStyle['_fontFeatureNamesPtr'] = naiveCopyStrArray(fontFeatureNames);\n textStyle['_fontFeatureValuesPtr'] = copy1dArray(fontFeatureValues, 'HEAPU32');\n } else {\n textStyle['_fontFeatureLen'] = 0;\n textStyle['_fontFeatureNamesPtr'] = nullptr;\n textStyle['_fontFeatureValuesPtr'] = nullptr;\n }\n\n if (Array.isArray(textStyle['fontVariations']) && textStyle['fontVariations'].length) {\n var fontVariations = textStyle['fontVariations'];\n var fontVariationAxes = fontVariations.map(function (s) { return s['axis']; });\n var fontVariationValues = fontVariations.map(function (s) { return s['value']; });\n textStyle['_fontVariationLen'] = fontVariations.length;\n textStyle['_fontVariationAxesPtr'] = naiveCopyStrArray(fontVariationAxes);\n textStyle['_fontVariationValuesPtr'] = copy1dArray(fontVariationValues, 'HEAPF32');\n } else {\n textStyle['_fontVariationLen'] = 0;\n textStyle['_fontVariationAxesPtr'] = nullptr;\n textStyle['_fontVariationValuesPtr'] = nullptr;\n }\n }", "applyStyleValues() {\n if (this._style) this._style.parseInlineStyle(this._inlineStyle);\n }", "function codestyling() {\n\t\t$('pre code').each(function(i, e) {\n\t\t\thljs.highlightBlock(e);\n\n\t\t\tif(!$(this).hasClass('language-text')) {\n\t\t\t\tvar code = $(this);\n\t\t\t\tvar lines = code.html().split(/\\n/).length;\n\t\t\t\tvar numbers = [];\n\t\t\t\tfor (i = 1; i < lines; i++) {\n\t\t\t\t\tnumbers += '<span class=\"line\">' + i + '</span>';\n\t\t\t\t}\n\t\t\t\tcode.parent().append('<div class=\"lines\">' + numbers + '</div>');\n\t\t\t}\n\t\t});\n\t}" ]
[ "0.6524877", "0.64424765", "0.61398196", "0.59578437", "0.58346134", "0.577891", "0.5777643", "0.5777643", "0.56957585", "0.56957585", "0.56957585", "0.56957585", "0.56957585", "0.56957585", "0.56957585", "0.56654114", "0.56654114", "0.5658727", "0.56117076", "0.56117076", "0.56117076", "0.56117076", "0.56117076", "0.56117076", "0.56117076", "0.56117076", "0.56117076", "0.5590733", "0.55714566", "0.5566139", "0.5534279", "0.5530312", "0.5507112", "0.5505792", "0.5480776", "0.5480776", "0.5433972", "0.5413736", "0.5396094", "0.5380704", "0.53689396", "0.5339808", "0.5339808", "0.53358984", "0.53345406", "0.53345406", "0.5329161", "0.5308424", "0.5277676", "0.5276621", "0.5259098", "0.52496225", "0.5249509", "0.5243082", "0.5243079", "0.5243079", "0.5243079", "0.5243079", "0.5243079", "0.5243079", "0.5243079", "0.5243079", "0.5243079", "0.52200663", "0.52051395", "0.5161492", "0.5132616", "0.51317716", "0.51260465", "0.5109767", "0.51057696", "0.5093344", "0.5075808", "0.50714177", "0.5066338", "0.5065258", "0.50566685", "0.5050195", "0.5029128", "0.5029128", "0.5015057", "0.49907902", "0.496824", "0.4967196" ]
0.5612999
32
Lightweight form of highlight proceed over this line and update state, but don't save a style array. Used for lines that aren't currently visible.
function processLine(cm, text, context, startAt) { var mode = cm.doc.mode; var stream = new StringStream(text, cm.options.tabSize, context); stream.start = stream.pos = startAt || 0; if (text == "") { callBlankLine(mode, context.state); } while (!stream.eol()) { readToken(mode, stream, context.state); stream.start = stream.pos; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "highlightLine(line_num)\n{\n this.highlightSet = line_num;\n}", "function highlightLine(cm, line, state, 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, state, function(end, style) {\n\t\t st.push(end, style);\n\t\t }, lineClasses, forceToEnd);\n\t\t\n\t\t // Run overlays, adjust style array.\n\t\t for (var o = 0; o < cm.state.overlays.length; ++o) {\n\t\t var overlay = cm.state.overlays[o], i = 1, at = 0;\n\t\t runMode(cm, line.text, overlay.mode, true, 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, \"cm-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 + \" \" : \"\") + \"cm-overlay \" + style;\n\t\t }\n\t\t }\n\t\t }, lineClasses);\n\t\t }\n\t\t\n\t\t return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null};\n\t\t }", "function highlightLine(code_mirror_box, lineIndex, css) {\n\n // first remove any previous highlighting for css\n undoHighlightLine(code_mirror_box, css)\n\n var lineHandle = code_mirror_box.getLineHandle(lineIndex)\n var identifier = \"_\" + css\n if (code_mirror_box[identifier] != lineHandle) {\n cm.addLineClass(lineHandle, \"background\", css)\n code_mirror_box[identifier] = lineHandle\n }\n\n}", "function highlightActiveLine() {\n return activeLineHighlighter;\n}", "function highlightLine(highlight) {\n d3.selectAll('.elm')\n .transition()\n .style('opacity', 0.1)\n .style('stroke-width', 1)\n\n var n = highlight.length;\n for (var i = 0; i < n; i++) {\n d3.selectAll('.sel-'+highlight[i]).transition()\n .style('opacity', 1).style('stroke-width', 3);\n }\n }", "function highlightLine(cm, line, state, forceToEnd) {\n\t // A styles array always starts with a number identifying the\n\t // mode/overlays that it is based on (for easy invalidation).\n\t var st = [cm.state.modeGen], lineClasses = {};\n\t // Compute the base array of styles\n\t runMode(cm, line.text, cm.doc.mode, state, function(end, style) {\n\t st.push(end, style);\n\t }, lineClasses, forceToEnd);\n\t\n\t // Run overlays, adjust style array.\n\t for (var o = 0; o < cm.state.overlays.length; ++o) {\n\t var overlay = cm.state.overlays[o], i = 1, at = 0;\n\t runMode(cm, line.text, overlay.mode, true, function(end, style) {\n\t var start = i;\n\t // Ensure there's a token end at the current position, and that i points at it\n\t while (at < end) {\n\t var i_end = st[i];\n\t if (i_end > end)\n\t st.splice(i, 1, end, st[i+1], i_end);\n\t i += 2;\n\t at = Math.min(end, i_end);\n\t }\n\t if (!style) return;\n\t if (overlay.opaque) {\n\t st.splice(start, i - start, end, \"cm-overlay \" + style);\n\t i = start + 2;\n\t } else {\n\t for (; start < i; start += 2) {\n\t var cur = st[start+1];\n\t st[start+1] = (cur ? cur + \" \" : \"\") + \"cm-overlay \" + style;\n\t }\n\t }\n\t }, lineClasses);\n\t }\n\t\n\t return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null};\n\t }", "function highlightLine(cm, line, state, 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, state, function(end, style) {\n st.push(end, style);\n }, lineClasses, forceToEnd);\n\n // Run overlays, adjust style array.\n for (var o = 0; o < cm.state.overlays.length; ++o) {\n var overlay = cm.state.overlays[o], i = 1, at = 0;\n runMode(cm, line.text, overlay.mode, true, 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, \"cm-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 + \" \" : \"\") + \"cm-overlay \" + style;\n }\n }\n }, lineClasses);\n }\n\n return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null};\n }", "function highlightLine(cm, line, state, 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, state, function(end, style) {\n st.push(end, style);\n }, lineClasses, forceToEnd);\n\n // Run overlays, adjust style array.\n for (var o = 0; o < cm.state.overlays.length; ++o) {\n var overlay = cm.state.overlays[o], i = 1, at = 0;\n runMode(cm, line.text, overlay.mode, true, 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, \"cm-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 + \" \" : \"\") + \"cm-overlay \" + style;\n }\n }\n }, lineClasses);\n }\n\n return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null};\n }", "function highlightLine(cm, line, state, 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, state, function(end, style) {\n st.push(end, style);\n }, lineClasses, forceToEnd);\n\n // Run overlays, adjust style array.\n for (var o = 0; o < cm.state.overlays.length; ++o) {\n var overlay = cm.state.overlays[o], i = 1, at = 0;\n runMode(cm, line.text, overlay.mode, true, 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, \"cm-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 + \" \" : \"\") + \"cm-overlay \" + style;\n }\n }\n }, lineClasses);\n }\n\n return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null};\n }", "function highlightLine(cm, line, state, 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, state, function(end, style) {\n st.push(end, style);\n }, lineClasses, forceToEnd);\n\n // Run overlays, adjust style array.\n for (var o = 0; o < cm.state.overlays.length; ++o) {\n var overlay = cm.state.overlays[o], i = 1, at = 0;\n runMode(cm, line.text, overlay.mode, true, 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, \"cm-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 + \" \" : \"\") + \"cm-overlay \" + style;\n }\n }\n }, lineClasses);\n }\n\n return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null};\n }", "function highlightLine(cm, line, state, 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, state, function(end, style) {\n st.push(end, style);\n }, lineClasses, forceToEnd);\n\n // Run overlays, adjust style array.\n for (var o = 0; o < cm.state.overlays.length; ++o) {\n var overlay = cm.state.overlays[o], i = 1, at = 0;\n runMode(cm, line.text, overlay.mode, true, 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, \"cm-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 + \" \" : \"\") + \"cm-overlay \" + style;\n }\n }\n }, lineClasses);\n }\n\n return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null};\n }", "function highlightLine(cm, line, state, 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, state, function(end, style) {\n st.push(end, style);\n }, lineClasses, forceToEnd);\n\n // Run overlays, adjust style array.\n for (var o = 0; o < cm.state.overlays.length; ++o) {\n var overlay = cm.state.overlays[o], i = 1, at = 0;\n runMode(cm, line.text, overlay.mode, true, 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, \"cm-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 + \" \" : \"\") + \"cm-overlay \" + style;\n }\n }\n }, lineClasses);\n }\n\n return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null};\n }", "function highlightLine(cm, line, state, 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, state, function(end, style) {\n st.push(end, style);\n }, lineClasses, forceToEnd);\n\n // Run overlays, adjust style array.\n for (var o = 0; o < cm.state.overlays.length; ++o) {\n var overlay = cm.state.overlays[o], i = 1, at = 0;\n runMode(cm, line.text, overlay.mode, true, 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, \"cm-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 + \" \" : \"\") + \"cm-overlay \" + style;\n }\n }\n }, lineClasses);\n }\n\n return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null};\n }", "function highlightLine(cm, line, state, forceToEnd) {\n\t // A styles array always starts with a number identifying the\n\t // mode/overlays that it is based on (for easy invalidation).\n\t var st = [cm.state.modeGen], lineClasses = {};\n\t // Compute the base array of styles\n\t runMode(cm, line.text, cm.doc.mode, state, function(end, style) {\n\t st.push(end, style);\n\t }, lineClasses, forceToEnd);\n\n\t // Run overlays, adjust style array.\n\t for (var o = 0; o < cm.state.overlays.length; ++o) {\n\t var overlay = cm.state.overlays[o], i = 1, at = 0;\n\t runMode(cm, line.text, overlay.mode, true, function(end, style) {\n\t var start = i;\n\t // Ensure there's a token end at the current position, and that i points at it\n\t while (at < end) {\n\t var i_end = st[i];\n\t if (i_end > end)\n\t st.splice(i, 1, end, st[i+1], i_end);\n\t i += 2;\n\t at = Math.min(end, i_end);\n\t }\n\t if (!style) return;\n\t if (overlay.opaque) {\n\t st.splice(start, i - start, end, \"cm-overlay \" + style);\n\t i = start + 2;\n\t } else {\n\t for (; start < i; start += 2) {\n\t var cur = st[start+1];\n\t st[start+1] = (cur ? cur + \" \" : \"\") + \"cm-overlay \" + style;\n\t }\n\t }\n\t }, lineClasses);\n\t }\n\n\t return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null};\n\t }", "function highlightLine(cm, line, state, forceToEnd) {\n\t // A styles array always starts with a number identifying the\n\t // mode/overlays that it is based on (for easy invalidation).\n\t var st = [cm.state.modeGen], lineClasses = {};\n\t // Compute the base array of styles\n\t runMode(cm, line.text, cm.doc.mode, state, function(end, style) {\n\t st.push(end, style);\n\t }, lineClasses, forceToEnd);\n\n\t // Run overlays, adjust style array.\n\t for (var o = 0; o < cm.state.overlays.length; ++o) {\n\t var overlay = cm.state.overlays[o], i = 1, at = 0;\n\t runMode(cm, line.text, overlay.mode, true, function(end, style) {\n\t var start = i;\n\t // Ensure there's a token end at the current position, and that i points at it\n\t while (at < end) {\n\t var i_end = st[i];\n\t if (i_end > end)\n\t st.splice(i, 1, end, st[i+1], i_end);\n\t i += 2;\n\t at = Math.min(end, i_end);\n\t }\n\t if (!style) return;\n\t if (overlay.opaque) {\n\t st.splice(start, i - start, end, \"cm-overlay \" + style);\n\t i = start + 2;\n\t } else {\n\t for (; start < i; start += 2) {\n\t var cur = st[start+1];\n\t st[start+1] = (cur ? cur + \" \" : \"\") + \"cm-overlay \" + style;\n\t }\n\t }\n\t }, lineClasses);\n\t }\n\n\t return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null};\n\t }", "function highlightLine(cm, line, state, 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, state, function(end, style) {\r\n st.push(end, style);\r\n }, lineClasses, forceToEnd);\r\n\r\n // Run overlays, adjust style array.\r\n for (var o = 0; o < cm.state.overlays.length; ++o) {\r\n var overlay = cm.state.overlays[o], i = 1, at = 0;\r\n runMode(cm, line.text, overlay.mode, true, 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, \"cm-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 + \" \" : \"\") + \"cm-overlay \" + style;\r\n }\r\n }\r\n }, lineClasses);\r\n }\r\n\r\n return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null};\r\n }", "function highlightActiveLine() {\n return activeLineHighlighter;\n}", "function highlightLine(cm, line, state, 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, state, function (end, style) { return st.push(end, style); },\n lineClasses, forceToEnd)\n\n // Run overlays, adjust style array.\n var loop = function ( o ) {\n var overlay = cm.state.overlays[o], i = 1, at = 0\n runMode(cm, line.text, overlay.mode, true, 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 };\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, state, 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, state, function (end, style) { return st.push(end, style); },\n lineClasses, forceToEnd)\n\n // Run overlays, adjust style array.\n var loop = function ( o ) {\n var overlay = cm.state.overlays[o], i = 1, at = 0\n runMode(cm, line.text, overlay.mode, true, 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 };\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}", "highlight(on) { }", "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 highlight() {\r\n\tthis.style.backgroundColor = '#ff0';\r\n}", "highlight() {\n if (arguments.length === 2) {\n this._highlightedPositionsToBe.push({ line: arguments[1], col: arguments[0], type: '.' });\n } else if (arguments.length === 1) {\n let { line, col } = linearPosToLineCol(this._lines.join('\\n'), arguments[0]);\n this._highlightedPositionsToBe.push({ line, col, type: '.' });\n } else throw new Error(`highlight: invalid arguments`);\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) {\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 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 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 };\n\n for (var o = 0; o < cm.state.overlays.length; ++o) loop( o );\n context.state = state;\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 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 };\n\n for (var o = 0; o < cm.state.overlays.length; ++o) loop( o );\n context.state = state;\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) {\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],\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 }", "highlight_correct() {\n\t\t\tthis.selection_board.get_shape(this.shape).set_highlight('green');\n\t\t\tthis.selection_board.draw();\n\t\t}", "function undoHighlightLine(code_mirror_box, css) {\n var identifier = \"_\" + css\n if (identifier in code_mirror_box) {\n var lineHandle = code_mirror_box[identifier]\n code_mirror_box.removeLineClass(lineHandle, \"background\", css);\n }\n}", "updateHighlight() {\n var on = this.hover || this.selected;\n this.highlighted = on;\n if (on) {\n this.material.emissive = this.defaultEmissiveness;\n } else {\n this.material.emissive = this.defaultEmissiveness\n .clone()\n .multiplyScalar(this.brightness);\n this.material.needsUpdate = true;\n }\n }", "get highlight() { return this._highlight; }", "function highlight() {\n d3.select(this).classed('selected', true)\n }", "function highlight(text, style) {\n var page_html = document.getElementById('page').innerHTML;\n var page = document.getElementById('page');\n var draft_html = document.getElementById('draft').innerHTML;\n var draft = document.getElementById('draft');\n text = text.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&'); //https://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex\n\n var re = new RegExp(text, 'g');\n var m;\n\n if (text.length > 0) {\n page.innerHTML = page_html.replace(re, `<span style='background-color:${style};'>$&</span>`);\n draft.innerHTML = draft_html.replace(re, `<span style='background-color:${style};'>$&</span>`);\n\n } else {\n page.innerHTML = page_html;\n draft.innerHTML = draft_html;\n }\n }", "setHighlightedLabelStyle(style) {\n this._.highlightedLabelStyle = clone(style);\n if (this._.selectedLabel) {\n this.highlightLabel(this._.selectedLabel);\n this.refreshIconsPositions();\n this.animateForAWhile();\n }\n }", "function resetHighlight(e) {\n\te.target.setStyle({\n\t\tweight: 1.5,\n\t\tcolor: '#fff'\n\t});\n\tinfo.update();\n}", "function highlightLink() {\r\n // Extract dimensions / coord from highlighted element\r\n const linkCoords = this.getBoundingClientRect();\r\n // Set the highlight elements dimensions and coords based on THIS' data\r\n highlight.style.width = `${linkCoords.width}px`;\r\n highlight.style.height = `${linkCoords.height}px`;\r\n highlight.style.transform = `translate(${linkCoords.left}px, ${linkCoords.top + window.scrollY}px)`;\r\n}", "function highlightActiveLineGutter() {\n return activeLineGutterHighlighter;\n}", "function highlight(props){\n //change stroke\n var selected = d3.selectAll(\".\" + props.adm1_code)\n .style(\"stroke\", \"#62030F\")\n .style(\"stroke-width\", \"3\");\n\n setLabel(props);\n } //last line of highlight function", "_processUnderline(style, attr) {\n // treat extended attrs as immutable, thus always clone from old one\n // this is needed since the buffer only holds references to it\n attr.extended = attr.extended.clone();\n // default to 1 == single underline\n if (!~style || style > 5) {\n style = 1;\n }\n attr.extended.underlineStyle = style;\n attr.fg |= 268435456 /* UNDERLINE */;\n // 0 deactivates underline\n if (style === 0) {\n attr.fg &= ~268435456 /* UNDERLINE */;\n }\n // update HAS_EXTENDED in BG\n attr.updateExtended();\n }", "set highlightColor(value) {\n if (value === this.highlightColorIn) {\n return;\n }\n this.highlightColorIn = value;\n this.notifyPropertyChanged('highlightColor');\n }", "function highlightSpecialLines() {\n // identify all lines\n find_lines();\n\n d3.select('.increase')\n .on('click', function() {\n // if the lines were already filtered out\n if (state.green) {\n resetSelection();\n state.green = false;\n } else {\n highlightNav(special_lines.green);\n highlightLine(special_lines.green);\n highlightLabel(special_lines.green);\n state.green = true;\n }\n // update graph filter status and reset button\n checkFiltered();\n updateReset();\n })\n\n d3.select('.decrease')\n .on('click', function() {\n if (state.red) {\n resetSelection();\n state.red = false;\n } else {\n state.red = true;\n highlightNav(special_lines.red);\n highlightLine(special_lines.red);\n highlightLabel(special_lines.red);\n }\n // determine if graph is filtered\n checkFiltered();\n updateReset();\n })\n }", "function highlight(state) {\r\n if (element === undefined) element = document.getElementById('shape');\r\n element.style.setProperty('--border-color', (state === \"True\" ? 'steelblue' : '#000'));\r\n\r\n highlighted = (state === \"True\");\r\n}", "function highlight() {\n if (window.getSelection) {\n var selection = window.getSelection();\n if (selection.rangeCount) {\n var range = selection.getRangeAt(0).cloneRange();\n var highlightNode = document.createElement(\"span\");\n highlightNode.setAttribute(\"id\", \"highlighted\");\n highlightNode.setAttribute(\"style\", \"background-color:#FFFF00\");\n range.surroundContents(highlightNode);\n selection.removeAllRanges();\n }\n }\n}", "function addRowHighlight(event)\n{\n event.currentTarget.style.backgroundColor = ROW_HOVER_COLOR;\n}", "onLineMouseOver(part) {\n this.setState({...this.state,selectedPart: part})\n }", "highlightPrev() {\n const $highlightOld = this.$autocompleteSuggests.find('tr.highlight');\n let $highlightNew = this.$autocompleteSuggests.find('tr').last();\n\n if ($highlightOld.length) {\n $highlightOld.removeClass('highlight');\n const $highlightOldPrev = $highlightOld.prev();\n\n if ($highlightOldPrev.length) {\n $highlightNew = $highlightOldPrev;\n }\n }\n\n $highlightNew.addClass('highlight');\n this.highlighted = $highlightNew.data('command');\n this._updateState(AUTOCOMPLETE_STATE.COMMANDS.HIGHLIGHT);\n }", "function highlight_lines(lines, css, where = 'text') {\n cm.eachLine(l => {\n if (lines.includes(cm.getLineNumber(l))) {\n cm.addLineClass(l, where, css)\n } else {\n cm.removeLineClass(l, where, css)\n }\n })\n}", "removeHighlight() {\n if (this._highlight) {\n this._highlight.setStyle({\n fillOpacity: 0,\n });\n }\n }", "get highlighted() { return this._highlighted; }", "function changetextstrikethrough() {\n var currentIndex = findCurrentIndex(tempKey);\n if (mainDiagram.model.nodeDataArray[currentIndex].isStrikethrough) {\n mainDiagram.model.nodeDataArray[currentIndex].isStrikethrough = false\n document.getElementById(\"strikethrough\").style.backgroundColor = \"white\"\n }\n else {\n mainDiagram.model.nodeDataArray[currentIndex].isStrikethrough = true;\n document.getElementById(\"strikethrough\").style.backgroundColor = \"#ff8c00\"\n }\n mainDiagram.rebuildParts();\n}", "function mouseover() {\r\n\t// if the piece is movable, give a class name \"highlight\"\r\n\tif(movable(this)) {\r\n\t\tthis.className = \"highlight\";\r\n\t\t// if not, remove the class name \"highlight\"\r\n\t\t} else {\r\n\t\tthis.removeClassName(\"highlight\");\r\n\t}\r\n}", "function highlight(tr) {\n while (tr && tr.length > 0) {\n tr = highlight0(tr);\n if (trjs.events.lineGetCell(tr, trjs.data.TSCOL) || trjs.events.lineGetCell(tr, trjs.data.TECOL))\n break;\n }\n }", "function highlight(props){\n\n //Ids were stored in different forms on the map\n // and the barchart\n var selectThis;\n if(props.Id2){\n selectThis = \".id\" + props.Id2;\n }else{\n selectThis = \".\" + props[0];\n }\n //change stroke\n var selected = d3.selectAll(selectThis)\n .style({\n \"stroke\": \"black\",\n \"stroke-width\": \"2\"\n });\n\n setLabel(props);\n }", "function resetHighlight(e) {\n var layer = e.target;\n layer.setStyle({\n weight: 3,\n opacity: 1,\n fillColor: '#faebd7'\n });\n }", "function processLine(cm, line, state) {\n var mode = cm.doc.mode;\n var stream = new StringStream(line.text, cm.options.tabSize);\n if (line.text == \"\" && mode.blankLine) mode.blankLine(state);\n while (!stream.eol() && stream.pos <= cm.options.maxHighlightLength) {\n mode.token(stream, state);\n stream.start = stream.pos;\n }\n }", "function processLine(cm, line, state) {\n var mode = cm.doc.mode;\n var stream = new StringStream(line.text, cm.options.tabSize);\n if (line.text == \"\" && mode.blankLine) mode.blankLine(state);\n while (!stream.eol() && stream.pos <= cm.options.maxHighlightLength) {\n mode.token(stream, state);\n stream.start = stream.pos;\n }\n }", "function highlightLine(parent, selector, elementIndex) {\n const element = parent.querySelectorAll(selector)[elementIndex];\n element.classList.add('highlight');\n element.scrollIntoView({block: 'center'});\n}", "function undoHighlightCurrentCode() {\n // Change the css property by applying no highlighted background color\n $(\"#code_\" + registers[\"rip\"]).css(\"background-color\", \"\");\n}", "function SetHighlight ()\n\t{\n\t\tif( showHighlight == true )\n\t\t{\n\t\t\t// Enable images if they are off\n\t\t\tif( highlightBase != null && highlightBase.gameObject.activeInHierarchy == false )\n\t\t\t\thighlightBase.gameObject.SetActive( true );\n\t\t\tif( highlightJoystick != null && highlightJoystick.gameObject.activeInHierarchy == false )\n\t\t\t\thighlightJoystick.gameObject.SetActive( true );\n\n\t\t\t// Here we need to check if each variable is assigned so we don't get a null reference log error when applying color\n\t\t\tif( highlightBase != null )\n\t\t\t\thighlightBase.color = highlightColor;\n\t\t\tif( highlightJoystick != null )\n\t\t\t\thighlightJoystick.color = highlightColor;\n\n\t\t\t// If we are using fade, then we want to modify our highlight's color\n\t\t\tif( useFade == true )\n\t\t\t\tHandleFade( \"Untouched\" );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Here we want to check if we have any highlights, and if so, SetActive( false )\n\t\t\tif( highlightBase != null && highlightBase.gameObject.activeInHierarchy == true )\n\t\t\t\thighlightBase.gameObject.SetActive( false );\n\t\t\tif( highlightJoystick != null && highlightJoystick.gameObject.activeInHierarchy == true )\n\t\t\t\thighlightJoystick.gameObject.SetActive( false );\n\t\t}\n\t}", "addHighlight({ hlGroup: _hlGroup, line, colStart: _start, colEnd: _end, srcId: _srcId, }) {\n const hlGroup = typeof _hlGroup !== 'undefined' ? _hlGroup : '';\n const colEnd = typeof _end !== 'undefined' ? _end : -1;\n const colStart = typeof _start !== 'undefined' ? _start : -0;\n const srcId = typeof _srcId !== 'undefined' ? _srcId : -1;\n const method = hlGroup === '' ? 'request' : 'notify';\n let res = this[method](`${this.prefix}add_highlight`, [\n srcId,\n hlGroup,\n line,\n colStart,\n colEnd,\n ]);\n return method === 'request' ? res : Promise.resolve(null);\n }", "function highlightCurrentCode() {\n // Change the css property by applying a highlighted background color of orange\n $(\"#code_\" + registers[\"rip\"]).css('background-color', '#df9857');\n}", "function updateLineText(cm, lineView) {\n\t\t var cls = lineView.text.className;\n\t\t var built = getLineContent(cm, lineView);\n\t\t if (lineView.text == lineView.node) lineView.node = built.pre;\n\t\t lineView.text.parentNode.replaceChild(built.pre, lineView.text);\n\t\t lineView.text = built.pre;\n\t\t if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) {\n\t\t lineView.bgClass = built.bgClass;\n\t\t lineView.textClass = built.textClass;\n\t\t updateLineClasses(lineView);\n\t\t } else if (cls) {\n\t\t lineView.text.className = cls;\n\t\t }\n\t\t }", "function updateLineText(cm, lineView) {\n\t\t var cls = lineView.text.className;\n\t\t var built = getLineContent(cm, lineView);\n\t\t if (lineView.text == lineView.node) { lineView.node = built.pre; }\n\t\t lineView.text.parentNode.replaceChild(built.pre, lineView.text);\n\t\t lineView.text = built.pre;\n\t\t if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) {\n\t\t lineView.bgClass = built.bgClass;\n\t\t lineView.textClass = built.textClass;\n\t\t updateLineClasses(cm, lineView);\n\t\t } else if (cls) {\n\t\t lineView.text.className = cls;\n\t\t }\n\t\t }", "function applyLineStyle(state, tr, node, startPos) {\n if (node) {\n if (node.attrs && node.attrs.styleName && RESERVED_STYLE_NONE !== node.attrs.styleName) {\n const styleProp = getCustomStyleByName(node.attrs.styleName);\n if (\n null !== styleProp &&\n styleProp.styles &&\n styleProp.styles.boldPartial\n ) {\n if (!tr) {\n tr = state.tr;\n }\n tr = addMarksToLine(\n tr,\n state,\n node,\n startPos,\n styleProp.styles.boldSentence\n );\n }\n }\n } else {\n const { selection } = state;\n const from = selection.$from.before(1);\n const to = selection.$to.after(1);\n // [FS] IRAD-1168 2021-06-21\n // FIX: multi-select paragraphs and apply a style with the bold the first sentence,\n // only the last selected paragraph have bold first sentence.\n tr.doc.nodesBetween(from, to, (node, pos) => {\n if (node.content && node.content.content && node.content.content.length) {\n // Check styleName is available for node\n if (\n node.attrs &&\n node.attrs.styleName &&\n RESERVED_STYLE_NONE !== node.attrs.styleName\n ) {\n const styleProp = getCustomStyleByName(node.attrs.styleName);\n if (\n null !== styleProp &&\n styleProp.styles &&\n styleProp.styles.boldPartial\n ) {\n if (!tr) {\n tr = state.tr;\n }\n tr = addMarksToLine(\n tr,\n state,\n node,\n pos,\n styleProp.styles.boldSentence\n );\n }\n }\n }\n });\n }\n return tr;\n}", "function highlightLine(parent, selector, elementIndex) {\n // console.log('parent, selector, element', parent, selector, elementIndex);\n const element = parent.querySelectorAll(selector)[elementIndex];\n element.classList.add('highlight');\n element.scrollIntoView({inline: 'center'});\n}", "function highlight(field) {\r\n if(field.getAttribute('readonly')) {\r\n return;\r\n }\r\n if(field.select != null)\r\n field.select();\r\n field.onblur=unhighlight;\r\n// field.oldBackgroundColor = computedStyle(field,'backgroundColor','background-color');\r\n field.style.backgroundColor='#e6e6e6';\r\n}", "function highlight(props){\r\n //change stroke\r\n var selected = d3.selectAll(\".\" + props.CODE)\r\n .style(\"stroke\", \"blue\")\r\n .style(\"stroke-width\", \"2\");\r\n setLabel(props);\r\n}", "function changetextunderline() {\n var currentIndex = findCurrentIndex(tempKey);\n if (mainDiagram.model.nodeDataArray[currentIndex].isUnderline) {\n mainDiagram.model.nodeDataArray[currentIndex].isUnderline = false\n document.getElementById(\"underline\").style.backgroundColor = \"white\"\n }\n else {\n mainDiagram.model.nodeDataArray[currentIndex].isUnderline = true;\n document.getElementById(\"underline\").style.backgroundColor = \"#ff8c00\"\n }\n mainDiagram.rebuildParts();\n}", "function paintFirstSpanInLine(){\n var oldTop;\n // target = our text\n var $selected = $('#selectme');\n //$selectedArray = $selected.text().split(' ');\n // separate each word into its own span\n $selected.html(\"<span>\" + $selected.text().split(' ').join(\"</span> <span>\") + \"</span>\");\n oldTop = -1;\n $selected.find('span').each(function(){\n var $this = $(this),\n top = $this.position().top;\n if (top > oldTop){\n $this.css(\"color\", \"rgb(0, 255, 180)\");\n oldTop = top;\n }\n });\n}", "function highlight(e){\neventobj=ns6? e.target : event.srcElement\nif (previous!=''){\nif (checkel(previous))\nprevious.style.backgroundColor=''\nprevious=eventobj\nif (checkel(eventobj))\neventobj.style.backgroundColor=highlightcolor\n}\nelse{\nif (checkel(eventobj))\neventobj.style.backgroundColor=highlightcolor\nprevious=eventobj\n}\n}", "function updateLineText(cm, lineView) {\n var cls = lineView.text.className;\n var built = getLineContent(cm, lineView);\n if (lineView.text == lineView.node) lineView.node = built.pre;\n lineView.text.parentNode.replaceChild(built.pre, lineView.text);\n lineView.text = built.pre;\n if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) {\n lineView.bgClass = built.bgClass;\n lineView.textClass = built.textClass;\n updateLineClasses(lineView);\n } else if (cls) {\n lineView.text.className = cls;\n }\n }", "function updateLineText(cm, lineView) {\n var cls = lineView.text.className;\n var built = getLineContent(cm, lineView);\n if (lineView.text == lineView.node) lineView.node = built.pre;\n lineView.text.parentNode.replaceChild(built.pre, lineView.text);\n lineView.text = built.pre;\n if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) {\n lineView.bgClass = built.bgClass;\n lineView.textClass = built.textClass;\n updateLineClasses(lineView);\n } else if (cls) {\n lineView.text.className = cls;\n }\n }", "function updateLineText(cm, lineView) {\n var cls = lineView.text.className;\n var built = getLineContent(cm, lineView);\n if (lineView.text == lineView.node) lineView.node = built.pre;\n lineView.text.parentNode.replaceChild(built.pre, lineView.text);\n lineView.text = built.pre;\n if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) {\n lineView.bgClass = built.bgClass;\n lineView.textClass = built.textClass;\n updateLineClasses(lineView);\n } else if (cls) {\n lineView.text.className = cls;\n }\n }", "function updateLineText(cm, lineView) {\n var cls = lineView.text.className;\n var built = getLineContent(cm, lineView);\n if (lineView.text == lineView.node) lineView.node = built.pre;\n lineView.text.parentNode.replaceChild(built.pre, lineView.text);\n lineView.text = built.pre;\n if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) {\n lineView.bgClass = built.bgClass;\n lineView.textClass = built.textClass;\n updateLineClasses(lineView);\n } else if (cls) {\n lineView.text.className = cls;\n }\n }", "function updateLineText(cm, lineView) {\n var cls = lineView.text.className;\n var built = getLineContent(cm, lineView);\n if (lineView.text == lineView.node) lineView.node = built.pre;\n lineView.text.parentNode.replaceChild(built.pre, lineView.text);\n lineView.text = built.pre;\n if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) {\n lineView.bgClass = built.bgClass;\n lineView.textClass = built.textClass;\n updateLineClasses(lineView);\n } else if (cls) {\n lineView.text.className = cls;\n }\n }" ]
[ "0.684628", "0.6801102", "0.6746067", "0.6697349", "0.6686436", "0.66719717", "0.6644046", "0.6644046", "0.6644046", "0.6644046", "0.6644046", "0.6644046", "0.6644046", "0.664124", "0.664124", "0.66303146", "0.6629034", "0.66056436", "0.66056436", "0.6593987", "0.6515894", "0.6407589", "0.6385272", "0.6302107", "0.6302107", "0.6302107", "0.6302107", "0.6302107", "0.6302107", "0.6302107", "0.6302107", "0.6302107", "0.6302107", "0.6302107", "0.6302107", "0.6302107", "0.6302107", "0.6302107", "0.6302107", "0.6302107", "0.626369", "0.6260759", "0.6260759", "0.62440664", "0.62440664", "0.62440664", "0.62440664", "0.62440664", "0.62440664", "0.62440664", "0.62440664", "0.62440664", "0.62349826", "0.61806834", "0.60865974", "0.6062841", "0.6041025", "0.6019808", "0.5998859", "0.5961089", "0.5887695", "0.5863789", "0.5861434", "0.58544254", "0.5844812", "0.5840512", "0.5828248", "0.5805968", "0.57956713", "0.57912636", "0.5786144", "0.5783212", "0.57748234", "0.5755265", "0.57508385", "0.5749353", "0.5749008", "0.57267416", "0.5723866", "0.57232106", "0.57215315", "0.57215315", "0.5720854", "0.5712588", "0.570544", "0.5685016", "0.5678628", "0.566344", "0.56631744", "0.5662189", "0.56562835", "0.5653169", "0.5639231", "0.563639", "0.5633437", "0.5625439", "0.56253785", "0.56253785", "0.56253785", "0.56253785", "0.56253785" ]
0.0
-1
Utility for getTokenAt and getLineTokens
function takeToken(cm, pos, precise, asArray) { var doc = cm.doc, mode = doc.mode, style; pos = clipPos(doc, pos); var line = getLine(doc, pos.line), context = getContextBefore(cm, pos.line, precise); var stream = new StringStream(line.text, cm.options.tabSize, context), tokens; if (asArray) { tokens = []; } while ((asArray || stream.pos < pos.ch) && !stream.eol()) { stream.start = stream.pos; style = readToken(mode, stream, context.state); if (asArray) { tokens.push(new Token(stream, style, copyState(doc.mode, context.state))); } } return asArray ? tokens : new Token(stream, style, context.state) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function takeToken(cm, pos, precise, asArray) {\n\t\t var doc = cm.doc, mode = doc.mode, style;\n\t\t pos = clipPos(doc, pos);\n\t\t var line = getLine(doc, pos.line), context = getContextBefore(cm, pos.line, precise);\n\t\t var stream = new StringStream(line.text, cm.options.tabSize, context), tokens;\n\t\t if (asArray) { tokens = []; }\n\t\t while ((asArray || stream.pos < pos.ch) && !stream.eol()) {\n\t\t stream.start = stream.pos;\n\t\t style = readToken(mode, stream, context.state);\n\t\t if (asArray) { tokens.push(new Token(stream, style, copyState(doc.mode, context.state))); }\n\t\t }\n\t\t return asArray ? tokens : new Token(stream, style, context.state)\n\t\t }", "function takeToken(cm, pos, precise, asArray) {\n\t\t function getObj(copy) {\n\t\t return {start: stream.start, end: stream.pos,\n\t\t string: stream.current(),\n\t\t type: style || null,\n\t\t state: copy ? copyState(doc.mode, state) : state};\n\t\t }\n\t\t\n\t\t var doc = cm.doc, mode = doc.mode, style;\n\t\t pos = clipPos(doc, pos);\n\t\t var line = getLine(doc, pos.line), state = getStateBefore(cm, pos.line, precise);\n\t\t var stream = new StringStream(line.text, cm.options.tabSize), tokens;\n\t\t if (asArray) tokens = [];\n\t\t while ((asArray || stream.pos < pos.ch) && !stream.eol()) {\n\t\t stream.start = stream.pos;\n\t\t style = readToken(mode, stream, state);\n\t\t if (asArray) tokens.push(getObj(true));\n\t\t }\n\t\t return asArray ? tokens : getObj();\n\t\t }", "function takeToken(cm, pos, precise, asArray) {\r\n var doc = cm.doc, mode = doc.mode, style;\r\n pos = clipPos(doc, pos);\r\n var line = getLine(doc, pos.line), context = getContextBefore(cm, pos.line, precise);\r\n var stream = new StringStream(line.text, cm.options.tabSize, context), tokens;\r\n if (asArray) { tokens = []; }\r\n while ((asArray || stream.pos < pos.ch) && !stream.eol()) {\r\n stream.start = stream.pos;\r\n style = readToken(mode, stream, context.state);\r\n if (asArray) { tokens.push(new Token(stream, style, copyState(doc.mode, context.state))); }\r\n }\r\n return asArray ? tokens : new Token(stream, style, context.state)\r\n}", "function takeToken(cm, pos, precise, asArray) {\n var doc = cm.doc, mode = doc.mode, style;\n pos = clipPos(doc, pos);\n var line = getLine(doc, pos.line), context = getContextBefore(cm, pos.line, precise);\n var stream = new StringStream(line.text, cm.options.tabSize, context), tokens;\n if (asArray) { tokens = []; }\n while ((asArray || stream.pos < pos.ch) && !stream.eol()) {\n stream.start = stream.pos;\n style = readToken(mode, stream, context.state);\n if (asArray) { tokens.push(new Token(stream, style, copyState(doc.mode, context.state))); }\n }\n return asArray ? tokens : new Token(stream, style, context.state)\n}", "function takeToken(cm, pos, precise, asArray) {\n var doc = cm.doc, mode = doc.mode, style;\n pos = clipPos(doc, pos);\n var line = getLine(doc, pos.line), context = getContextBefore(cm, pos.line, precise);\n var stream = new StringStream(line.text, cm.options.tabSize, context), tokens;\n if (asArray) { tokens = []; }\n while ((asArray || stream.pos < pos.ch) && !stream.eol()) {\n stream.start = stream.pos;\n style = readToken(mode, stream, context.state);\n if (asArray) { tokens.push(new Token(stream, style, copyState(doc.mode, context.state))); }\n }\n return asArray ? tokens : new Token(stream, style, context.state)\n}", "function takeToken(cm, pos, precise, asArray) {\n var doc = cm.doc, mode = doc.mode, style;\n pos = clipPos(doc, pos);\n var line = getLine(doc, pos.line), context = getContextBefore(cm, pos.line, precise);\n var stream = new StringStream(line.text, cm.options.tabSize, context), tokens;\n if (asArray) { tokens = []; }\n while ((asArray || stream.pos < pos.ch) && !stream.eol()) {\n stream.start = stream.pos;\n style = readToken(mode, stream, context.state);\n if (asArray) { tokens.push(new Token(stream, style, copyState(doc.mode, context.state))); }\n }\n return asArray ? tokens : new Token(stream, style, context.state)\n}", "function takeToken(cm, pos, precise, asArray) {\n var doc = cm.doc, mode = doc.mode, style;\n pos = clipPos(doc, pos);\n var line = getLine(doc, pos.line), context = getContextBefore(cm, pos.line, precise);\n var stream = new StringStream(line.text, cm.options.tabSize, context), tokens;\n if (asArray) { tokens = []; }\n while ((asArray || stream.pos < pos.ch) && !stream.eol()) {\n stream.start = stream.pos;\n style = readToken(mode, stream, context.state);\n if (asArray) { tokens.push(new Token(stream, style, copyState(doc.mode, context.state))); }\n }\n return asArray ? tokens : new Token(stream, style, context.state)\n}", "function takeToken(cm, pos, precise, asArray) {\n var doc = cm.doc, mode = doc.mode, style;\n pos = clipPos(doc, pos);\n var line = getLine(doc, pos.line), context = getContextBefore(cm, pos.line, precise);\n var stream = new StringStream(line.text, cm.options.tabSize, context), tokens;\n if (asArray) { tokens = []; }\n while ((asArray || stream.pos < pos.ch) && !stream.eol()) {\n stream.start = stream.pos;\n style = readToken(mode, stream, context.state);\n if (asArray) { tokens.push(new Token(stream, style, copyState(doc.mode, context.state))); }\n }\n return asArray ? tokens : new Token(stream, style, context.state)\n}", "function takeToken(cm, pos, precise, asArray) {\n var doc = cm.doc, mode = doc.mode, style;\n pos = clipPos(doc, pos);\n var line = getLine(doc, pos.line), context = getContextBefore(cm, pos.line, precise);\n var stream = new StringStream(line.text, cm.options.tabSize, context), tokens;\n if (asArray) { tokens = []; }\n while ((asArray || stream.pos < pos.ch) && !stream.eol()) {\n stream.start = stream.pos;\n style = readToken(mode, stream, context.state);\n if (asArray) { tokens.push(new Token(stream, style, copyState(doc.mode, context.state))); }\n }\n return asArray ? tokens : new Token(stream, style, context.state)\n}", "function takeToken(cm, pos, precise, asArray) {\n var doc = cm.doc, mode = doc.mode, style;\n pos = clipPos(doc, pos);\n var line = getLine(doc, pos.line), context = getContextBefore(cm, pos.line, precise);\n var stream = new StringStream(line.text, cm.options.tabSize, context), tokens;\n if (asArray) { tokens = []; }\n while ((asArray || stream.pos < pos.ch) && !stream.eol()) {\n stream.start = stream.pos;\n style = readToken(mode, stream, context.state);\n if (asArray) { tokens.push(new Token(stream, style, copyState(doc.mode, context.state))); }\n }\n return asArray ? tokens : new Token(stream, style, context.state)\n}", "function takeToken(cm, pos, precise, asArray) {\n var doc = cm.doc, mode = doc.mode, style;\n pos = clipPos(doc, pos);\n var line = getLine(doc, pos.line), context = getContextBefore(cm, pos.line, precise);\n var stream = new StringStream(line.text, cm.options.tabSize, context), tokens;\n if (asArray) { tokens = []; }\n while ((asArray || stream.pos < pos.ch) && !stream.eol()) {\n stream.start = stream.pos;\n style = readToken(mode, stream, context.state);\n if (asArray) { tokens.push(new Token(stream, style, copyState(doc.mode, context.state))); }\n }\n return asArray ? tokens : new Token(stream, style, context.state)\n}", "function takeToken(cm, pos, precise, asArray) {\n var doc = cm.doc, mode = doc.mode, style;\n pos = clipPos(doc, pos);\n var line = getLine(doc, pos.line), context = getContextBefore(cm, pos.line, precise);\n var stream = new StringStream(line.text, cm.options.tabSize, context), tokens;\n if (asArray) { tokens = []; }\n while ((asArray || stream.pos < pos.ch) && !stream.eol()) {\n stream.start = stream.pos;\n style = readToken(mode, stream, context.state);\n if (asArray) { tokens.push(new Token(stream, style, copyState(doc.mode, context.state))); }\n }\n return asArray ? tokens : new Token(stream, style, context.state)\n}", "function takeToken(cm, pos, precise, asArray) {\n var doc = cm.doc, mode = doc.mode, style;\n pos = clipPos(doc, pos);\n var line = getLine(doc, pos.line), context = getContextBefore(cm, pos.line, precise);\n var stream = new StringStream(line.text, cm.options.tabSize, context), tokens;\n if (asArray) { tokens = []; }\n while ((asArray || stream.pos < pos.ch) && !stream.eol()) {\n stream.start = stream.pos;\n style = readToken(mode, stream, context.state);\n if (asArray) { tokens.push(new Token(stream, style, copyState(doc.mode, context.state))); }\n }\n return asArray ? tokens : new Token(stream, style, context.state)\n}", "function takeToken(cm, pos, precise, asArray) {\n var doc = cm.doc, mode = doc.mode, style;\n pos = clipPos(doc, pos);\n var line = getLine(doc, pos.line), context = getContextBefore(cm, pos.line, precise);\n var stream = new StringStream(line.text, cm.options.tabSize, context), tokens;\n if (asArray) { tokens = []; }\n while ((asArray || stream.pos < pos.ch) && !stream.eol()) {\n stream.start = stream.pos;\n style = readToken(mode, stream, context.state);\n if (asArray) { tokens.push(new Token(stream, style, copyState(doc.mode, context.state))); }\n }\n return asArray ? tokens : new Token(stream, style, context.state)\n}", "function takeToken(cm, pos, precise, asArray) {\n function getObj(copy) {\n return {start: stream.start, end: stream.pos,\n string: stream.current(),\n type: style || null,\n state: copy ? copyState(doc.mode, state) : state};\n }\n\n var doc = cm.doc, mode = doc.mode, style;\n pos = clipPos(doc, pos);\n var line = getLine(doc, pos.line), state = getStateBefore(cm, pos.line, precise);\n var stream = new StringStream(line.text, cm.options.tabSize), tokens;\n if (asArray) tokens = [];\n while ((asArray || stream.pos < pos.ch) && !stream.eol()) {\n stream.start = stream.pos;\n style = readToken(mode, stream, state);\n if (asArray) tokens.push(getObj(true));\n }\n return asArray ? tokens : getObj();\n }", "function takeToken(cm, pos, precise, asArray) {\n function getObj(copy) {\n return {start: stream.start, end: stream.pos,\n string: stream.current(),\n type: style || null,\n state: copy ? copyState(doc.mode, state) : state};\n }\n\n var doc = cm.doc, mode = doc.mode, style;\n pos = clipPos(doc, pos);\n var line = getLine(doc, pos.line), state = getStateBefore(cm, pos.line, precise);\n var stream = new StringStream(line.text, cm.options.tabSize), tokens;\n if (asArray) tokens = [];\n while ((asArray || stream.pos < pos.ch) && !stream.eol()) {\n stream.start = stream.pos;\n style = readToken(mode, stream, state);\n if (asArray) tokens.push(getObj(true));\n }\n return asArray ? tokens : getObj();\n }", "function takeToken(cm, pos, precise, asArray) {\n function getObj(copy) {\n return {start: stream.start, end: stream.pos,\n string: stream.current(),\n type: style || null,\n state: copy ? copyState(doc.mode, state) : state};\n }\n\n var doc = cm.doc, mode = doc.mode, style;\n pos = clipPos(doc, pos);\n var line = getLine(doc, pos.line), state = getStateBefore(cm, pos.line, precise);\n var stream = new StringStream(line.text, cm.options.tabSize), tokens;\n if (asArray) tokens = [];\n while ((asArray || stream.pos < pos.ch) && !stream.eol()) {\n stream.start = stream.pos;\n style = readToken(mode, stream, state);\n if (asArray) tokens.push(getObj(true));\n }\n return asArray ? tokens : getObj();\n }", "function takeToken(cm, pos, precise, asArray) {\n function getObj(copy) {\n return {start: stream.start, end: stream.pos,\n string: stream.current(),\n type: style || null,\n state: copy ? copyState(doc.mode, state) : state};\n }\n\n var doc = cm.doc, mode = doc.mode, style;\n pos = clipPos(doc, pos);\n var line = getLine(doc, pos.line), state = getStateBefore(cm, pos.line, precise);\n var stream = new StringStream(line.text, cm.options.tabSize), tokens;\n if (asArray) tokens = [];\n while ((asArray || stream.pos < pos.ch) && !stream.eol()) {\n stream.start = stream.pos;\n style = readToken(mode, stream, state);\n if (asArray) tokens.push(getObj(true));\n }\n return asArray ? tokens : getObj();\n }", "function takeToken(cm, pos, precise, asArray) {\n function getObj(copy) {\n return {start: stream.start, end: stream.pos,\n string: stream.current(),\n type: style || null,\n state: copy ? copyState(doc.mode, state) : state};\n }\n\n var doc = cm.doc, mode = doc.mode, style;\n pos = clipPos(doc, pos);\n var line = getLine(doc, pos.line), state = getStateBefore(cm, pos.line, precise);\n var stream = new StringStream(line.text, cm.options.tabSize), tokens;\n if (asArray) tokens = [];\n while ((asArray || stream.pos < pos.ch) && !stream.eol()) {\n stream.start = stream.pos;\n style = readToken(mode, stream, state);\n if (asArray) tokens.push(getObj(true));\n }\n return asArray ? tokens : getObj();\n }", "function takeToken(cm, pos, precise, asArray) {\n\t function getObj(copy) {\n\t return {start: stream.start, end: stream.pos,\n\t string: stream.current(),\n\t type: style || null,\n\t state: copy ? copyState(doc.mode, state) : state};\n\t }\n\t\n\t var doc = cm.doc, mode = doc.mode, style;\n\t pos = clipPos(doc, pos);\n\t var line = getLine(doc, pos.line), state = getStateBefore(cm, pos.line, precise);\n\t var stream = new StringStream(line.text, cm.options.tabSize), tokens;\n\t if (asArray) tokens = [];\n\t while ((asArray || stream.pos < pos.ch) && !stream.eol()) {\n\t stream.start = stream.pos;\n\t style = readToken(mode, stream, state);\n\t if (asArray) tokens.push(getObj(true));\n\t }\n\t return asArray ? tokens : getObj();\n\t }", "function takeToken(cm, pos, precise, asArray) {\n\t function getObj(copy) {\n\t return {start: stream.start, end: stream.pos,\n\t string: stream.current(),\n\t type: style || null,\n\t state: copy ? copyState(doc.mode, state) : state};\n\t }\n\n\t var doc = cm.doc, mode = doc.mode, style;\n\t pos = clipPos(doc, pos);\n\t var line = getLine(doc, pos.line), state = getStateBefore(cm, pos.line, precise);\n\t var stream = new StringStream(line.text, cm.options.tabSize), tokens;\n\t if (asArray) tokens = [];\n\t while ((asArray || stream.pos < pos.ch) && !stream.eol()) {\n\t stream.start = stream.pos;\n\t style = readToken(mode, stream, state);\n\t if (asArray) tokens.push(getObj(true));\n\t }\n\t return asArray ? tokens : getObj();\n\t }", "function takeToken(cm, pos, precise, asArray) {\n\t function getObj(copy) {\n\t return {start: stream.start, end: stream.pos,\n\t string: stream.current(),\n\t type: style || null,\n\t state: copy ? copyState(doc.mode, state) : state};\n\t }\n\n\t var doc = cm.doc, mode = doc.mode, style;\n\t pos = clipPos(doc, pos);\n\t var line = getLine(doc, pos.line), state = getStateBefore(cm, pos.line, precise);\n\t var stream = new StringStream(line.text, cm.options.tabSize), tokens;\n\t if (asArray) tokens = [];\n\t while ((asArray || stream.pos < pos.ch) && !stream.eol()) {\n\t stream.start = stream.pos;\n\t style = readToken(mode, stream, state);\n\t if (asArray) tokens.push(getObj(true));\n\t }\n\t return asArray ? tokens : getObj();\n\t }", "function takeToken(cm, pos, precise, asArray) {\n var getObj = function (copy) { return ({\n start: stream.start, end: stream.pos,\n string: stream.current(),\n type: style || null,\n state: copy ? copyState(doc.mode, state) : state\n }); }\n\n var doc = cm.doc, mode = doc.mode, style\n pos = clipPos(doc, pos)\n var line = getLine(doc, pos.line), state = getStateBefore(cm, pos.line, precise)\n var stream = new StringStream(line.text, cm.options.tabSize), tokens\n if (asArray) { tokens = [] }\n while ((asArray || stream.pos < pos.ch) && !stream.eol()) {\n stream.start = stream.pos\n style = readToken(mode, stream, state)\n if (asArray) { tokens.push(getObj(true)) }\n }\n return asArray ? tokens : getObj()\n}", "function takeToken(cm, pos, precise, asArray) {\n var getObj = function (copy) { return ({\n start: stream.start, end: stream.pos,\n string: stream.current(),\n type: style || null,\n state: copy ? copyState(doc.mode, state) : state\n }); }\n\n var doc = cm.doc, mode = doc.mode, style\n pos = clipPos(doc, pos)\n var line = getLine(doc, pos.line), state = getStateBefore(cm, pos.line, precise)\n var stream = new StringStream(line.text, cm.options.tabSize), tokens\n if (asArray) { tokens = [] }\n while ((asArray || stream.pos < pos.ch) && !stream.eol()) {\n stream.start = stream.pos\n style = readToken(mode, stream, state)\n if (asArray) { tokens.push(getObj(true)) }\n }\n return asArray ? tokens : getObj()\n}", "function takeToken(cm, pos, precise, asArray) {\n var doc = cm.doc,\n mode = doc.mode,\n style;\n pos = _clipPos(doc, pos);\n var line = getLine(doc, pos.line),\n context = getContextBefore(cm, pos.line, precise);\n var stream = new StringStream(line.text, cm.options.tabSize, context),\n tokens;\n\n if (asArray) {\n tokens = [];\n }\n\n while ((asArray || stream.pos < pos.ch) && !stream.eol()) {\n stream.start = stream.pos;\n style = readToken(mode, stream, context.state);\n\n if (asArray) {\n tokens.push(new Token(stream, style, copyState(doc.mode, context.state)));\n }\n }\n\n return asArray ? tokens : new Token(stream, style, context.state);\n }", "getTokenFromCode(code) {\n switch (code) {\n // newlines are significant!\n case 13:\n if (this.input.charCodeAt(this.state.pos + 1) === 10) {\n ++this.state.pos;\n }\n case 10: case 8232: case 8233:\n ++this.state.pos;\n ++this.state.curLine;\n this.state.lineStart = this.state.pos;\n return this.finishToken(tt.newline);\n\n // The interpretation of a dot depends on whether it is followed\n // by a digit or another two dots.\n case 46: // '.'\n // TODO: use \"readNumberStartingWithDot\" (that just calls readNumber, but it's for readability :))\n return this.readToken_dot();\n\n // Punctuation tokens.\n case 40: ++this.state.pos; return this.finishToken(tt.parenL); // '('\n case 41: ++this.state.pos; return this.finishToken(tt.parenR); // ')'\n case 44: ++this.state.pos; return this.finishToken(tt.comma); // ','\n case 91: ++this.state.pos; return this.finishToken(tt.bracketL); // '['\n case 93: ++this.state.pos; return this.finishToken(tt.bracketR); // ']'\n case 123: ++this.state.pos; return this.finishToken(tt.braceL); // '{'\n case 125: ++this.state.pos; return this.finishToken(tt.braceR); // '}'\n\n case 59: return this.readToken_semi(); // ';'\n case 33: return this.readToken_excl(); // '!'\n\n case 58:\n if (this.input.charCodeAt(this.state.pos + 1) === 58) {\n this.state.pos += 2;\n return this.finishToken(tt.doubleColon, '::');\n } else {\n ++this.state.pos;\n return this.finishToken(tt.colon);\n }\n\n case 63: ++this.state.pos; return this.finishToken(tt.question);\n // TODO: figure out alternate syntax for 'this' shorthand. Probably `@.`, but no standalone\n case 64: ++this.state.pos; return this.finishToken(tt.at);\n\n case 96: // '`'\n ++this.state.pos;\n return this.finishToken(tt.backQuote);\n\n case 48: // '0'\n let next = this.input.charCodeAt(this.state.pos + 1);\n if (next === 120 || next === 88) return this.readRadixNumber(16); // '0x', '0X' - hex number\n if (next === 111 || next === 79) return this.readRadixNumber(8); // '0o', '0O' - octal number\n if (next === 98 || next === 66) return this.readRadixNumber(2); // '0b', '0B' - binary number\n // Anything else beginning with a digit is an integer, octal\n // number, or float.\n case 49: case 50: case 51: case 52: case 53: case 54: case 55: case 56: case 57: // 1-9\n return this.readNumber();\n\n // Quotes produce strings.\n case 34: case 39: // '\"', \"'\"\n return this.readString(code);\n\n // Operators are parsed inline in tiny state machines. '=' (61) is\n // often referred to. `finishOp` simply skips the amount of\n // characters it is given as second argument, and returns a token\n // of the type given by its first argument.\n\n case 47: // '/'\n return this.readToken_slash();\n\n case 37: return this.finishEqOrType(tt.modulo); // '%'\n case 124: return this.finishEqOrType(tt.bitwiseOR); // '|'\n case 38: return this.finishEqOrType(tt.bitwiseAND); // '&'\n case 94: return this.finishEqOrType(tt.bitwiseXOR); // '^'\n\n case 42: return this.readToken_star(); //'*'\n\n case 43: case 45: // '+-'\n return this.readToken_plus_min(code);\n\n case 60: case 62: // '<>'\n return this.readToken_lt_gt(code);\n\n case 61: // '='\n return this.readToken_eq();\n\n case 126: // '~'\n ++this.state.pos;\n return this.finishToken(tt.bitwiseNOT);\n }\n this.raise(this.state.pos, `Unexpected character '${codePointToString(code)}' (${code})`);\n }", "function getTokenFromBuffer(offset) {\n\t\t\tvar toRead = offset - tokenBuffer.length + 1;\n\t\t\twhile (toRead-- > 0) readTokenToBuffer();\n\t\t\treturn tokenBuffer[offset];\n\t\t}", "function getTokens(board, line) {\n return [board[line[0]], board[line[1]], board[line[2]]];\n}", "readToken() {\n for (let i = 0; i < TOKENS.length; i++) {\n const token = TOKENS[i];\n if (token === this.line.substr(this.pos, token.length).toUpperCase()) {\n return FIRST_TOKEN + i;\n }\n }\n return undefined;\n }", "function getTokenAtPosition(sourceFile, position, includeJsDocComment) {\n if (includeJsDocComment === void 0) { includeJsDocComment = false; }\n return getTokenAtPositionWorker(sourceFile, position, /*allowPositionInLeadingTrivia*/ true, /*includeItemAtEndPosition*/ undefined, includeJsDocComment);\n }", "function getToken(c) {\n return c >= FIRST_TOKEN && c < FIRST_TOKEN + TOKENS.length ? TOKENS[c - FIRST_TOKEN] : undefined;\n}", "function NextTokenInfo()\n {\n if (tokenIndex >= tokens.length) {\n console.log(\"sheets.js: NextTokenInfo: Ran out of tokens!\");\n return ['.', -1, -1];\n }\n var tokenInfo = tokens[tokenIndex++];\n return tokenInfo;\n }", "function currentTokenRange() {\n var pos = m_lexed.indices[m_position]\n var nextPos = m_lexed.indices[m_position + 1]\n return [pos, nextPos - pos - 1]\n }", "token(input, start, value) { return new Token(input,start,input.pos,this.type,value) }", "lineToken({chunk = this.chunk, offset = 0} = {}) {\r\n\t\t\t\tvar backslash, diff, endsContinuationLineIndentation, indent, match, minLiteralLength, newIndentLiteral, noNewlines, prev, ref, size;\r\n\t\t\t\tif (!(match = MULTI_DENT.exec(chunk))) {\r\n\t\t\t\t\treturn 0;\r\n\t\t\t\t}\r\n\t\t\t\tindent = match[0];\r\n\t\t\t\tprev = this.prev();\r\n\t\t\t\tbackslash = (prev != null ? prev[0] : void 0) === '\\\\';\r\n\t\t\t\tif (!((backslash || ((ref = this.seenFor) != null ? ref.endsLength : void 0) < this.ends.length) && this.seenFor)) {\r\n\t\t\t\t\tthis.seenFor = false;\r\n\t\t\t\t}\r\n\t\t\t\tif (!((backslash && this.seenImport) || this.importSpecifierList)) {\r\n\t\t\t\t\tthis.seenImport = false;\r\n\t\t\t\t}\r\n\t\t\t\tif (!((backslash && this.seenExport) || this.exportSpecifierList)) {\r\n\t\t\t\t\tthis.seenExport = false;\r\n\t\t\t\t}\r\n\t\t\t\tsize = indent.length - 1 - indent.lastIndexOf('\\n');\r\n\t\t\t\tnoNewlines = this.unfinished();\r\n\t\t\t\tnewIndentLiteral = size > 0 ? indent.slice(-size) : '';\r\n\t\t\t\tif (!/^(.?)\\1*$/.exec(newIndentLiteral)) {\r\n\t\t\t\t\tthis.error('mixed indentation', {\r\n\t\t\t\t\t\toffset: indent.length\r\n\t\t\t\t\t});\r\n\t\t\t\t\treturn indent.length;\r\n\t\t\t\t}\r\n\t\t\t\tminLiteralLength = Math.min(newIndentLiteral.length, this.indentLiteral.length);\r\n\t\t\t\tif (newIndentLiteral.slice(0, minLiteralLength) !== this.indentLiteral.slice(0, minLiteralLength)) {\r\n\t\t\t\t\tthis.error('indentation mismatch', {\r\n\t\t\t\t\t\toffset: indent.length\r\n\t\t\t\t\t});\r\n\t\t\t\t\treturn indent.length;\r\n\t\t\t\t}\r\n\t\t\t\tif (size - this.continuationLineAdditionalIndent === this.indent) {\r\n\t\t\t\t\tif (noNewlines) {\r\n\t\t\t\t\t\tthis.suppressNewlines();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.newlineToken(offset);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn indent.length;\r\n\t\t\t\t}\r\n\t\t\t\tif (size > this.indent) {\r\n\t\t\t\t\tif (noNewlines) {\r\n\t\t\t\t\t\tif (!backslash) {\r\n\t\t\t\t\t\t\tthis.continuationLineAdditionalIndent = size - this.indent;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (this.continuationLineAdditionalIndent) {\r\n\t\t\t\t\t\t\tprev.continuationLineIndent = this.indent + this.continuationLineAdditionalIndent;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tthis.suppressNewlines();\r\n\t\t\t\t\t\treturn indent.length;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!this.tokens.length) {\r\n\t\t\t\t\t\tthis.baseIndent = this.indent = size;\r\n\t\t\t\t\t\tthis.indentLiteral = newIndentLiteral;\r\n\t\t\t\t\t\treturn indent.length;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdiff = size - this.indent + this.outdebt;\r\n\t\t\t\t\tthis.token('INDENT', diff, {\r\n\t\t\t\t\t\toffset: offset + indent.length - size,\r\n\t\t\t\t\t\tlength: size\r\n\t\t\t\t\t});\r\n\t\t\t\t\tthis.indents.push(diff);\r\n\t\t\t\t\tthis.ends.push({\r\n\t\t\t\t\t\ttag: 'OUTDENT'\r\n\t\t\t\t\t});\r\n\t\t\t\t\tthis.outdebt = this.continuationLineAdditionalIndent = 0;\r\n\t\t\t\t\tthis.indent = size;\r\n\t\t\t\t\tthis.indentLiteral = newIndentLiteral;\r\n\t\t\t\t} else if (size < this.baseIndent) {\r\n\t\t\t\t\tthis.error('missing indentation', {\r\n\t\t\t\t\t\toffset: offset + indent.length\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\tendsContinuationLineIndentation = this.continuationLineAdditionalIndent > 0;\r\n\t\t\t\t\tthis.continuationLineAdditionalIndent = 0;\r\n\t\t\t\t\tthis.outdentToken({\r\n\t\t\t\t\t\tmoveOut: this.indent - size,\r\n\t\t\t\t\t\tnoNewlines,\r\n\t\t\t\t\t\toutdentLength: indent.length,\r\n\t\t\t\t\t\toffset,\r\n\t\t\t\t\t\tindentSize: size,\r\n\t\t\t\t\t\tendsContinuationLineIndentation\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\treturn indent.length;\r\n\t\t\t}", "tokenizer(token , isEndOfInput , previousTokens , terminal , config){\n }", "_getYamlToken (cm, cur) {\n let token\n const { lineTokens, lineString } = this._getTokenLine(cm, cur)\n forEach(lineTokens, lineToken => {\n const result = lineToken.string.match(/^(\\s*)-\\s(.*)?$/)\n if (result) {\n const indent = result[1]\n token = lineToken\n token.type = 'firstArrayItem'\n token.string = this._getTokenStringFromLine(lineString, cur.ch)\n token.indent = token.start = indent.length\n token.end = token.start + token.string.length + this.arrayBulletIndent\n token.propertyName = trim(token.string)\n\n const objectToken = this._returnObjectTokenFromTokenLine(lineTokens)\n if (objectToken) {\n // firstArrayItem line can also start new object\n token.propertyName = objectToken.propertyName\n }\n }\n })\n if (!token) {\n token = this._returnObjectTokenFromTokenLine(lineTokens)\n }\n if (!token) {\n token = cm.getTokenAt(cur, true)\n token.string = this._getTokenStringFromLine(lineString, cur.ch)\n token.start = token.end - token.string.length\n }\n return token\n }", "function Tokens(code) {\n\n this.tokens = tokenize(code);\n\n // Remmeber all of the tokens eaten so we can provide useful error message context.\n this.eaten = [];\n\n this.eat = function (expected) {\n //console.log(expected);\n\n if (expected && !this.nextIs(expected)) {\n console.log(\"expected\", expected);\n throw new Error(\"Line \" + this.currentLine() + \": expected '\" + expected + \"', but found '\" + this.tokens.slice(0, 5).join(\" \") + \"'\");\n }\n\n var eaten = this.tokens.shift();\n\n this.eaten.push(eaten);\n\n return eaten;\n };\n\n this.uneat = function () {\n\n this.tokens.unshift(this.eaten.pop());\n };\n\n this.eatN = function (n) {\n\n for (var i = 0; i < n; i++) this.eat();\n };\n\n this.count = function (text) {\n\n var index = 0;\n while (index < this.tokens.length && this.tokens[index] === text) index++;\n return index;\n };\n\n this.hasNext = function () {\n return this.tokens.length > 0;\n };\n this.nextIs = function (string) {\n return this.hasNext() && this.peek() === string;\n };\n this.peek = function () {\n return this.hasNext() ? this.tokens[0].toLowerCase() : null;\n };\n\n this.currentLine = function () {\n\n var line = 1;\n for (var i = 0; i < this.eaten.length; ++i) {\n if (this.eaten[i] === \"\\n\") line++;\n }\n return line;\n };\n}", "function getToken() {\n tokenType = TOKENTYPE.NULL;\n token = '';\n\n // skip over whitespaces\n while (c == ' ' || c == '\\t' || c == '\\n' || c == '\\r') { // space, tab, enter\n next();\n }\n\n do {\n var isComment = false;\n\n // skip comment\n if (c == '#') {\n // find the previous non-space character\n var i = index - 1;\n while (dot.charAt(i) == ' ' || dot.charAt(i) == '\\t') {\n i--;\n }\n if (dot.charAt(i) == '\\n' || dot.charAt(i) == '') {\n // the # is at the start of a line, this is indeed a line comment\n while (c != '' && c != '\\n') {\n next();\n }\n isComment = true;\n }\n }\n if (c == '/' && nextPreview() == '/') {\n // skip line comment\n while (c != '' && c != '\\n') {\n next();\n }\n isComment = true;\n }\n if (c == '/' && nextPreview() == '*') {\n // skip block comment\n while (c != '') {\n if (c == '*' && nextPreview() == '/') {\n // end of block comment found. skip these last two characters\n next();\n next();\n break;\n }\n else {\n next();\n }\n }\n isComment = true;\n }\n\n // skip over whitespaces\n while (c == ' ' || c == '\\t' || c == '\\n' || c == '\\r') { // space, tab, enter\n next();\n }\n }\n while (isComment);\n\n // check for end of dot file\n if (c == '') {\n // token is still empty\n tokenType = TOKENTYPE.DELIMITER;\n return;\n }\n\n // check for delimiters consisting of 2 characters\n var c2 = c + nextPreview();\n if (DELIMITERS[c2]) {\n tokenType = TOKENTYPE.DELIMITER;\n token = c2;\n next();\n next();\n return;\n }\n\n // check for delimiters consisting of 1 character\n if (DELIMITERS[c]) {\n tokenType = TOKENTYPE.DELIMITER;\n token = c;\n next();\n return;\n }\n\n // check for an identifier (number or string)\n // TODO: more precise parsing of numbers/strings (and the port separator ':')\n if (isAlphaNumeric(c) || c == '-') {\n token += c;\n next();\n\n while (isAlphaNumeric(c)) {\n token += c;\n next();\n }\n if (token == 'false') {\n token = false; // convert to boolean\n }\n else if (token == 'true') {\n token = true; // convert to boolean\n }\n else if (!isNaN(Number(token))) {\n token = Number(token); // convert to number\n }\n tokenType = TOKENTYPE.IDENTIFIER;\n return;\n }\n\n // check for a string enclosed by double quotes\n if (c == '\"') {\n next();\n while (c != '' && (c != '\"' || (c == '\"' && nextPreview() == '\"'))) {\n token += c;\n if (c == '\"') { // skip the escape character\n next();\n }\n next();\n }\n if (c != '\"') {\n throw newSyntaxError('End of string \" expected');\n }\n next();\n tokenType = TOKENTYPE.IDENTIFIER;\n return;\n }\n\n // something unknown is found, wrong characters, a syntax error\n tokenType = TOKENTYPE.UNKNOWN;\n while (c != '') {\n token += c;\n next();\n }\n throw new SyntaxError('Syntax error in part \"' + chop(token, 30) + '\"');\n }", "function startLine(token) {\n return token.startLine || token.line;\n }", "function getToken() {\n tokenType = TOKENTYPE.NULL;\n token = '';\n\n // skip over whitespaces\n while (c === ' ' || c === '\\t' || c === '\\n' || c === '\\r') {\n // space, tab, enter\n next();\n }\n\n do {\n var isComment = false;\n\n // skip comment\n if (c === '#') {\n // find the previous non-space character\n var i = index - 1;\n while (dot.charAt(i) === ' ' || dot.charAt(i) === '\\t') {\n i--;\n }\n if (dot.charAt(i) === '\\n' || dot.charAt(i) === '') {\n // the # is at the start of a line, this is indeed a line comment\n while (c != '' && c != '\\n') {\n next();\n }\n isComment = true;\n }\n }\n if (c === '/' && nextPreview() === '/') {\n // skip line comment\n while (c != '' && c != '\\n') {\n next();\n }\n isComment = true;\n }\n if (c === '/' && nextPreview() === '*') {\n // skip block comment\n while (c != '') {\n if (c === '*' && nextPreview() === '/') {\n // end of block comment found. skip these last two characters\n next();\n next();\n break;\n } else {\n next();\n }\n }\n isComment = true;\n }\n\n // skip over whitespaces\n while (c === ' ' || c === '\\t' || c === '\\n' || c === '\\r') {\n // space, tab, enter\n next();\n }\n } while (isComment);\n\n // check for end of dot file\n if (c === '') {\n // token is still empty\n tokenType = TOKENTYPE.DELIMITER;\n return;\n }\n\n // check for delimiters consisting of 2 characters\n var c2 = c + nextPreview();\n if (DELIMITERS[c2]) {\n tokenType = TOKENTYPE.DELIMITER;\n token = c2;\n next();\n next();\n return;\n }\n\n // check for delimiters consisting of 1 character\n if (DELIMITERS[c]) {\n tokenType = TOKENTYPE.DELIMITER;\n token = c;\n next();\n return;\n }\n\n // check for an identifier (number or string)\n // TODO: more precise parsing of numbers/strings (and the port separator ':')\n if (isAlphaNumeric(c) || c === '-') {\n token += c;\n next();\n\n while (isAlphaNumeric(c)) {\n token += c;\n next();\n }\n if (token === 'false') {\n token = false; // convert to boolean\n } else if (token === 'true') {\n token = true; // convert to boolean\n } else if (!isNaN(Number(token))) {\n token = Number(token); // convert to number\n }\n tokenType = TOKENTYPE.IDENTIFIER;\n return;\n }\n\n // check for a string enclosed by double quotes\n if (c === '\"') {\n next();\n while (c != '' && (c != '\"' || c === '\"' && nextPreview() === '\"')) {\n if (c === '\"') {\n // skip the escape character\n token += c;\n next();\n } else if (c === '\\\\' && nextPreview() === 'n') {\n // Honor a newline escape sequence\n token += '\\n';\n next();\n } else {\n token += c;\n }\n next();\n }\n if (c != '\"') {\n throw newSyntaxError('End of string \" expected');\n }\n next();\n tokenType = TOKENTYPE.IDENTIFIER;\n return;\n }\n\n // something unknown is found, wrong characters, a syntax error\n tokenType = TOKENTYPE.UNKNOWN;\n while (c != '') {\n token += c;\n next();\n }\n throw new SyntaxError('Syntax error in part \"' + chop(token, 30) + '\"');\n}", "function getToken(line) {\n line = line.replace(CommentsRegex, '') //remove the comments parts\n line = line.replace(/^\\s+|\\s+$/, '') // strip the spaces\n let match\n if (match = MemoryRegex.exec(line)) {\n return {\n type: 'memory',\n command: match[0],\n operator: match[1],\n segment: match[2],\n index: match[3]\n }\n } else if (match = ALRegex.exec(line)) {\n return {\n type: 'al',\n command: match[0],\n operator: match[1]\n }\n } else if (match = FunctionRegex.exec(line)) {\n return {\n type: 'function',\n command: match[0],\n action: match[1],\n functionName: match[2],\n count: match[3]\n }\n } else if (match = FlowRegex.exec(line)) {\n return {\n type: 'flow',\n command: match[0],\n operator: match[1],\n label: match[2]\n }\n } else if (/^\\s*$/.exec(line)) { // an empty line\n return null\n } else {\n throw SyntaxError('Unrecognizable Commmand.')\n }\n}", "function getToken() {\n tokenType = TOKENTYPE.NULL;\n token = '';\n\n // skip over whitespaces\n while (c === ' ' || c === '\\t' || c === '\\n' || c === '\\r') {\n // space, tab, enter\n next();\n }\n\n do {\n var isComment = false;\n\n // skip comment\n if (c === '#') {\n // find the previous non-space character\n var i = index - 1;\n while (dot.charAt(i) === ' ' || dot.charAt(i) === '\\t') {\n i--;\n }\n if (dot.charAt(i) === '\\n' || dot.charAt(i) === '') {\n // the # is at the start of a line, this is indeed a line comment\n while (c != '' && c != '\\n') {\n next();\n }\n isComment = true;\n }\n }\n if (c === '/' && nextPreview() === '/') {\n // skip line comment\n while (c != '' && c != '\\n') {\n next();\n }\n isComment = true;\n }\n if (c === '/' && nextPreview() === '*') {\n // skip block comment\n while (c != '') {\n if (c === '*' && nextPreview() === '/') {\n // end of block comment found. skip these last two characters\n next();\n next();\n break;\n } else {\n next();\n }\n }\n isComment = true;\n }\n\n // skip over whitespaces\n while (c === ' ' || c === '\\t' || c === '\\n' || c === '\\r') {\n // space, tab, enter\n next();\n }\n } while (isComment);\n\n // check for end of dot file\n if (c === '') {\n // token is still empty\n tokenType = TOKENTYPE.DELIMITER;\n return;\n }\n\n // check for delimiters consisting of 2 characters\n var c2 = c + nextPreview();\n if (DELIMITERS[c2]) {\n tokenType = TOKENTYPE.DELIMITER;\n token = c2;\n next();\n next();\n return;\n }\n\n // check for delimiters consisting of 1 character\n if (DELIMITERS[c]) {\n tokenType = TOKENTYPE.DELIMITER;\n token = c;\n next();\n return;\n }\n\n // check for an identifier (number or string)\n // TODO: more precise parsing of numbers/strings (and the port separator ':')\n if (isAlphaNumeric(c) || c === '-') {\n token += c;\n next();\n\n while (isAlphaNumeric(c)) {\n token += c;\n next();\n }\n if (token === 'false') {\n token = false; // convert to boolean\n } else if (token === 'true') {\n token = true; // convert to boolean\n } else if (!isNaN(Number(token))) {\n token = Number(token); // convert to number\n }\n tokenType = TOKENTYPE.IDENTIFIER;\n return;\n }\n\n // check for a string enclosed by double quotes\n if (c === '\"') {\n next();\n while (c != '' && (c != '\"' || c === '\"' && nextPreview() === '\"')) {\n token += c;\n if (c === '\"') {\n // skip the escape character\n next();\n }\n next();\n }\n if (c != '\"') {\n throw newSyntaxError('End of string \" expected');\n }\n next();\n tokenType = TOKENTYPE.IDENTIFIER;\n return;\n }\n\n // something unknown is found, wrong characters, a syntax error\n tokenType = TOKENTYPE.UNKNOWN;\n while (c != '') {\n token += c;\n next();\n }\n throw new SyntaxError('Syntax error in part \"' + chop(token, 30) + '\"');\n }", "function getToken() {\n tokenType = TOKENTYPE.NULL;\n token = '';\n\n // skip over whitespaces\n while (c === ' ' || c === '\\t' || c === '\\n' || c === '\\r') {\n // space, tab, enter\n next();\n }\n\n do {\n var isComment = false;\n\n // skip comment\n if (c === '#') {\n // find the previous non-space character\n var i = index - 1;\n while (dot.charAt(i) === ' ' || dot.charAt(i) === '\\t') {\n i--;\n }\n if (dot.charAt(i) === '\\n' || dot.charAt(i) === '') {\n // the # is at the start of a line, this is indeed a line comment\n while (c != '' && c != '\\n') {\n next();\n }\n isComment = true;\n }\n }\n if (c === '/' && nextPreview() === '/') {\n // skip line comment\n while (c != '' && c != '\\n') {\n next();\n }\n isComment = true;\n }\n if (c === '/' && nextPreview() === '*') {\n // skip block comment\n while (c != '') {\n if (c === '*' && nextPreview() === '/') {\n // end of block comment found. skip these last two characters\n next();\n next();\n break;\n } else {\n next();\n }\n }\n isComment = true;\n }\n\n // skip over whitespaces\n while (c === ' ' || c === '\\t' || c === '\\n' || c === '\\r') {\n // space, tab, enter\n next();\n }\n } while (isComment);\n\n // check for end of dot file\n if (c === '') {\n // token is still empty\n tokenType = TOKENTYPE.DELIMITER;\n return;\n }\n\n // check for delimiters consisting of 2 characters\n var c2 = c + nextPreview();\n if (DELIMITERS[c2]) {\n tokenType = TOKENTYPE.DELIMITER;\n token = c2;\n next();\n next();\n return;\n }\n\n // check for delimiters consisting of 1 character\n if (DELIMITERS[c]) {\n tokenType = TOKENTYPE.DELIMITER;\n token = c;\n next();\n return;\n }\n\n // check for an identifier (number or string)\n // TODO: more precise parsing of numbers/strings (and the port separator ':')\n if (isAlphaNumeric(c) || c === '-') {\n token += c;\n next();\n\n while (isAlphaNumeric(c)) {\n token += c;\n next();\n }\n if (token === 'false') {\n token = false; // convert to boolean\n } else if (token === 'true') {\n token = true; // convert to boolean\n } else if (!isNaN(Number(token))) {\n token = Number(token); // convert to number\n }\n tokenType = TOKENTYPE.IDENTIFIER;\n return;\n }\n\n // check for a string enclosed by double quotes\n if (c === '\"') {\n next();\n while (c != '' && (c != '\"' || c === '\"' && nextPreview() === '\"')) {\n token += c;\n if (c === '\"') {\n // skip the escape character\n next();\n }\n next();\n }\n if (c != '\"') {\n throw newSyntaxError('End of string \" expected');\n }\n next();\n tokenType = TOKENTYPE.IDENTIFIER;\n return;\n }\n\n // something unknown is found, wrong characters, a syntax error\n tokenType = TOKENTYPE.UNKNOWN;\n while (c != '') {\n token += c;\n next();\n }\n throw new SyntaxError('Syntax error in part \"' + chop(token, 30) + '\"');\n }", "function takeLine$2144(from$2170, to$2171) {\n var next$2172;\n if (to$2171.token.type === parser$2126.Token.Delimiter) {\n var sm_startLineNumber$2173 = typeof to$2171.token.sm_startLineNumber !== 'undefined' ? to$2171.token.sm_startLineNumber : to$2171.token.startLineNumber;\n var sm_endLineNumber$2174 = typeof to$2171.token.sm_endLineNumber !== 'undefined' ? to$2171.token.sm_endLineNumber : to$2171.token.endLineNumber;\n var sm_startLineStart$2175 = typeof to$2171.token.sm_startLineStart !== 'undefined' ? to$2171.token.sm_startLineStart : to$2171.token.startLineStart;\n var sm_endLineStart$2176 = typeof to$2171.token.sm_endLineStart !== 'undefined' ? to$2171.token.sm_endLineStart : to$2171.token.endLineStart;\n var sm_startRange$2177 = typeof to$2171.token.sm_startRange !== 'undefined' ? to$2171.token.sm_startRange : to$2171.token.startRange;\n var sm_endRange$2178 = typeof to$2171.token.sm_endRange !== 'undefined' ? to$2171.token.sm_endRange : to$2171.token.endRange;\n if (from$2170.token.type === parser$2126.Token.Delimiter) {\n next$2172 = syntaxFromToken$2130({\n type: parser$2126.Token.Delimiter,\n value: to$2171.token.value,\n inner: takeLineContext$2143(from$2170, to$2171.token.inner),\n startRange: from$2170.token.startRange,\n endRange: from$2170.token.endRange,\n startLineNumber: from$2170.token.startLineNumber,\n startLineStart: from$2170.token.startLineStart,\n endLineNumber: from$2170.token.endLineNumber,\n endLineStart: from$2170.token.endLineStart,\n sm_startLineNumber: sm_startLineNumber$2173,\n sm_endLineNumber: sm_endLineNumber$2174,\n sm_startLineStart: sm_startLineStart$2175,\n sm_endLineStart: sm_endLineStart$2176,\n sm_startRange: sm_startRange$2177,\n sm_endRange: sm_endRange$2178\n }, to$2171);\n } else {\n next$2172 = syntaxFromToken$2130({\n type: parser$2126.Token.Delimiter,\n value: to$2171.token.value,\n inner: takeLineContext$2143(from$2170, to$2171.token.inner),\n startRange: from$2170.token.range,\n endRange: from$2170.token.range,\n startLineNumber: from$2170.token.lineNumber,\n startLineStart: from$2170.token.lineStart,\n endLineNumber: from$2170.token.lineNumber,\n endLineStart: from$2170.token.lineStart,\n sm_startLineNumber: sm_startLineNumber$2173,\n sm_endLineNumber: sm_endLineNumber$2174,\n sm_startLineStart: sm_startLineStart$2175,\n sm_endLineStart: sm_endLineStart$2176,\n sm_startRange: sm_startRange$2177,\n sm_endRange: sm_endRange$2178\n }, to$2171);\n }\n } else {\n var sm_lineNumber$2179 = typeof to$2171.token.sm_lineNumber !== 'undefined' ? to$2171.token.sm_lineNumber : to$2171.token.lineNumber;\n var sm_lineStart$2180 = typeof to$2171.token.sm_lineStart !== 'undefined' ? to$2171.token.sm_lineStart : to$2171.token.lineStart;\n var sm_range$2181 = typeof to$2171.token.sm_range !== 'undefined' ? to$2171.token.sm_range : to$2171.token.range;\n if (from$2170.token.type === parser$2126.Token.Delimiter) {\n next$2172 = syntaxFromToken$2130({\n value: to$2171.token.value,\n type: to$2171.token.type,\n lineNumber: from$2170.token.startLineNumber,\n lineStart: from$2170.token.startLineStart,\n range: from$2170.token.startRange,\n sm_lineNumber: sm_lineNumber$2179,\n sm_lineStart: sm_lineStart$2180,\n sm_range: sm_range$2181\n }, to$2171);\n } else {\n next$2172 = syntaxFromToken$2130({\n value: to$2171.token.value,\n type: to$2171.token.type,\n lineNumber: from$2170.token.lineNumber,\n lineStart: from$2170.token.lineStart,\n range: from$2170.token.range,\n sm_lineNumber: sm_lineNumber$2179,\n sm_lineStart: sm_lineStart$2180,\n sm_range: sm_range$2181\n }, to$2171);\n }\n }\n if (to$2171.token.leadingComments) {\n next$2172.token.leadingComments = to$2171.token.leadingComments;\n }\n if (to$2171.token.trailingComments) {\n next$2172.token.trailingComments = to$2171.token.trailingComments;\n }\n return next$2172;\n }", "tokenBefore(types) {\n let token = language.syntaxTree(this.state).resolveInner(this.pos, -1);\n while (token && types.indexOf(token.name) < 0)\n token = token.parent;\n return token ? { from: token.from, to: this.pos,\n text: this.state.sliceDoc(token.from, this.pos),\n type: token.type } : null;\n }", "getToken() { return this.token.getToken(); }", "positionAt(offset) {\n const before = this.textDocument.slice(0, offset);\n const newLines = before.match(/\\n/g);\n const line = newLines ? newLines.length : 0;\n const preCharacters = before.match(/(\\n|^).*$/g);\n return new tokenizer_1.Position(line, preCharacters ? preCharacters[0].length : 0);\n }", "function getTouchingToken(sourceFile, position, includeItemAtEndPosition, includeJsDocComment) {\n if (includeJsDocComment === void 0) { includeJsDocComment = false; }\n return getTokenAtPositionWorker(sourceFile, position, /*allowPositionInLeadingTrivia*/ false, includeItemAtEndPosition, includeJsDocComment);\n }", "findTokenIndexAtOffset(offset) {\r\n return LineTokens.findIndexInTokensArray(this._tokens, offset);\r\n }", "function readTokenToBuffer() {\n\t\t\t// init local variables\n\t\t\tvar startPos, matchPos, matchStr, match, length;\n\n\t\t\tfor (;;) if (tokenRegExp.lastIndex !== inputLength) {\n\t\t\t\tstartPos = tokenRegExp.lastIndex;\n\t\t\t\tif (match = tokenRegExp.exec(inputString)) {\n\t\t\t\t\tmatchStr = match[0], matchPos = match.index;\n\n\t\t\t\t\t// check if we have T_ERR token\n\t\t\t\t\tif (length = matchPos - startPos) {\n\t\t\t\t\t\ttokenBuffer.push({\n\t\t\t\t\t\t\ttype: T_ERR,\n\t\t\t\t\t\t\tpos: startPos,\n\t\t\t\t\t\t\tvalue: inputString.substr(startPos, length)\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\tlength = match.length;\n\n\t\t\t\t\t// find matched group index\n\t\t\t\t\twhile (match[length--] === undefined);\n\n\t\t\t\t\t// obtain token info\n\t\t\t\t\tmatch = tokenIds[length];\n\t\t\t\t\t// match next token in case if this one is ignored\n\t\t\t\t\tif (match === IGNORE_START) continue;\n\t\t\t\t\t// return matched token\n\t\t\t\t\treturn tokenBuffer.push({\n\t\t\t\t\t\ttype: match,\n\t\t\t\t\t\tpos: matchPos,\n\t\t\t\t\t\tvalue: matchStr\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// return T_ERR token in case if we couldn't match anything\n\t\t\t\telse return (\n\t\t\t\t\ttokenRegExp.lastIndex = inputLength,\n\t\t\t\t\ttokenBuffer.push({\n\t\t\t\t\t\ttype: T_ERR,\n\t\t\t\t\t\tpos: startPos,\n\t\t\t\t\t\tvalue: inputString.slice(startPos)\n\t\t\t\t\t})\n\t\t\t\t);\n\n\t\t\t}\n\t\t\t// return T_EOF if we reached end of file\n\t\t\telse return tokenBuffer.push({\n\t\t\t\ttype: T_EOF,\n\t\t\t\tpos: inputLength\n\t\t\t});\n\t\t}", "nextToken() {\n let c1 = this.la(0);\n if(c1 < 128) {\n let t = this.map[c1];\n if(t >= 0) {\n return this.acceptToken(t, 1);\n } else {\n t = -t;\n if(t < this.Literal.$Literal) {\n return this.lexKnownToken(t);\n } else {\n return this.lexUnknownToken(t);\n }\n }\n } else if(Number.isNaN(c1)) {\n return this.acceptToken(this.Token.$EOF, 0);\n } else {\n return this.lexNonAsciiToken(c1);\n }\n }", "function factory(type) {\n return tokenize\n\n // Tokenizer for a bound `type`.\n function tokenize(value, location) {\n var self = this\n var offset = self.offset\n var tokens = []\n var methods = self[type + 'Methods']\n var tokenizers = self[type + 'Tokenizers']\n var line = location.line\n var column = location.column\n var index\n var length\n var method\n var name\n var matched\n var valueLength\n\n // Trim white space only lines.\n if (!value) {\n return tokens\n }\n\n // Expose on `eat`.\n eat.now = now\n eat.file = self.file\n\n // Sync initial offset.\n updatePosition('')\n\n // Iterate over `value`, and iterate over all tokenizers. When one eats\n // something, re-iterate with the remaining value. If no tokenizer eats,\n // something failed (should not happen) and an exception is thrown.\n while (value) {\n index = -1\n length = methods.length\n matched = false\n\n while (++index < length) {\n name = methods[index]\n method = tokenizers[name]\n\n // Previously, we had constructs such as footnotes and YAML that used\n // these properties.\n // Those are now external (plus there are userland extensions), that may\n // still use them.\n if (\n method &&\n /* istanbul ignore next */ (!method.onlyAtStart || self.atStart) &&\n /* istanbul ignore next */ (!method.notInList || !self.inList) &&\n /* istanbul ignore next */ (!method.notInBlock || !self.inBlock) &&\n (!method.notInLink || !self.inLink)\n ) {\n valueLength = value.length\n\n method.apply(self, [eat, value])\n\n matched = valueLength !== value.length\n\n if (matched) {\n break\n }\n }\n }\n\n /* istanbul ignore if */\n if (!matched) {\n self.file.fail(new Error('Infinite loop'), eat.now())\n }\n }\n\n self.eof = now()\n\n return tokens\n\n // Update line, column, and offset based on `value`.\n function updatePosition(subvalue) {\n var lastIndex = -1\n var index = subvalue.indexOf('\\n')\n\n while (index !== -1) {\n line++\n lastIndex = index\n index = subvalue.indexOf('\\n', index + 1)\n }\n\n if (lastIndex === -1) {\n column += subvalue.length\n } else {\n column = subvalue.length - lastIndex\n }\n\n if (line in offset) {\n if (lastIndex !== -1) {\n column += offset[line]\n } else if (column <= offset[line]) {\n column = offset[line] + 1\n }\n }\n }\n\n // Get offset. Called before the first character is eaten to retrieve the\n // range’s offsets.\n function getOffset() {\n var indentation = []\n var pos = line + 1\n\n // Done. Called when the last character is eaten to retrieve the range’s\n // offsets.\n return function () {\n var last = line + 1\n\n while (pos < last) {\n indentation.push((offset[pos] || 0) + 1)\n\n pos++\n }\n\n return indentation\n }\n }\n\n // Get the current position.\n function now() {\n var pos = {line: line, column: column}\n\n pos.offset = self.toOffset(pos)\n\n return pos\n }\n\n // Store position information for a node.\n function Position(start) {\n this.start = start\n this.end = now()\n }\n\n // Throw when a value is incorrectly eaten. This shouldn’t happen but will\n // throw on new, incorrect rules.\n function validateEat(subvalue) {\n /* istanbul ignore if */\n if (value.slice(0, subvalue.length) !== subvalue) {\n // Capture stack-trace.\n self.file.fail(\n new Error(\n 'Incorrectly eaten value: please report this warning on https://git.io/vg5Ft'\n ),\n now()\n )\n }\n }\n\n // Mark position and patch `node.position`.\n function position() {\n var before = now()\n\n return update\n\n // Add the position to a node.\n function update(node, indent) {\n var previous = node.position\n var start = previous ? previous.start : before\n var combined = []\n var n = previous && previous.end.line\n var l = before.line\n\n node.position = new Position(start)\n\n // If there was already a `position`, this node was merged. Fixing\n // `start` wasn’t hard, but the indent is different. Especially\n // because some information, the indent between `n` and `l` wasn’t\n // tracked. Luckily, that space is (should be?) empty, so we can\n // safely check for it now.\n if (previous && indent && previous.indent) {\n combined = previous.indent\n\n if (n < l) {\n while (++n < l) {\n combined.push((offset[n] || 0) + 1)\n }\n\n combined.push(before.column)\n }\n\n indent = combined.concat(indent)\n }\n\n node.position.indent = indent || []\n\n return node\n }\n }\n\n // Add `node` to `parent`s children or to `tokens`. Performs merges where\n // possible.\n function add(node, parent) {\n var children = parent ? parent.children : tokens\n var previous = children[children.length - 1]\n var fn\n\n if (\n previous &&\n node.type === previous.type &&\n (node.type === 'text' || node.type === 'blockquote') &&\n mergeable(previous) &&\n mergeable(node)\n ) {\n fn = node.type === 'text' ? mergeText : mergeBlockquote\n node = fn.call(self, previous, node)\n }\n\n if (node !== previous) {\n children.push(node)\n }\n\n if (self.atStart && tokens.length !== 0) {\n self.exitStart()\n }\n\n return node\n }\n\n // Remove `subvalue` from `value`. `subvalue` must be at the start of\n // `value`.\n function eat(subvalue) {\n var indent = getOffset()\n var pos = position()\n var current = now()\n\n validateEat(subvalue)\n\n apply.reset = reset\n reset.test = test\n apply.test = test\n\n value = value.slice(subvalue.length)\n\n updatePosition(subvalue)\n\n indent = indent()\n\n return apply\n\n // Add the given arguments, add `position` to the returned node, and\n // return the node.\n function apply(node, parent) {\n return pos(add(pos(node), parent), indent)\n }\n\n // Functions just like apply, but resets the content: the line and\n // column are reversed, and the eaten value is re-added. This is\n // useful for nodes with a single type of content, such as lists and\n // tables. See `apply` above for what parameters are expected.\n function reset() {\n var node = apply.apply(null, arguments)\n\n line = current.line\n column = current.column\n value = subvalue + value\n\n return node\n }\n\n // Test the position, after eating, and reverse to a not-eaten state.\n function test() {\n var result = pos({})\n\n line = current.line\n column = current.column\n value = subvalue + value\n\n return result.position\n }\n }\n }\n}", "current() { return (0<=this.pos && this.pos<this.tokens.length)?this.tokens[this.pos]:null; }", "tokenize(buf, off, len, line, column) {\n this._reset(line, column);\n\n let parseState = START;\n for (let i = 0; i < len; i += 1) {\n const c = buf[off + i];\n switch (parseState) {\n case START:\n if (c === '<') {\n parseState = TAG;\n }\n break;\n case TAG:\n if (c === '/') {\n this.endTag = true;\n parseState = NAME;\n } else if (c === '\"' || c === '\\'') {\n this.quoteChar = c;\n parseState = STRING;\n } else if (isWhitespace(c)) {\n parseState = INSIDE;\n } else {\n this.tagName += c;\n parseState = NAME;\n }\n break;\n case NAME:\n if (isWhitespace(c)) {\n parseState = INSIDE;\n } else if (c === '\"' || c === '\\'') {\n this.quoteChar = c;\n parseState = STRING;\n } else if (c === '>') {\n parseState = END;\n } else if (c === '/') {\n parseState = ENDSLASH;\n } else {\n this.tagName += c;\n }\n break;\n case INSIDE:\n if (c === '>') {\n this._attributeEnded();\n parseState = END;\n } else if (c === '/') {\n this._attributeEnded();\n parseState = ENDSLASH;\n } else if (c === '\"' || c === '\\'') {\n this._attributeValueStarted();\n this.quoteChar = c;\n parseState = STRING;\n } else if (c === '=') {\n parseState = EQUAL;\n } else if (!isWhitespace(c)) {\n this.attName += c;\n parseState = ATTNAME;\n }\n break;\n case ATTNAME:\n if (c === '>') {\n this._attributeEnded();\n parseState = END;\n } else if (c === '/') {\n this._attributeEnded();\n parseState = ENDSLASH;\n } else if (c === '=') {\n parseState = EQUAL;\n } else if (c === '\"' || c === '\\'') {\n this.quoteChar = c;\n parseState = STRING;\n } else if (isWhitespace(c)) {\n parseState = BETWEEN_ATTNAME;\n } else {\n this.attName += c;\n }\n break;\n case BETWEEN_ATTNAME:\n if (c === '>') {\n this._attributeEnded();\n parseState = END;\n } else if (c === '/') {\n this._attributeEnded();\n parseState = ENDSLASH;\n } else if (c === '\"' || c === '\\'') {\n this._attributeValueStarted();\n this.quoteChar = c;\n parseState = STRING;\n } else if (c === '=') {\n parseState = EQUAL;\n } else if (!isWhitespace(c)) {\n this._attributeEnded();\n this.attName += c;\n parseState = ATTNAME;\n }\n break;\n case EQUAL:\n if (c === '>') {\n this._attributeEnded();\n parseState = END;\n } else if (c === '\"' || c === '\\'') {\n this._attributeValueStarted();\n this.quoteChar = c;\n parseState = STRING;\n } else if (!isWhitespace(c)) {\n this._attributeValueStarted();\n this.attValue += c;\n parseState = ATTVALUE;\n }\n break;\n case ATTVALUE:\n if (isWhitespace(c)) {\n this._attributeEnded();\n parseState = INSIDE;\n } else if (c === '\"' || c === '\\'') {\n this._attributeEnded();\n this.quoteChar = c;\n parseState = STRING;\n } else if (c === '>') {\n this._attributeEnded();\n parseState = END;\n } else {\n this.attValue += c;\n }\n break;\n case STRING:\n if (c === this.quoteChar) {\n this._attributeEnded();\n parseState = INSIDE;\n } else {\n this.attValue += (c);\n }\n break;\n case ENDSLASH:\n if (c === '>') {\n this.endSlash = true;\n parseState = END;\n } else if (c === '\"' || c === '\\'') {\n this.quoteChar = c;\n parseState = STRING;\n } else if (c !== '/' && !isWhitespace(c)) {\n this.attName += c;\n parseState = ATTNAME;\n } else {\n parseState = INSIDE;\n }\n break;\n case END:\n break;\n default:\n throw new Error('Unexpected parse state');\n }\n if (c === '\\n') {\n this.line += 1;\n this.column = 0;\n } else {\n this.column += 1;\n }\n }\n return this;\n }", "token(input, start, end, value) { return new Token(input, start, end, this.type, value) }", "function factory(type) {\n return tokenize;\n\n /* Tokenizer for a bound `type`. */\n function tokenize(value, location) {\n var self = this;\n var offset = self.offset;\n var tokens = [];\n var methods = self[type + 'Methods'];\n var tokenizers = self[type + 'Tokenizers'];\n var line = location.line;\n var column = location.column;\n var index;\n var length;\n var method;\n var name;\n var matched;\n var valueLength;\n\n /* Trim white space only lines. */\n if (!value) {\n return tokens;\n }\n\n /* Expose on `eat`. */\n eat.now = now;\n eat.file = self.file;\n\n /* Sync initial offset. */\n updatePosition('');\n\n /* Iterate over `value`, and iterate over all\n * tokenizers. When one eats something, re-iterate\n * with the remaining value. If no tokenizer eats,\n * something failed (should not happen) and an\n * exception is thrown. */\n while (value) {\n index = -1;\n length = methods.length;\n matched = false;\n\n while (++index < length) {\n name = methods[index];\n method = tokenizers[name];\n\n if (\n method &&\n /* istanbul ignore next */ (!method.onlyAtStart || self.atStart) &&\n (!method.notInList || !self.inList) &&\n (!method.notInBlock || !self.inBlock) &&\n (!method.notInLink || !self.inLink)\n ) {\n valueLength = value.length;\n\n method.apply(self, [eat, value]);\n\n matched = valueLength !== value.length;\n\n if (matched) {\n break;\n }\n }\n }\n\n /* istanbul ignore if */\n if (!matched) {\n self.file.fail(new Error('Infinite loop'), eat.now());\n }\n }\n\n self.eof = now();\n\n return tokens;\n\n /* Update line, column, and offset based on\n * `value`. */\n function updatePosition(subvalue) {\n var lastIndex = -1;\n var index = subvalue.indexOf('\\n');\n\n while (index !== -1) {\n line++;\n lastIndex = index;\n index = subvalue.indexOf('\\n', index + 1);\n }\n\n if (lastIndex === -1) {\n column += subvalue.length;\n } else {\n column = subvalue.length - lastIndex;\n }\n\n if (line in offset) {\n if (lastIndex !== -1) {\n column += offset[line];\n } else if (column <= offset[line]) {\n column = offset[line] + 1;\n }\n }\n }\n\n /* Get offset. Called before the first character is\n * eaten to retrieve the range's offsets. */\n function getOffset() {\n var indentation = [];\n var pos = line + 1;\n\n /* Done. Called when the last character is\n * eaten to retrieve the range’s offsets. */\n return function () {\n var last = line + 1;\n\n while (pos < last) {\n indentation.push((offset[pos] || 0) + 1);\n\n pos++;\n }\n\n return indentation;\n };\n }\n\n /* Get the current position. */\n function now() {\n var pos = {line: line, column: column};\n\n pos.offset = self.toOffset(pos);\n\n return pos;\n }\n\n /* Store position information for a node. */\n function Position(start) {\n this.start = start;\n this.end = now();\n }\n\n /* Throw when a value is incorrectly eaten.\n * This shouldn’t happen but will throw on new,\n * incorrect rules. */\n function validateEat(subvalue) {\n /* istanbul ignore if */\n if (value.substring(0, subvalue.length) !== subvalue) {\n /* Capture stack-trace. */\n self.file.fail(\n new Error(\n 'Incorrectly eaten value: please report this ' +\n 'warning on http://git.io/vg5Ft'\n ),\n now()\n );\n }\n }\n\n /* Mark position and patch `node.position`. */\n function position() {\n var before = now();\n\n return update;\n\n /* Add the position to a node. */\n function update(node, indent) {\n var prev = node.position;\n var start = prev ? prev.start : before;\n var combined = [];\n var n = prev && prev.end.line;\n var l = before.line;\n\n node.position = new Position(start);\n\n /* If there was already a `position`, this\n * node was merged. Fixing `start` wasn’t\n * hard, but the indent is different.\n * Especially because some information, the\n * indent between `n` and `l` wasn’t\n * tracked. Luckily, that space is\n * (should be?) empty, so we can safely\n * check for it now. */\n if (prev && indent && prev.indent) {\n combined = prev.indent;\n\n if (n < l) {\n while (++n < l) {\n combined.push((offset[n] || 0) + 1);\n }\n\n combined.push(before.column);\n }\n\n indent = combined.concat(indent);\n }\n\n node.position.indent = indent || [];\n\n return node;\n }\n }\n\n /* Add `node` to `parent`s children or to `tokens`.\n * Performs merges where possible. */\n function add(node, parent) {\n var children = parent ? parent.children : tokens;\n var prev = children[children.length - 1];\n\n if (\n prev &&\n node.type === prev.type &&\n node.type in MERGEABLE_NODES &&\n mergeable(prev) &&\n mergeable(node)\n ) {\n node = MERGEABLE_NODES[node.type].call(self, prev, node);\n }\n\n if (node !== prev) {\n children.push(node);\n }\n\n if (self.atStart && tokens.length !== 0) {\n self.exitStart();\n }\n\n return node;\n }\n\n /* Remove `subvalue` from `value`.\n * `subvalue` must be at the start of `value`. */\n function eat(subvalue) {\n var indent = getOffset();\n var pos = position();\n var current = now();\n\n validateEat(subvalue);\n\n apply.reset = reset;\n reset.test = test;\n apply.test = test;\n\n value = value.substring(subvalue.length);\n\n updatePosition(subvalue);\n\n indent = indent();\n\n return apply;\n\n /* Add the given arguments, add `position` to\n * the returned node, and return the node. */\n function apply(node, parent) {\n return pos(add(pos(node), parent), indent);\n }\n\n /* Functions just like apply, but resets the\n * content: the line and column are reversed,\n * and the eaten value is re-added.\n * This is useful for nodes with a single\n * type of content, such as lists and tables.\n * See `apply` above for what parameters are\n * expected. */\n function reset() {\n var node = apply.apply(null, arguments);\n\n line = current.line;\n column = current.column;\n value = subvalue + value;\n\n return node;\n }\n\n /* Test the position, after eating, and reverse\n * to a not-eaten state. */\n function test() {\n var result = pos({});\n\n line = current.line;\n column = current.column;\n value = subvalue + value;\n\n return result.position;\n }\n }\n }\n}", "function factory(type) {\n return tokenize;\n\n /* Tokenizer for a bound `type`. */\n function tokenize(value, location) {\n var self = this;\n var offset = self.offset;\n var tokens = [];\n var methods = self[type + 'Methods'];\n var tokenizers = self[type + 'Tokenizers'];\n var line = location.line;\n var column = location.column;\n var index;\n var length;\n var method;\n var name;\n var matched;\n var valueLength;\n\n /* Trim white space only lines. */\n if (!value) {\n return tokens;\n }\n\n /* Expose on `eat`. */\n eat.now = now;\n eat.file = self.file;\n\n /* Sync initial offset. */\n updatePosition('');\n\n /* Iterate over `value`, and iterate over all\n * tokenizers. When one eats something, re-iterate\n * with the remaining value. If no tokenizer eats,\n * something failed (should not happen) and an\n * exception is thrown. */\n while (value) {\n index = -1;\n length = methods.length;\n matched = false;\n\n while (++index < length) {\n name = methods[index];\n method = tokenizers[name];\n\n if (\n method &&\n /* istanbul ignore next */ (!method.onlyAtStart || self.atStart) &&\n (!method.notInList || !self.inList) &&\n (!method.notInBlock || !self.inBlock) &&\n (!method.notInLink || !self.inLink)\n ) {\n valueLength = value.length;\n\n method.apply(self, [eat, value]);\n\n matched = valueLength !== value.length;\n\n if (matched) {\n break;\n }\n }\n }\n\n /* istanbul ignore if */\n if (!matched) {\n self.file.fail(new Error('Infinite loop'), eat.now());\n }\n }\n\n self.eof = now();\n\n return tokens;\n\n /* Update line, column, and offset based on\n * `value`. */\n function updatePosition(subvalue) {\n var lastIndex = -1;\n var index = subvalue.indexOf('\\n');\n\n while (index !== -1) {\n line++;\n lastIndex = index;\n index = subvalue.indexOf('\\n', index + 1);\n }\n\n if (lastIndex === -1) {\n column += subvalue.length;\n } else {\n column = subvalue.length - lastIndex;\n }\n\n if (line in offset) {\n if (lastIndex !== -1) {\n column += offset[line];\n } else if (column <= offset[line]) {\n column = offset[line] + 1;\n }\n }\n }\n\n /* Get offset. Called before the first character is\n * eaten to retrieve the range's offsets. */\n function getOffset() {\n var indentation = [];\n var pos = line + 1;\n\n /* Done. Called when the last character is\n * eaten to retrieve the range’s offsets. */\n return function () {\n var last = line + 1;\n\n while (pos < last) {\n indentation.push((offset[pos] || 0) + 1);\n\n pos++;\n }\n\n return indentation;\n };\n }\n\n /* Get the current position. */\n function now() {\n var pos = {line: line, column: column};\n\n pos.offset = self.toOffset(pos);\n\n return pos;\n }\n\n /* Store position information for a node. */\n function Position(start) {\n this.start = start;\n this.end = now();\n }\n\n /* Throw when a value is incorrectly eaten.\n * This shouldn’t happen but will throw on new,\n * incorrect rules. */\n function validateEat(subvalue) {\n /* istanbul ignore if */\n if (value.substring(0, subvalue.length) !== subvalue) {\n /* Capture stack-trace. */\n self.file.fail(\n new Error(\n 'Incorrectly eaten value: please report this ' +\n 'warning on http://git.io/vg5Ft'\n ),\n now()\n );\n }\n }\n\n /* Mark position and patch `node.position`. */\n function position() {\n var before = now();\n\n return update;\n\n /* Add the position to a node. */\n function update(node, indent) {\n var prev = node.position;\n var start = prev ? prev.start : before;\n var combined = [];\n var n = prev && prev.end.line;\n var l = before.line;\n\n node.position = new Position(start);\n\n /* If there was already a `position`, this\n * node was merged. Fixing `start` wasn’t\n * hard, but the indent is different.\n * Especially because some information, the\n * indent between `n` and `l` wasn’t\n * tracked. Luckily, that space is\n * (should be?) empty, so we can safely\n * check for it now. */\n if (prev && indent && prev.indent) {\n combined = prev.indent;\n\n if (n < l) {\n while (++n < l) {\n combined.push((offset[n] || 0) + 1);\n }\n\n combined.push(before.column);\n }\n\n indent = combined.concat(indent);\n }\n\n node.position.indent = indent || [];\n\n return node;\n }\n }\n\n /* Add `node` to `parent`s children or to `tokens`.\n * Performs merges where possible. */\n function add(node, parent) {\n var children = parent ? parent.children : tokens;\n var prev = children[children.length - 1];\n\n if (\n prev &&\n node.type === prev.type &&\n node.type in MERGEABLE_NODES &&\n mergeable(prev) &&\n mergeable(node)\n ) {\n node = MERGEABLE_NODES[node.type].call(self, prev, node);\n }\n\n if (node !== prev) {\n children.push(node);\n }\n\n if (self.atStart && tokens.length !== 0) {\n self.exitStart();\n }\n\n return node;\n }\n\n /* Remove `subvalue` from `value`.\n * `subvalue` must be at the start of `value`. */\n function eat(subvalue) {\n var indent = getOffset();\n var pos = position();\n var current = now();\n\n validateEat(subvalue);\n\n apply.reset = reset;\n reset.test = test;\n apply.test = test;\n\n value = value.substring(subvalue.length);\n\n updatePosition(subvalue);\n\n indent = indent();\n\n return apply;\n\n /* Add the given arguments, add `position` to\n * the returned node, and return the node. */\n function apply(node, parent) {\n return pos(add(pos(node), parent), indent);\n }\n\n /* Functions just like apply, but resets the\n * content: the line and column are reversed,\n * and the eaten value is re-added.\n * This is useful for nodes with a single\n * type of content, such as lists and tables.\n * See `apply` above for what parameters are\n * expected. */\n function reset() {\n var node = apply.apply(null, arguments);\n\n line = current.line;\n column = current.column;\n value = subvalue + value;\n\n return node;\n }\n\n /* Test the position, after eating, and reverse\n * to a not-eaten state. */\n function test() {\n var result = pos({});\n\n line = current.line;\n column = current.column;\n value = subvalue + value;\n\n return result.position;\n }\n }\n }\n}", "function factory(type) {\n return tokenize;\n\n /* Tokenizer for a bound `type`. */\n function tokenize(value, location) {\n var self = this;\n var offset = self.offset;\n var tokens = [];\n var methods = self[type + 'Methods'];\n var tokenizers = self[type + 'Tokenizers'];\n var line = location.line;\n var column = location.column;\n var index;\n var length;\n var method;\n var name;\n var matched;\n var valueLength;\n\n /* Trim white space only lines. */\n if (!value) {\n return tokens;\n }\n\n /* Expose on `eat`. */\n eat.now = now;\n eat.file = self.file;\n\n /* Sync initial offset. */\n updatePosition('');\n\n /* Iterate over `value`, and iterate over all\n * tokenizers. When one eats something, re-iterate\n * with the remaining value. If no tokenizer eats,\n * something failed (should not happen) and an\n * exception is thrown. */\n while (value) {\n index = -1;\n length = methods.length;\n matched = false;\n\n while (++index < length) {\n name = methods[index];\n method = tokenizers[name];\n\n if (\n method &&\n /* istanbul ignore next */ (!method.onlyAtStart || self.atStart) &&\n (!method.notInList || !self.inList) &&\n (!method.notInBlock || !self.inBlock) &&\n (!method.notInLink || !self.inLink)\n ) {\n valueLength = value.length;\n\n method.apply(self, [eat, value]);\n\n matched = valueLength !== value.length;\n\n if (matched) {\n break;\n }\n }\n }\n\n /* istanbul ignore if */\n if (!matched) {\n self.file.fail(new Error('Infinite loop'), eat.now());\n }\n }\n\n self.eof = now();\n\n return tokens;\n\n /* Update line, column, and offset based on\n * `value`. */\n function updatePosition(subvalue) {\n var lastIndex = -1;\n var index = subvalue.indexOf('\\n');\n\n while (index !== -1) {\n line++;\n lastIndex = index;\n index = subvalue.indexOf('\\n', index + 1);\n }\n\n if (lastIndex === -1) {\n column += subvalue.length;\n } else {\n column = subvalue.length - lastIndex;\n }\n\n if (line in offset) {\n if (lastIndex !== -1) {\n column += offset[line];\n } else if (column <= offset[line]) {\n column = offset[line] + 1;\n }\n }\n }\n\n /* Get offset. Called before the first character is\n * eaten to retrieve the range's offsets. */\n function getOffset() {\n var indentation = [];\n var pos = line + 1;\n\n /* Done. Called when the last character is\n * eaten to retrieve the range’s offsets. */\n return function () {\n var last = line + 1;\n\n while (pos < last) {\n indentation.push((offset[pos] || 0) + 1);\n\n pos++;\n }\n\n return indentation;\n };\n }\n\n /* Get the current position. */\n function now() {\n var pos = {line: line, column: column};\n\n pos.offset = self.toOffset(pos);\n\n return pos;\n }\n\n /* Store position information for a node. */\n function Position(start) {\n this.start = start;\n this.end = now();\n }\n\n /* Throw when a value is incorrectly eaten.\n * This shouldn’t happen but will throw on new,\n * incorrect rules. */\n function validateEat(subvalue) {\n /* istanbul ignore if */\n if (value.substring(0, subvalue.length) !== subvalue) {\n /* Capture stack-trace. */\n self.file.fail(\n new Error(\n 'Incorrectly eaten value: please report this ' +\n 'warning on http://git.io/vg5Ft'\n ),\n now()\n );\n }\n }\n\n /* Mark position and patch `node.position`. */\n function position() {\n var before = now();\n\n return update;\n\n /* Add the position to a node. */\n function update(node, indent) {\n var prev = node.position;\n var start = prev ? prev.start : before;\n var combined = [];\n var n = prev && prev.end.line;\n var l = before.line;\n\n node.position = new Position(start);\n\n /* If there was already a `position`, this\n * node was merged. Fixing `start` wasn’t\n * hard, but the indent is different.\n * Especially because some information, the\n * indent between `n` and `l` wasn’t\n * tracked. Luckily, that space is\n * (should be?) empty, so we can safely\n * check for it now. */\n if (prev && indent && prev.indent) {\n combined = prev.indent;\n\n if (n < l) {\n while (++n < l) {\n combined.push((offset[n] || 0) + 1);\n }\n\n combined.push(before.column);\n }\n\n indent = combined.concat(indent);\n }\n\n node.position.indent = indent || [];\n\n return node;\n }\n }\n\n /* Add `node` to `parent`s children or to `tokens`.\n * Performs merges where possible. */\n function add(node, parent) {\n var children = parent ? parent.children : tokens;\n var prev = children[children.length - 1];\n\n if (\n prev &&\n node.type === prev.type &&\n node.type in MERGEABLE_NODES &&\n mergeable(prev) &&\n mergeable(node)\n ) {\n node = MERGEABLE_NODES[node.type].call(self, prev, node);\n }\n\n if (node !== prev) {\n children.push(node);\n }\n\n if (self.atStart && tokens.length !== 0) {\n self.exitStart();\n }\n\n return node;\n }\n\n /* Remove `subvalue` from `value`.\n * `subvalue` must be at the start of `value`. */\n function eat(subvalue) {\n var indent = getOffset();\n var pos = position();\n var current = now();\n\n validateEat(subvalue);\n\n apply.reset = reset;\n reset.test = test;\n apply.test = test;\n\n value = value.substring(subvalue.length);\n\n updatePosition(subvalue);\n\n indent = indent();\n\n return apply;\n\n /* Add the given arguments, add `position` to\n * the returned node, and return the node. */\n function apply(node, parent) {\n return pos(add(pos(node), parent), indent);\n }\n\n /* Functions just like apply, but resets the\n * content: the line and column are reversed,\n * and the eaten value is re-added.\n * This is useful for nodes with a single\n * type of content, such as lists and tables.\n * See `apply` above for what parameters are\n * expected. */\n function reset() {\n var node = apply.apply(null, arguments);\n\n line = current.line;\n column = current.column;\n value = subvalue + value;\n\n return node;\n }\n\n /* Test the position, after eating, and reverse\n * to a not-eaten state. */\n function test() {\n var result = pos({});\n\n line = current.line;\n column = current.column;\n value = subvalue + value;\n\n return result.position;\n }\n }\n }\n}", "function factory(type) {\n return tokenize;\n\n /* Tokenizer for a bound `type`. */\n function tokenize(value, location) {\n var self = this;\n var offset = self.offset;\n var tokens = [];\n var methods = self[type + 'Methods'];\n var tokenizers = self[type + 'Tokenizers'];\n var line = location.line;\n var column = location.column;\n var index;\n var length;\n var method;\n var name;\n var matched;\n var valueLength;\n\n /* Trim white space only lines. */\n if (!value) {\n return tokens;\n }\n\n /* Expose on `eat`. */\n eat.now = now;\n eat.file = self.file;\n\n /* Sync initial offset. */\n updatePosition('');\n\n /* Iterate over `value`, and iterate over all\n * tokenizers. When one eats something, re-iterate\n * with the remaining value. If no tokenizer eats,\n * something failed (should not happen) and an\n * exception is thrown. */\n while (value) {\n index = -1;\n length = methods.length;\n matched = false;\n\n while (++index < length) {\n name = methods[index];\n method = tokenizers[name];\n\n if (\n method &&\n /* istanbul ignore next */ (!method.onlyAtStart || self.atStart) &&\n (!method.notInList || !self.inList) &&\n (!method.notInBlock || !self.inBlock) &&\n (!method.notInLink || !self.inLink)\n ) {\n valueLength = value.length;\n\n method.apply(self, [eat, value]);\n\n matched = valueLength !== value.length;\n\n if (matched) {\n break;\n }\n }\n }\n\n /* istanbul ignore if */\n if (!matched) {\n self.file.fail(new Error('Infinite loop'), eat.now());\n }\n }\n\n self.eof = now();\n\n return tokens;\n\n /* Update line, column, and offset based on\n * `value`. */\n function updatePosition(subvalue) {\n var lastIndex = -1;\n var index = subvalue.indexOf('\\n');\n\n while (index !== -1) {\n line++;\n lastIndex = index;\n index = subvalue.indexOf('\\n', index + 1);\n }\n\n if (lastIndex === -1) {\n column += subvalue.length;\n } else {\n column = subvalue.length - lastIndex;\n }\n\n if (line in offset) {\n if (lastIndex !== -1) {\n column += offset[line];\n } else if (column <= offset[line]) {\n column = offset[line] + 1;\n }\n }\n }\n\n /* Get offset. Called before the first character is\n * eaten to retrieve the range's offsets. */\n function getOffset() {\n var indentation = [];\n var pos = line + 1;\n\n /* Done. Called when the last character is\n * eaten to retrieve the range’s offsets. */\n return function () {\n var last = line + 1;\n\n while (pos < last) {\n indentation.push((offset[pos] || 0) + 1);\n\n pos++;\n }\n\n return indentation;\n };\n }\n\n /* Get the current position. */\n function now() {\n var pos = {line: line, column: column};\n\n pos.offset = self.toOffset(pos);\n\n return pos;\n }\n\n /* Store position information for a node. */\n function Position(start) {\n this.start = start;\n this.end = now();\n }\n\n /* Throw when a value is incorrectly eaten.\n * This shouldn’t happen but will throw on new,\n * incorrect rules. */\n function validateEat(subvalue) {\n /* istanbul ignore if */\n if (value.substring(0, subvalue.length) !== subvalue) {\n /* Capture stack-trace. */\n self.file.fail(\n new Error(\n 'Incorrectly eaten value: please report this ' +\n 'warning on http://git.io/vg5Ft'\n ),\n now()\n );\n }\n }\n\n /* Mark position and patch `node.position`. */\n function position() {\n var before = now();\n\n return update;\n\n /* Add the position to a node. */\n function update(node, indent) {\n var prev = node.position;\n var start = prev ? prev.start : before;\n var combined = [];\n var n = prev && prev.end.line;\n var l = before.line;\n\n node.position = new Position(start);\n\n /* If there was already a `position`, this\n * node was merged. Fixing `start` wasn’t\n * hard, but the indent is different.\n * Especially because some information, the\n * indent between `n` and `l` wasn’t\n * tracked. Luckily, that space is\n * (should be?) empty, so we can safely\n * check for it now. */\n if (prev && indent && prev.indent) {\n combined = prev.indent;\n\n if (n < l) {\n while (++n < l) {\n combined.push((offset[n] || 0) + 1);\n }\n\n combined.push(before.column);\n }\n\n indent = combined.concat(indent);\n }\n\n node.position.indent = indent || [];\n\n return node;\n }\n }\n\n /* Add `node` to `parent`s children or to `tokens`.\n * Performs merges where possible. */\n function add(node, parent) {\n var children = parent ? parent.children : tokens;\n var prev = children[children.length - 1];\n\n if (\n prev &&\n node.type === prev.type &&\n node.type in MERGEABLE_NODES &&\n mergeable(prev) &&\n mergeable(node)\n ) {\n node = MERGEABLE_NODES[node.type].call(self, prev, node);\n }\n\n if (node !== prev) {\n children.push(node);\n }\n\n if (self.atStart && tokens.length !== 0) {\n self.exitStart();\n }\n\n return node;\n }\n\n /* Remove `subvalue` from `value`.\n * `subvalue` must be at the start of `value`. */\n function eat(subvalue) {\n var indent = getOffset();\n var pos = position();\n var current = now();\n\n validateEat(subvalue);\n\n apply.reset = reset;\n reset.test = test;\n apply.test = test;\n\n value = value.substring(subvalue.length);\n\n updatePosition(subvalue);\n\n indent = indent();\n\n return apply;\n\n /* Add the given arguments, add `position` to\n * the returned node, and return the node. */\n function apply(node, parent) {\n return pos(add(pos(node), parent), indent);\n }\n\n /* Functions just like apply, but resets the\n * content: the line and column are reversed,\n * and the eaten value is re-added.\n * This is useful for nodes with a single\n * type of content, such as lists and tables.\n * See `apply` above for what parameters are\n * expected. */\n function reset() {\n var node = apply.apply(null, arguments);\n\n line = current.line;\n column = current.column;\n value = subvalue + value;\n\n return node;\n }\n\n /* Test the position, after eating, and reverse\n * to a not-eaten state. */\n function test() {\n var result = pos({});\n\n line = current.line;\n column = current.column;\n value = subvalue + value;\n\n return result.position;\n }\n }\n }\n}", "function factory(type) {\n return tokenize;\n\n /* Tokenizer for a bound `type`. */\n function tokenize(value, location) {\n var self = this;\n var offset = self.offset;\n var tokens = [];\n var methods = self[type + 'Methods'];\n var tokenizers = self[type + 'Tokenizers'];\n var line = location.line;\n var column = location.column;\n var index;\n var length;\n var method;\n var name;\n var matched;\n var valueLength;\n\n /* Trim white space only lines. */\n if (!value) {\n return tokens;\n }\n\n /* Expose on `eat`. */\n eat.now = now;\n eat.file = self.file;\n\n /* Sync initial offset. */\n updatePosition('');\n\n /* Iterate over `value`, and iterate over all\n * tokenizers. When one eats something, re-iterate\n * with the remaining value. If no tokenizer eats,\n * something failed (should not happen) and an\n * exception is thrown. */\n while (value) {\n index = -1;\n length = methods.length;\n matched = false;\n\n while (++index < length) {\n name = methods[index];\n method = tokenizers[name];\n\n if (\n method &&\n /* istanbul ignore next */ (!method.onlyAtStart || self.atStart) &&\n (!method.notInList || !self.inList) &&\n (!method.notInBlock || !self.inBlock) &&\n (!method.notInLink || !self.inLink)\n ) {\n valueLength = value.length;\n\n method.apply(self, [eat, value]);\n\n matched = valueLength !== value.length;\n\n if (matched) {\n break;\n }\n }\n }\n\n /* istanbul ignore if */\n if (!matched) {\n self.file.fail(new Error('Infinite loop'), eat.now());\n }\n }\n\n self.eof = now();\n\n return tokens;\n\n /* Update line, column, and offset based on\n * `value`. */\n function updatePosition(subvalue) {\n var lastIndex = -1;\n var index = subvalue.indexOf('\\n');\n\n while (index !== -1) {\n line++;\n lastIndex = index;\n index = subvalue.indexOf('\\n', index + 1);\n }\n\n if (lastIndex === -1) {\n column += subvalue.length;\n } else {\n column = subvalue.length - lastIndex;\n }\n\n if (line in offset) {\n if (lastIndex !== -1) {\n column += offset[line];\n } else if (column <= offset[line]) {\n column = offset[line] + 1;\n }\n }\n }\n\n /* Get offset. Called before the first character is\n * eaten to retrieve the range's offsets. */\n function getOffset() {\n var indentation = [];\n var pos = line + 1;\n\n /* Done. Called when the last character is\n * eaten to retrieve the range’s offsets. */\n return function () {\n var last = line + 1;\n\n while (pos < last) {\n indentation.push((offset[pos] || 0) + 1);\n\n pos++;\n }\n\n return indentation;\n };\n }\n\n /* Get the current position. */\n function now() {\n var pos = {line: line, column: column};\n\n pos.offset = self.toOffset(pos);\n\n return pos;\n }\n\n /* Store position information for a node. */\n function Position(start) {\n this.start = start;\n this.end = now();\n }\n\n /* Throw when a value is incorrectly eaten.\n * This shouldn’t happen but will throw on new,\n * incorrect rules. */\n function validateEat(subvalue) {\n /* istanbul ignore if */\n if (value.substring(0, subvalue.length) !== subvalue) {\n /* Capture stack-trace. */\n self.file.fail(\n new Error(\n 'Incorrectly eaten value: please report this ' +\n 'warning on http://git.io/vg5Ft'\n ),\n now()\n );\n }\n }\n\n /* Mark position and patch `node.position`. */\n function position() {\n var before = now();\n\n return update;\n\n /* Add the position to a node. */\n function update(node, indent) {\n var prev = node.position;\n var start = prev ? prev.start : before;\n var combined = [];\n var n = prev && prev.end.line;\n var l = before.line;\n\n node.position = new Position(start);\n\n /* If there was already a `position`, this\n * node was merged. Fixing `start` wasn’t\n * hard, but the indent is different.\n * Especially because some information, the\n * indent between `n` and `l` wasn’t\n * tracked. Luckily, that space is\n * (should be?) empty, so we can safely\n * check for it now. */\n if (prev && indent && prev.indent) {\n combined = prev.indent;\n\n if (n < l) {\n while (++n < l) {\n combined.push((offset[n] || 0) + 1);\n }\n\n combined.push(before.column);\n }\n\n indent = combined.concat(indent);\n }\n\n node.position.indent = indent || [];\n\n return node;\n }\n }\n\n /* Add `node` to `parent`s children or to `tokens`.\n * Performs merges where possible. */\n function add(node, parent) {\n var children = parent ? parent.children : tokens;\n var prev = children[children.length - 1];\n\n if (\n prev &&\n node.type === prev.type &&\n node.type in MERGEABLE_NODES &&\n mergeable(prev) &&\n mergeable(node)\n ) {\n node = MERGEABLE_NODES[node.type].call(self, prev, node);\n }\n\n if (node !== prev) {\n children.push(node);\n }\n\n if (self.atStart && tokens.length !== 0) {\n self.exitStart();\n }\n\n return node;\n }\n\n /* Remove `subvalue` from `value`.\n * `subvalue` must be at the start of `value`. */\n function eat(subvalue) {\n var indent = getOffset();\n var pos = position();\n var current = now();\n\n validateEat(subvalue);\n\n apply.reset = reset;\n reset.test = test;\n apply.test = test;\n\n value = value.substring(subvalue.length);\n\n updatePosition(subvalue);\n\n indent = indent();\n\n return apply;\n\n /* Add the given arguments, add `position` to\n * the returned node, and return the node. */\n function apply(node, parent) {\n return pos(add(pos(node), parent), indent);\n }\n\n /* Functions just like apply, but resets the\n * content: the line and column are reversed,\n * and the eaten value is re-added.\n * This is useful for nodes with a single\n * type of content, such as lists and tables.\n * See `apply` above for what parameters are\n * expected. */\n function reset() {\n var node = apply.apply(null, arguments);\n\n line = current.line;\n column = current.column;\n value = subvalue + value;\n\n return node;\n }\n\n /* Test the position, after eating, and reverse\n * to a not-eaten state. */\n function test() {\n var result = pos({});\n\n line = current.line;\n column = current.column;\n value = subvalue + value;\n\n return result.position;\n }\n }\n }\n}", "function getLineInfo(input, offset) {\n\t for (var line = 1, cur = 0;;) {\n\t _whitespace.lineBreakG.lastIndex = cur;\n\t var match = _whitespace.lineBreakG.exec(input);\n\t if (match && match.index < offset) {\n\t ++line;\n\t cur = match.index + match[0].length;\n\t } else {\n\t return new Position(line, offset - cur);\n\t }\n\t }\n\t}", "function getLineInfo(input, offset) {\n\t for (var line = 1, cur = 0;;) {\n\t _whitespace.lineBreakG.lastIndex = cur;\n\t var match = _whitespace.lineBreakG.exec(input);\n\t if (match && match.index < offset) {\n\t ++line;\n\t cur = match.index + match[0].length;\n\t } else {\n\t return new Position(line, offset - cur);\n\t }\n\t }\n\t}", "readNextToken() {\n this.state.prevLexType = this.state.lex.type;\n\n if (this.state.nextIndentation !== this.state.indentation) {\n if (this.state.nextIndentation > this.state.indentation) {\n return this.finishToken(tt.indent);\n } else {\n if (this.state.prevLexType === tt.newline) {\n return this.finishToken(tt.dedent);\n } else {\n return this.finishToken(tt.newline);\n }\n }\n }\n\n let curContext = this.curContext();\n if (curContext == null || !curContext.preserveSpace) {\n if (this.state.eol && this.state.pos !== this.state.eolPos) {\n this.skipIndentation();\n }\n // newlines are significant, so this only skips comments and non-indentation whitespace\n this.skipNonTokens();\n }\n this.state.containsOctal = false;\n this.state.octalPosition = null;\n\n this.startTokenLex();\n\n if (this.state.pos >= this.input.length) {\n if (this.state.indentation > 0) {\n this.state.nextIndentation = 0;\n return this.finishToken(tt.newline);\n }\n if (this.state.lex.type !== tt.eof || this.state.tokens.length === 0) {\n return this.finishToken(tt.eof);\n } else {\n return;\n }\n }\n\n if (curContext.override) return curContext.override(this);\n else return this.readToken(this.fullCharCodeAtPos());\n }", "findToken() {\n let t;\n if(this.peekTokens.length) {\n return this.peekedToken();\n }\n do {\n t = this.nextToken();\n } while(!t);\n return t;\n }", "function tokenizeLine(line, lineIndex) {\n // Trim leading whitespace.\n // We can't trim trailing or interior whitespace or comments at this point\n // because those might belong to string literals.\n const trimmed = line.trimLeft();\n\n // Include the line number when we parse string literals\n // so that error messages are more helpful.\n const parseStringCtx = withContext(parseString,\n `on line ${lineIndex + 1}`);\n\n // Now we execute a small state machine.\n // At any point, we can be\n // * ready to start a new token;\n // * in the middle of a token; or\n // * in the middle of a string.\n const [IDLE, TOKEN, STRING] = [0, 1, 2];\n let state = IDLE;\n\n // These are the list of tokens/strings we've collected so far\n // (which will be the return value of this function)\n // and the value of the token/string currently being built.\n let tokens = [];\n let current = \"\";\n\n for (let i = 0; i < line.length; i++) {\n const here = trimmed.charAt(i);\n const isWhitespace = !!here.match(/\\s/);\n const isComma = here === ',';\n const isQuote = here === '\"';\n\n if (state === IDLE) {\n if (isWhitespace || isComma) {\n continue;\n } else {\n state = isQuote ? STRING : TOKEN;\n }\n }\n\n // Break at comments, unless we're inside a string.\n if (here === ';' && state !== STRING) {\n break;\n }\n\n if (state === TOKEN) {\n // Break tokens at commas and whitespace.\n if (isWhitespace || isComma) {\n tokens.push(current);\n state = IDLE;\n current = \"\";\n } else {\n current += here;\n }\n } else if (state === STRING) {\n current += here; // includes the quotation marks\n if (here === '\\\\') {\n // All our escape sequences are just one character,\n // so we can just read that in. Easy.\n current += trimmed.charAt(++i);\n } else if (isQuote && current.length > 1) {\n tokens.push(parseStringCtx(current));\n state = IDLE;\n current = \"\";\n }\n }\n }\n\n // Finally, add any tokens that extended to the end of the line.\n if (current.length > 0) {\n if (state === TOKEN) {\n tokens.push(current);\n } else if (state === STRING) {\n tokens.push(parseStringCtx(current));\n }\n }\n\n return tokens;\n}", "nextToken() {\n return this.tokens[this.tokenIndex] || \"\";\n }", "function hmdModeLineInfo(lineNo) {\n if (lineNo === void 0) lineNo = cm.getCursor().line\n var tokens = cm.getLineTokens(lineNo)\n tokens = tokens.map(function (t) {\n return [t.string, t.type, t.state]\n })\n return tokens\n}", "function getTokenString(state) {\n return state.data.substring(state.currentTokenStart, state.currentTokenEnd);\n }", "function isTokenOnSameLine(left, right) {\n return left.loc.end.line === right.loc.start.line;\n}", "function factory(type) {\n return tokenize;\n\n /* Tokenizer for a bound `type`. */\n function tokenize(value, location) {\n var self = this;\n var offset = self.offset;\n var tokens = [];\n var methods = self[type + 'Methods'];\n var tokenizers = self[type + 'Tokenizers'];\n var line = location.line;\n var column = location.column;\n var index;\n var length;\n var method;\n var name;\n var matched;\n var valueLength;\n\n /* Trim white space only lines. */\n if (!value) {\n return tokens;\n }\n\n /* Expose on `eat`. */\n eat.now = now;\n eat.file = self.file;\n\n /* Sync initial offset. */\n updatePosition('');\n\n /* Iterate over `value`, and iterate over all\n * tokenizers. When one eats something, re-iterate\n * with the remaining value. If no tokenizer eats,\n * something failed (should not happen) and an\n * exception is thrown. */\n while (value) {\n index = -1;\n length = methods.length;\n matched = false;\n\n while (++index < length) {\n name = methods[index];\n method = tokenizers[name];\n\n if (\n method &&\n (!method.onlyAtStart || self.atStart) &&\n (!method.notInList || !self.inList) &&\n (!method.notInBlock || !self.inBlock) &&\n (!method.notInLink || !self.inLink)\n ) {\n valueLength = value.length;\n\n method.apply(self, [eat, value]);\n\n matched = valueLength !== value.length;\n\n if (matched) {\n break;\n }\n }\n }\n\n /* istanbul ignore if */\n if (!matched) {\n self.file.fail(new Error('Infinite loop'), eat.now());\n }\n }\n\n self.eof = now();\n\n return tokens;\n\n /**\n * Update line, column, and offset based on\n * `value`.\n *\n * @example\n * updatePosition('foo');\n *\n * @param {string} subvalue - Subvalue to eat.\n */\n function updatePosition(subvalue) {\n var lastIndex = -1;\n var index = subvalue.indexOf('\\n');\n\n while (index !== -1) {\n line++;\n lastIndex = index;\n index = subvalue.indexOf('\\n', index + 1);\n }\n\n if (lastIndex === -1) {\n column += subvalue.length;\n } else {\n column = subvalue.length - lastIndex;\n }\n\n if (line in offset) {\n if (lastIndex !== -1) {\n column += offset[line];\n } else if (column <= offset[line]) {\n column = offset[line] + 1;\n }\n }\n }\n\n /**\n * Get offset. Called before the first character is\n * eaten to retrieve the range's offsets.\n *\n * @return {Function} - `done`, to be called when\n * the last character is eaten.\n */\n function getOffset() {\n var indentation = [];\n var pos = line + 1;\n\n /**\n * Done. Called when the last character is\n * eaten to retrieve the range’s offsets.\n *\n * @return {Array.<number>} - Offset.\n */\n return function () {\n var last = line + 1;\n\n while (pos < last) {\n indentation.push((offset[pos] || 0) + 1);\n\n pos++;\n }\n\n return indentation;\n };\n }\n\n /**\n * Get the current position.\n *\n * @example\n * position = now(); // {line: 1, column: 1, offset: 0}\n *\n * @return {Object} - Current Position.\n */\n function now() {\n var pos = {line: line, column: column};\n\n pos.offset = self.toOffset(pos);\n\n return pos;\n }\n\n /**\n * Store position information for a node.\n *\n * @example\n * start = now();\n * updatePosition('foo');\n * location = new Position(start);\n * // {\n * // start: {line: 1, column: 1, offset: 0},\n * // end: {line: 1, column: 3, offset: 2}\n * // }\n *\n * @param {Object} start - Starting position.\n */\n function Position(start) {\n this.start = start;\n this.end = now();\n }\n\n /**\n * Throw when a value is incorrectly eaten.\n * This shouldn’t happen but will throw on new,\n * incorrect rules.\n *\n * @example\n * // When the current value is set to `foo bar`.\n * validateEat('foo');\n * eat('foo');\n *\n * validateEat('bar');\n * // throws, because the space is not eaten.\n *\n * @param {string} subvalue - Value to be eaten.\n * @throws {Error} - When `subvalue` cannot be eaten.\n */\n function validateEat(subvalue) {\n /* istanbul ignore if */\n if (value.substring(0, subvalue.length) !== subvalue) {\n /* Capture stack-trace. */\n self.file.fail(\n new Error(\n 'Incorrectly eaten value: please report this ' +\n 'warning on http://git.io/vg5Ft'\n ),\n now()\n );\n }\n }\n\n /**\n * Mark position and patch `node.position`.\n *\n * @example\n * var update = position();\n * updatePosition('foo');\n * update({});\n * // {\n * // position: {\n * // start: {line: 1, column: 1, offset: 0},\n * // end: {line: 1, column: 3, offset: 2}\n * // }\n * // }\n *\n * @returns {Function} - Updater.\n */\n function position() {\n var before = now();\n\n return update;\n\n /**\n * Add the position to a node.\n *\n * @example\n * update({type: 'text', value: 'foo'});\n *\n * @param {Node} node - Node to attach position\n * on.\n * @param {Array} [indent] - Indentation for\n * `node`.\n * @return {Node} - `node`.\n */\n function update(node, indent) {\n var prev = node.position;\n var start = prev ? prev.start : before;\n var combined = [];\n var n = prev && prev.end.line;\n var l = before.line;\n\n node.position = new Position(start);\n\n /* If there was already a `position`, this\n * node was merged. Fixing `start` wasn’t\n * hard, but the indent is different.\n * Especially because some information, the\n * indent between `n` and `l` wasn’t\n * tracked. Luckily, that space is\n * (should be?) empty, so we can safely\n * check for it now. */\n if (prev && indent && prev.indent) {\n combined = prev.indent;\n\n if (n < l) {\n while (++n < l) {\n combined.push((offset[n] || 0) + 1);\n }\n\n combined.push(before.column);\n }\n\n indent = combined.concat(indent);\n }\n\n node.position.indent = indent || [];\n\n return node;\n }\n }\n\n /**\n * Add `node` to `parent`s children or to `tokens`.\n * Performs merges where possible.\n *\n * @example\n * add({});\n *\n * add({}, {children: []});\n *\n * @param {Object} node - Node to add.\n * @param {Object} [parent] - Parent to insert into.\n * @return {Object} - Added or merged into node.\n */\n function add(node, parent) {\n var children = parent ? parent.children : tokens;\n var prev = children[children.length - 1];\n\n if (\n prev &&\n node.type === prev.type &&\n node.type in MERGEABLE_NODES &&\n mergeable(prev) &&\n mergeable(node)\n ) {\n node = MERGEABLE_NODES[node.type].call(self, prev, node);\n }\n\n if (node !== prev) {\n children.push(node);\n }\n\n if (self.atStart && tokens.length !== 0) {\n self.exitStart();\n }\n\n return node;\n }\n\n /**\n * Remove `subvalue` from `value`.\n * `subvalue` must be at the start of `value`.\n *\n * @example\n * eat('foo')({type: 'text', value: 'foo'});\n *\n * @param {string} subvalue - Removed from `value`,\n * and passed to `updatePosition`.\n * @return {Function} - Wrapper around `add`, which\n * also adds `position` to node.\n */\n function eat(subvalue) {\n var indent = getOffset();\n var pos = position();\n var current = now();\n\n validateEat(subvalue);\n\n apply.reset = reset;\n reset.test = test;\n apply.test = test;\n\n value = value.substring(subvalue.length);\n\n updatePosition(subvalue);\n\n indent = indent();\n\n return apply;\n\n /**\n * Add the given arguments, add `position` to\n * the returned node, and return the node.\n *\n * @param {Object} node - Node to add.\n * @param {Object} [parent] - Node to insert into.\n * @return {Node} - Added node.\n */\n function apply(node, parent) {\n return pos(add(pos(node), parent), indent);\n }\n\n /**\n * Functions just like apply, but resets the\n * content: the line and column are reversed,\n * and the eaten value is re-added.\n *\n * This is useful for nodes with a single\n * type of content, such as lists and tables.\n *\n * See `apply` above for what parameters are\n * expected.\n *\n * @return {Node} - Added node.\n */\n function reset() {\n var node = apply.apply(null, arguments);\n\n line = current.line;\n column = current.column;\n value = subvalue + value;\n\n return node;\n }\n\n /**\n * Test the position, after eating, and reverse\n * to a not-eaten state.\n *\n * @return {Position} - Position after eating `subvalue`.\n */\n function test() {\n var result = pos({});\n\n line = current.line;\n column = current.column;\n value = subvalue + value;\n\n return result.position;\n }\n }\n }\n}", "function getToken(word, tokenLength, position)\r\n{\r\n\treturn word.substring(position, position + tokenLength);\r\n}", "function GenTokenParser(){}", "nextToken() {\n\t\t\tif (this.isEOF(this.nextTokenIndex)) {\n\t\t\t\tthis.currentToken = this.eofToken;\n\t\t\t\treturn this.eofToken;\n\t\t\t}\n\n\t\t\tif (this.tokenizing) {\n\t\t\t\tthrow new Error(\"Can't call nextToken while tokenizing\");\n\t\t\t}\n\n\t\t\tconst prevToken = this.currentToken;\n\t\t\tconst [state, nextToken] = this.lookahead();\n\n\t\t\tif (nextToken.end === prevToken.end) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t\"tokenize() returned a token with the same position as the last - Previous token: \" +\n\t\t\t\t\tJSON.stringify(prevToken) +\n\t\t\t\t\t\"; Next token: \" +\n\t\t\t\t\tJSON.stringify(nextToken) +\n\t\t\t\t\t\"; Input: \" +\n\t\t\t\t\tthis.input.slice(0, 100),\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst {line, column} = this.getPositionFromIndex(nextToken.start);\n\t\t\tthis.currLine = line;\n\t\t\tthis.currColumn = column;\n\n\t\t\tthis.nextTokenIndex = nextToken.end;\n\t\t\tthis.prevToken = prevToken;\n\t\t\tthis.currentToken = nextToken;\n\t\t\tthis.state = state;\n\t\t\treturn nextToken;\n\t\t}", "function getLineInfo(input, offset) {\n for (var line = 1, cur = 0;;) {\n var nextBreak = nextLineBreak(input, cur, offset);\n if (nextBreak < 0) { return new Position(line, offset - cur) }\n ++line;\n cur = nextBreak;\n }\n }", "function Token(kind, start, end, line, column, prev, value) {\n this.kind = kind;\n this.start = start;\n this.end = end;\n this.line = line;\n this.column = column;\n this.value = value;\n this.prev = prev;\n this.next = null;\n }", "function Token(kind, start, end, line, column, prev, value) {\n this.kind = kind;\n this.start = start;\n this.end = end;\n this.line = line;\n this.column = column;\n this.value = value;\n this.prev = prev;\n this.next = null;\n }", "function Token(kind, start, end, line, column, prev, value) {\n this.kind = kind;\n this.start = start;\n this.end = end;\n this.line = line;\n this.column = column;\n this.value = value;\n this.prev = prev;\n this.next = null;\n }", "function Token(kind, start, end, line, column, prev, value) {\n this.kind = kind;\n this.start = start;\n this.end = end;\n this.line = line;\n this.column = column;\n this.value = value;\n this.prev = prev;\n this.next = null;\n }", "function Token(kind, start, end, line, column, prev, value) {\n this.kind = kind;\n this.start = start;\n this.end = end;\n this.line = line;\n this.column = column;\n this.value = value;\n this.prev = prev;\n this.next = null;\n }", "function Token(kind, start, end, line, column, prev, value) {\n this.kind = kind;\n this.start = start;\n this.end = end;\n this.line = line;\n this.column = column;\n this.value = value;\n this.prev = prev;\n this.next = null;\n }", "function Token(kind, start, end, line, column, prev, value) {\n this.kind = kind;\n this.start = start;\n this.end = end;\n this.line = line;\n this.column = column;\n this.value = value;\n this.prev = prev;\n this.next = null;\n }", "function Token(kind, start, end, line, column, prev, value) {\n this.kind = kind;\n this.start = start;\n this.end = end;\n this.line = line;\n this.column = column;\n this.value = value;\n this.prev = prev;\n this.next = null;\n }", "function Token(kind, start, end, line, column, prev, value) {\n this.kind = kind;\n this.start = start;\n this.end = end;\n this.line = line;\n this.column = column;\n this.value = value;\n this.prev = prev;\n this.next = null;\n }" ]
[ "0.67839366", "0.66377556", "0.66228", "0.65925443", "0.65925443", "0.65925443", "0.65925443", "0.65925443", "0.65925443", "0.65925443", "0.65925443", "0.65925443", "0.65925443", "0.65925443", "0.65721285", "0.65721285", "0.65721285", "0.65721285", "0.65721285", "0.65526426", "0.65285516", "0.65285516", "0.6480898", "0.6480898", "0.64721924", "0.6453198", "0.6137326", "0.60596985", "0.5998625", "0.5990652", "0.5964562", "0.5931306", "0.58064973", "0.5779311", "0.5771402", "0.5755144", "0.5753961", "0.57416886", "0.56733286", "0.56699324", "0.56696314", "0.56675535", "0.56620413", "0.56620413", "0.56434005", "0.5632606", "0.5619636", "0.5615967", "0.5600378", "0.55977106", "0.55874777", "0.55751455", "0.55724376", "0.5570571", "0.55422056", "0.55392754", "0.553246", "0.553246", "0.553246", "0.553246", "0.553246", "0.55257803", "0.55257803", "0.5524211", "0.5518601", "0.55126196", "0.5506488", "0.54879576", "0.5485745", "0.54842424", "0.54828006", "0.5471408", "0.5469682", "0.5432252", "0.54211086", "0.54180044", "0.54180044", "0.54180044", "0.54180044", "0.54180044", "0.54180044", "0.54180044", "0.54180044", "0.54180044" ]
0.6679065
17
Run the given mode's parser over a line, calling f for each token.
function runMode(cm, text, mode, context, f, lineClasses, forceToEnd) { var flattenSpans = mode.flattenSpans; if (flattenSpans == null) { flattenSpans = cm.options.flattenSpans; } var curStart = 0, curStyle = null; var stream = new StringStream(text, cm.options.tabSize, context), style; var inner = cm.options.addModeClass && [null]; if (text == "") { extractLineClasses(callBlankLine(mode, context.state), lineClasses); } while (!stream.eol()) { if (stream.pos > cm.options.maxHighlightLength) { flattenSpans = false; if (forceToEnd) { processLine(cm, text, context, stream.pos); } stream.pos = text.length; style = null; } else { style = extractLineClasses(readToken(mode, stream, context.state, inner), lineClasses); } if (inner) { var mName = inner[0].name; if (mName) { style = "m-" + (style ? mName + " " + style : mName); } } if (!flattenSpans || curStyle != style) { while (curStart < stream.start) { curStart = Math.min(stream.start, curStart + 5000); f(curStart, curStyle); } curStyle = style; } stream.start = stream.pos; } while (curStart < stream.pos) { // Webkit seems to refuse to render text nodes longer than 57444 // characters, and returns inaccurate measurements in nodes // starting around 5000 chars. var pos = Math.min(stream.pos, curStart + 5000); f(pos, curStyle); curStart = pos; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function runMode(cm, text, mode, state, f) {\n var flattenSpans = cm.options.flattenSpans;\n var curText = \"\", curStyle = null;\n var stream = new StringStream(text, cm.options.tabSize);\n if (text == \"\" && mode.blankLine) mode.blankLine(state);\n while (!stream.eol()) {\n var style = mode.token(stream, state);\n if (stream.pos > 5000) {\n // Webkit seems to refuse to render text nodes longer than 57444 characters\n stream.pos = Math.min(text.length, stream.pos + 50000);\n style = null;\n }\n var substr = stream.current();\n stream.start = stream.pos;\n if (!flattenSpans || curStyle != style) {\n if (curText) f(curText, curStyle);\n curText = substr; curStyle = style;\n } else curText = curText + substr;\n }\n if (curText) f(curText, curStyle);\n }", "function runMode(cm, text, mode, state, f) {\n var flattenSpans = cm.options.flattenSpans;\n var curText = \"\", curStyle = null;\n var stream = new StringStream(text, cm.options.tabSize);\n if (text == \"\" && mode.blankLine) mode.blankLine(state);\n while (!stream.eol()) {\n var style = mode.token(stream, state);\n if (stream.pos > 5000) {\n flattenSpans = false;\n // Webkit seems to refuse to render text nodes longer than 57444 characters\n stream.pos = Math.min(text.length, stream.start + 50000);\n style = null;\n }\n var substr = stream.current();\n stream.start = stream.pos;\n if (!flattenSpans || curStyle != style) {\n if (curText) f(curText, curStyle);\n curText = substr; curStyle = style;\n } else curText = curText + substr;\n }\n if (curText) f(curText, curStyle);\n }", "function runMode(cm, text, mode, state, f) {\n var flattenSpans = cm.options.flattenSpans;\n var curText = \"\", curStyle = null;\n var stream = new StringStream(text, cm.options.tabSize);\n if (text == \"\" && mode.blankLine) mode.blankLine(state);\n while (!stream.eol()) {\n var style = mode.token(stream, state);\n if (stream.pos > 5000) {\n flattenSpans = false;\n // Webkit seems to refuse to render text nodes longer than 57444 characters\n stream.pos = Math.min(text.length, stream.start + 50000);\n style = null;\n }\n var substr = stream.current();\n stream.start = stream.pos;\n if (!flattenSpans || curStyle != style) {\n if (curText) f(curText, curStyle);\n curText = substr; curStyle = style;\n } else curText = curText + substr;\n }\n if (curText) f(curText, curStyle);\n }", "function runMode(cm, text, mode, state, f) {\n var flattenSpans = mode.flattenSpans;\n if (flattenSpans == null) flattenSpans = cm.options.flattenSpans;\n var curStart = 0, curStyle = null;\n var stream = new StringStream(text, cm.options.tabSize), style;\n if (text == \"\" && mode.blankLine) mode.blankLine(state);\n while (!stream.eol()) {\n if (stream.pos > cm.options.maxHighlightLength) {\n flattenSpans = false;\n // Webkit seems to refuse to render text nodes longer than 57444 characters\n stream.pos = Math.min(text.length, stream.start + 50000);\n style = null;\n } else {\n style = mode.token(stream, state);\n }\n if (!flattenSpans || curStyle != style) {\n if (curStart < stream.start) f(stream.start, curStyle);\n curStart = stream.start; curStyle = style;\n }\n stream.start = stream.pos;\n }\n if (curStart < stream.pos) f(stream.pos, curStyle);\n }", "function runMode(cm, text, mode, state, f) {\n var flattenSpans = mode.flattenSpans;\n if (flattenSpans == null) flattenSpans = cm.options.flattenSpans;\n var curStart = 0, curStyle = null;\n var stream = new StringStream(text, cm.options.tabSize), style;\n if (text == \"\" && mode.blankLine) mode.blankLine(state);\n while (!stream.eol()) {\n if (stream.pos > cm.options.maxHighlightLength) {\n flattenSpans = false;\n stream.pos = text.length;\n style = null;\n } else {\n style = mode.token(stream, state);\n }\n if (!flattenSpans || curStyle != style) {\n if (curStart < stream.start) f(stream.start, curStyle);\n curStart = stream.start; curStyle = style;\n }\n stream.start = stream.pos;\n }\n while (curStart < stream.pos) {\n // Webkit seems to refuse to render text nodes longer than 57444 characters\n var pos = Math.min(stream.pos, curStart + 50000);\n f(pos, curStyle);\n curStart = pos;\n }\n }", "function runMode(cm, text, mode, state, f, forceToEnd) {\n var flattenSpans = mode.flattenSpans;\n if (flattenSpans == null) flattenSpans = cm.options.flattenSpans;\n var curStart = 0, curStyle = null;\n var stream = new StringStream(text, cm.options.tabSize), style;\n if (text == \"\" && mode.blankLine) mode.blankLine(state);\n while (!stream.eol()) {\n if (stream.pos > cm.options.maxHighlightLength) {\n flattenSpans = false;\n if (forceToEnd) processLine(cm, text, state, stream.pos);\n stream.pos = text.length;\n style = null;\n } else {\n style = mode.token(stream, state);\n }\n if (!flattenSpans || curStyle != style) {\n if (curStart < stream.start) f(stream.start, curStyle);\n curStart = stream.start; curStyle = style;\n }\n stream.start = stream.pos;\n }\n while (curStart < stream.pos) {\n // Webkit seems to refuse to render text nodes longer than 57444 characters\n var pos = Math.min(stream.pos, curStart + 50000);\n f(pos, curStyle);\n curStart = pos;\n }\n }", "function runMode(cm, text, mode, state, f, forceToEnd) {\n var flattenSpans = mode.flattenSpans;\n if (flattenSpans == null) flattenSpans = cm.options.flattenSpans;\n var curStart = 0, curStyle = null;\n var stream = new StringStream(text, cm.options.tabSize), style;\n if (text == \"\" && mode.blankLine) mode.blankLine(state);\n while (!stream.eol()) {\n if (stream.pos > cm.options.maxHighlightLength) {\n flattenSpans = false;\n if (forceToEnd) processLine(cm, text, state, stream.pos);\n stream.pos = text.length;\n style = null;\n } else {\n style = mode.token(stream, state);\n }\n if (cm.options.addModeClass) {\n var mName = CodeMirror.innerMode(mode, state).mode.name;\n if (mName) style = \"m-\" + (style ? mName + \" \" + style : mName);\n }\n if (!flattenSpans || curStyle != style) {\n if (curStart < stream.start) f(stream.start, curStyle);\n curStart = stream.start; curStyle = style;\n }\n stream.start = stream.pos;\n }\n while (curStart < stream.pos) {\n // Webkit seems to refuse to render text nodes longer than 57444 characters\n var pos = Math.min(stream.pos, curStart + 50000);\n f(pos, curStyle);\n curStart = pos;\n }\n }", "function runMode(cm, text, mode, state, f, lineClasses, forceToEnd) {\n var flattenSpans = mode.flattenSpans;\n if (flattenSpans == null) flattenSpans = cm.options.flattenSpans;\n var curStart = 0, curStyle = null;\n var stream = new StringStream(text, cm.options.tabSize), style;\n if (text == \"\") extractLineClasses(callBlankLine(mode, state), lineClasses);\n while (!stream.eol()) {\n if (stream.pos > cm.options.maxHighlightLength) {\n flattenSpans = false;\n if (forceToEnd) processLine(cm, text, state, stream.pos);\n stream.pos = text.length;\n style = null;\n } else {\n style = extractLineClasses(readToken(mode, stream, state), lineClasses);\n }\n if (cm.options.addModeClass) {\n var mName = CodeMirror.innerMode(mode, state).mode.name;\n if (mName) style = \"m-\" + (style ? mName + \" \" + style : mName);\n }\n if (!flattenSpans || curStyle != style) {\n if (curStart < stream.start) f(stream.start, curStyle);\n curStart = stream.start; curStyle = style;\n }\n stream.start = stream.pos;\n }\n while (curStart < stream.pos) {\n // Webkit seems to refuse to render text nodes longer than 57444 characters\n var pos = Math.min(stream.pos, curStart + 50000);\n f(pos, curStyle);\n curStart = pos;\n }\n }", "function runMode(cm, text, mode, state, f, lineClasses, forceToEnd) {\n var flattenSpans = mode.flattenSpans;\n if (flattenSpans == null) flattenSpans = cm.options.flattenSpans;\n var curStart = 0, curStyle = null;\n var stream = new StringStream(text, cm.options.tabSize), style;\n if (text == \"\") extractLineClasses(callBlankLine(mode, state), lineClasses);\n while (!stream.eol()) {\n if (stream.pos > cm.options.maxHighlightLength) {\n flattenSpans = false;\n if (forceToEnd) processLine(cm, text, state, stream.pos);\n stream.pos = text.length;\n style = null;\n } else {\n style = extractLineClasses(readToken(mode, stream, state), lineClasses);\n }\n if (cm.options.addModeClass) {\n var mName = CodeMirror.innerMode(mode, state).mode.name;\n if (mName) style = \"m-\" + (style ? mName + \" \" + style : mName);\n }\n if (!flattenSpans || curStyle != style) {\n if (curStart < stream.start) f(stream.start, curStyle);\n curStart = stream.start; curStyle = style;\n }\n stream.start = stream.pos;\n }\n while (curStart < stream.pos) {\n // Webkit seems to refuse to render text nodes longer than 57444 characters\n var pos = Math.min(stream.pos, curStart + 50000);\n f(pos, curStyle);\n curStart = pos;\n }\n }", "function runMode(cm, text, mode, state, f, lineClasses, forceToEnd) {\n var flattenSpans = mode.flattenSpans;\n if (flattenSpans == null) flattenSpans = cm.options.flattenSpans;\n var curStart = 0, curStyle = null;\n var stream = new StringStream(text, cm.options.tabSize), style;\n var inner = cm.options.addModeClass && [null];\n if (text == \"\") extractLineClasses(callBlankLine(mode, state), lineClasses);\n while (!stream.eol()) {\n if (stream.pos > cm.options.maxHighlightLength) {\n flattenSpans = false;\n if (forceToEnd) processLine(cm, text, state, stream.pos);\n stream.pos = text.length;\n style = null;\n } else {\n style = extractLineClasses(readToken(mode, stream, state, inner), lineClasses);\n }\n if (inner) {\n var mName = inner[0].name;\n if (mName) style = \"m-\" + (style ? mName + \" \" + style : mName);\n }\n if (!flattenSpans || curStyle != style) {\n if (curStart < stream.start) f(stream.start, curStyle);\n curStart = stream.start; curStyle = style;\n }\n stream.start = stream.pos;\n }\n while (curStart < stream.pos) {\n // Webkit seems to refuse to render text nodes longer than 57444 characters\n var pos = Math.min(stream.pos, curStart + 50000);\n f(pos, curStyle);\n curStart = pos;\n }\n }", "function runMode(cm, text, mode, state, f, lineClasses, forceToEnd) {\r\n var flattenSpans = mode.flattenSpans;\r\n if (flattenSpans == null) flattenSpans = cm.options.flattenSpans;\r\n var curStart = 0, curStyle = null;\r\n var stream = new StringStream(text, cm.options.tabSize), style;\r\n if (text == \"\") extractLineClasses(callBlankLine(mode, state), lineClasses);\r\n while (!stream.eol()) {\r\n if (stream.pos > cm.options.maxHighlightLength) {\r\n flattenSpans = false;\r\n if (forceToEnd) processLine(cm, text, state, stream.pos);\r\n stream.pos = text.length;\r\n style = null;\r\n } else {\r\n style = extractLineClasses(readToken(mode, stream, state), lineClasses);\r\n }\r\n if (cm.options.addModeClass) {\r\n var mName = CodeMirror.innerMode(mode, state).mode.name;\r\n if (mName) style = \"m-\" + (style ? mName + \" \" + style : mName);\r\n }\r\n if (!flattenSpans || curStyle != style) {\r\n if (curStart < stream.start) f(stream.start, curStyle);\r\n curStart = stream.start; curStyle = style;\r\n }\r\n stream.start = stream.pos;\r\n }\r\n while (curStart < stream.pos) {\r\n // Webkit seems to refuse to render text nodes longer than 57444 characters\r\n var pos = Math.min(stream.pos, curStart + 50000);\r\n f(pos, curStyle);\r\n curStart = pos;\r\n }\r\n }", "function runMode(cm, text, mode, context, f, lineClasses, forceToEnd) {\n var flattenSpans = mode.flattenSpans;\n if (flattenSpans == null) { flattenSpans = cm.options.flattenSpans; }\n var curStart = 0, curStyle = null;\n var stream = new StringStream(text, cm.options.tabSize, context), style;\n var inner = cm.options.addModeClass && [null];\n if (text == \"\") { extractLineClasses(callBlankLine(mode, context.state), lineClasses); }\n while (!stream.eol()) {\n if (stream.pos > cm.options.maxHighlightLength) {\n flattenSpans = false;\n if (forceToEnd) { processLine(cm, text, context, stream.pos); }\n stream.pos = text.length;\n style = null;\n } else {\n style = extractLineClasses(readToken(mode, stream, context.state, inner), lineClasses);\n }\n if (inner) {\n var mName = inner[0].name;\n if (mName) { style = \"m-\" + (style ? mName + \" \" + style : mName); }\n }\n if (!flattenSpans || curStyle != style) {\n while (curStart < stream.start) {\n curStart = Math.min(stream.start, curStart + 5000);\n f(curStart, curStyle);\n }\n curStyle = style;\n }\n stream.start = stream.pos;\n }\n while (curStart < stream.pos) {\n // Webkit seems to refuse to render text nodes longer than 57444\n // characters, and returns inaccurate measurements in nodes\n // starting around 5000 chars.\n var pos = Math.min(stream.pos, curStart + 5000);\n f(pos, curStyle);\n curStart = pos;\n }\n}", "function runMode(cm, text, mode, context, f, lineClasses, forceToEnd) {\n var flattenSpans = mode.flattenSpans;\n if (flattenSpans == null) { flattenSpans = cm.options.flattenSpans; }\n var curStart = 0, curStyle = null;\n var stream = new StringStream(text, cm.options.tabSize, context), style;\n var inner = cm.options.addModeClass && [null];\n if (text == \"\") { extractLineClasses(callBlankLine(mode, context.state), lineClasses); }\n while (!stream.eol()) {\n if (stream.pos > cm.options.maxHighlightLength) {\n flattenSpans = false;\n if (forceToEnd) { processLine(cm, text, context, stream.pos); }\n stream.pos = text.length;\n style = null;\n } else {\n style = extractLineClasses(readToken(mode, stream, context.state, inner), lineClasses);\n }\n if (inner) {\n var mName = inner[0].name;\n if (mName) { style = \"m-\" + (style ? mName + \" \" + style : mName); }\n }\n if (!flattenSpans || curStyle != style) {\n while (curStart < stream.start) {\n curStart = Math.min(stream.start, curStart + 5000);\n f(curStart, curStyle);\n }\n curStyle = style;\n }\n stream.start = stream.pos;\n }\n while (curStart < stream.pos) {\n // Webkit seems to refuse to render text nodes longer than 57444\n // characters, and returns inaccurate measurements in nodes\n // starting around 5000 chars.\n var pos = Math.min(stream.pos, curStart + 5000);\n f(pos, curStyle);\n curStart = pos;\n }\n}", "function runMode(cm, text, mode, context, f, lineClasses, forceToEnd) {\n var flattenSpans = mode.flattenSpans;\n if (flattenSpans == null) { flattenSpans = cm.options.flattenSpans; }\n var curStart = 0, curStyle = null;\n var stream = new StringStream(text, cm.options.tabSize, context), style;\n var inner = cm.options.addModeClass && [null];\n if (text == \"\") { extractLineClasses(callBlankLine(mode, context.state), lineClasses); }\n while (!stream.eol()) {\n if (stream.pos > cm.options.maxHighlightLength) {\n flattenSpans = false;\n if (forceToEnd) { processLine(cm, text, context, stream.pos); }\n stream.pos = text.length;\n style = null;\n } else {\n style = extractLineClasses(readToken(mode, stream, context.state, inner), lineClasses);\n }\n if (inner) {\n var mName = inner[0].name;\n if (mName) { style = \"m-\" + (style ? mName + \" \" + style : mName); }\n }\n if (!flattenSpans || curStyle != style) {\n while (curStart < stream.start) {\n curStart = Math.min(stream.start, curStart + 5000);\n f(curStart, curStyle);\n }\n curStyle = style;\n }\n stream.start = stream.pos;\n }\n while (curStart < stream.pos) {\n // Webkit seems to refuse to render text nodes longer than 57444\n // characters, and returns inaccurate measurements in nodes\n // starting around 5000 chars.\n var pos = Math.min(stream.pos, curStart + 5000);\n f(pos, curStyle);\n curStart = pos;\n }\n}", "function runMode(cm, text, mode, context, f, lineClasses, forceToEnd) {\n var flattenSpans = mode.flattenSpans;\n if (flattenSpans == null) { flattenSpans = cm.options.flattenSpans; }\n var curStart = 0, curStyle = null;\n var stream = new StringStream(text, cm.options.tabSize, context), style;\n var inner = cm.options.addModeClass && [null];\n if (text == \"\") { extractLineClasses(callBlankLine(mode, context.state), lineClasses); }\n while (!stream.eol()) {\n if (stream.pos > cm.options.maxHighlightLength) {\n flattenSpans = false;\n if (forceToEnd) { processLine(cm, text, context, stream.pos); }\n stream.pos = text.length;\n style = null;\n } else {\n style = extractLineClasses(readToken(mode, stream, context.state, inner), lineClasses);\n }\n if (inner) {\n var mName = inner[0].name;\n if (mName) { style = \"m-\" + (style ? mName + \" \" + style : mName); }\n }\n if (!flattenSpans || curStyle != style) {\n while (curStart < stream.start) {\n curStart = Math.min(stream.start, curStart + 5000);\n f(curStart, curStyle);\n }\n curStyle = style;\n }\n stream.start = stream.pos;\n }\n while (curStart < stream.pos) {\n // Webkit seems to refuse to render text nodes longer than 57444\n // characters, and returns inaccurate measurements in nodes\n // starting around 5000 chars.\n var pos = Math.min(stream.pos, curStart + 5000);\n f(pos, curStyle);\n curStart = pos;\n }\n}", "function runMode(cm, text, mode, context, f, lineClasses, forceToEnd) {\n var flattenSpans = mode.flattenSpans;\n if (flattenSpans == null) { flattenSpans = cm.options.flattenSpans; }\n var curStart = 0, curStyle = null;\n var stream = new StringStream(text, cm.options.tabSize, context), style;\n var inner = cm.options.addModeClass && [null];\n if (text == \"\") { extractLineClasses(callBlankLine(mode, context.state), lineClasses); }\n while (!stream.eol()) {\n if (stream.pos > cm.options.maxHighlightLength) {\n flattenSpans = false;\n if (forceToEnd) { processLine(cm, text, context, stream.pos); }\n stream.pos = text.length;\n style = null;\n } else {\n style = extractLineClasses(readToken(mode, stream, context.state, inner), lineClasses);\n }\n if (inner) {\n var mName = inner[0].name;\n if (mName) { style = \"m-\" + (style ? mName + \" \" + style : mName); }\n }\n if (!flattenSpans || curStyle != style) {\n while (curStart < stream.start) {\n curStart = Math.min(stream.start, curStart + 5000);\n f(curStart, curStyle);\n }\n curStyle = style;\n }\n stream.start = stream.pos;\n }\n while (curStart < stream.pos) {\n // Webkit seems to refuse to render text nodes longer than 57444\n // characters, and returns inaccurate measurements in nodes\n // starting around 5000 chars.\n var pos = Math.min(stream.pos, curStart + 5000);\n f(pos, curStyle);\n curStart = pos;\n }\n}", "function runMode(cm, text, mode, context, f, lineClasses, forceToEnd) {\n var flattenSpans = mode.flattenSpans;\n if (flattenSpans == null) { flattenSpans = cm.options.flattenSpans; }\n var curStart = 0, curStyle = null;\n var stream = new StringStream(text, cm.options.tabSize, context), style;\n var inner = cm.options.addModeClass && [null];\n if (text == \"\") { extractLineClasses(callBlankLine(mode, context.state), lineClasses); }\n while (!stream.eol()) {\n if (stream.pos > cm.options.maxHighlightLength) {\n flattenSpans = false;\n if (forceToEnd) { processLine(cm, text, context, stream.pos); }\n stream.pos = text.length;\n style = null;\n } else {\n style = extractLineClasses(readToken(mode, stream, context.state, inner), lineClasses);\n }\n if (inner) {\n var mName = inner[0].name;\n if (mName) { style = \"m-\" + (style ? mName + \" \" + style : mName); }\n }\n if (!flattenSpans || curStyle != style) {\n while (curStart < stream.start) {\n curStart = Math.min(stream.start, curStart + 5000);\n f(curStart, curStyle);\n }\n curStyle = style;\n }\n stream.start = stream.pos;\n }\n while (curStart < stream.pos) {\n // Webkit seems to refuse to render text nodes longer than 57444\n // characters, and returns inaccurate measurements in nodes\n // starting around 5000 chars.\n var pos = Math.min(stream.pos, curStart + 5000);\n f(pos, curStyle);\n curStart = pos;\n }\n}", "function runMode(cm, text, mode, context, f, lineClasses, forceToEnd) {\n var flattenSpans = mode.flattenSpans;\n if (flattenSpans == null) { flattenSpans = cm.options.flattenSpans; }\n var curStart = 0, curStyle = null;\n var stream = new StringStream(text, cm.options.tabSize, context), style;\n var inner = cm.options.addModeClass && [null];\n if (text == \"\") { extractLineClasses(callBlankLine(mode, context.state), lineClasses); }\n while (!stream.eol()) {\n if (stream.pos > cm.options.maxHighlightLength) {\n flattenSpans = false;\n if (forceToEnd) { processLine(cm, text, context, stream.pos); }\n stream.pos = text.length;\n style = null;\n } else {\n style = extractLineClasses(readToken(mode, stream, context.state, inner), lineClasses);\n }\n if (inner) {\n var mName = inner[0].name;\n if (mName) { style = \"m-\" + (style ? mName + \" \" + style : mName); }\n }\n if (!flattenSpans || curStyle != style) {\n while (curStart < stream.start) {\n curStart = Math.min(stream.start, curStart + 5000);\n f(curStart, curStyle);\n }\n curStyle = style;\n }\n stream.start = stream.pos;\n }\n while (curStart < stream.pos) {\n // Webkit seems to refuse to render text nodes longer than 57444\n // characters, and returns inaccurate measurements in nodes\n // starting around 5000 chars.\n var pos = Math.min(stream.pos, curStart + 5000);\n f(pos, curStyle);\n curStart = pos;\n }\n}", "function runMode(cm, text, mode, context, f, lineClasses, forceToEnd) {\n var flattenSpans = mode.flattenSpans;\n if (flattenSpans == null) { flattenSpans = cm.options.flattenSpans; }\n var curStart = 0, curStyle = null;\n var stream = new StringStream(text, cm.options.tabSize, context), style;\n var inner = cm.options.addModeClass && [null];\n if (text == \"\") { extractLineClasses(callBlankLine(mode, context.state), lineClasses); }\n while (!stream.eol()) {\n if (stream.pos > cm.options.maxHighlightLength) {\n flattenSpans = false;\n if (forceToEnd) { processLine(cm, text, context, stream.pos); }\n stream.pos = text.length;\n style = null;\n } else {\n style = extractLineClasses(readToken(mode, stream, context.state, inner), lineClasses);\n }\n if (inner) {\n var mName = inner[0].name;\n if (mName) { style = \"m-\" + (style ? mName + \" \" + style : mName); }\n }\n if (!flattenSpans || curStyle != style) {\n while (curStart < stream.start) {\n curStart = Math.min(stream.start, curStart + 5000);\n f(curStart, curStyle);\n }\n curStyle = style;\n }\n stream.start = stream.pos;\n }\n while (curStart < stream.pos) {\n // Webkit seems to refuse to render text nodes longer than 57444\n // characters, and returns inaccurate measurements in nodes\n // starting around 5000 chars.\n var pos = Math.min(stream.pos, curStart + 5000);\n f(pos, curStyle);\n curStart = pos;\n }\n}", "function runMode(cm, text, mode, context, f, lineClasses, forceToEnd) {\n var flattenSpans = mode.flattenSpans;\n if (flattenSpans == null) { flattenSpans = cm.options.flattenSpans; }\n var curStart = 0, curStyle = null;\n var stream = new StringStream(text, cm.options.tabSize, context), style;\n var inner = cm.options.addModeClass && [null];\n if (text == \"\") { extractLineClasses(callBlankLine(mode, context.state), lineClasses); }\n while (!stream.eol()) {\n if (stream.pos > cm.options.maxHighlightLength) {\n flattenSpans = false;\n if (forceToEnd) { processLine(cm, text, context, stream.pos); }\n stream.pos = text.length;\n style = null;\n } else {\n style = extractLineClasses(readToken(mode, stream, context.state, inner), lineClasses);\n }\n if (inner) {\n var mName = inner[0].name;\n if (mName) { style = \"m-\" + (style ? mName + \" \" + style : mName); }\n }\n if (!flattenSpans || curStyle != style) {\n while (curStart < stream.start) {\n curStart = Math.min(stream.start, curStart + 5000);\n f(curStart, curStyle);\n }\n curStyle = style;\n }\n stream.start = stream.pos;\n }\n while (curStart < stream.pos) {\n // Webkit seems to refuse to render text nodes longer than 57444\n // characters, and returns inaccurate measurements in nodes\n // starting around 5000 chars.\n var pos = Math.min(stream.pos, curStart + 5000);\n f(pos, curStyle);\n curStart = pos;\n }\n}", "function runMode(cm, text, mode, context, f, lineClasses, forceToEnd) {\n var flattenSpans = mode.flattenSpans;\n if (flattenSpans == null) { flattenSpans = cm.options.flattenSpans; }\n var curStart = 0, curStyle = null;\n var stream = new StringStream(text, cm.options.tabSize, context), style;\n var inner = cm.options.addModeClass && [null];\n if (text == \"\") { extractLineClasses(callBlankLine(mode, context.state), lineClasses); }\n while (!stream.eol()) {\n if (stream.pos > cm.options.maxHighlightLength) {\n flattenSpans = false;\n if (forceToEnd) { processLine(cm, text, context, stream.pos); }\n stream.pos = text.length;\n style = null;\n } else {\n style = extractLineClasses(readToken(mode, stream, context.state, inner), lineClasses);\n }\n if (inner) {\n var mName = inner[0].name;\n if (mName) { style = \"m-\" + (style ? mName + \" \" + style : mName); }\n }\n if (!flattenSpans || curStyle != style) {\n while (curStart < stream.start) {\n curStart = Math.min(stream.start, curStart + 5000);\n f(curStart, curStyle);\n }\n curStyle = style;\n }\n stream.start = stream.pos;\n }\n while (curStart < stream.pos) {\n // Webkit seems to refuse to render text nodes longer than 57444\n // characters, and returns inaccurate measurements in nodes\n // starting around 5000 chars.\n var pos = Math.min(stream.pos, curStart + 5000);\n f(pos, curStyle);\n curStart = pos;\n }\n}", "function runMode(cm, text, mode, context, f, lineClasses, forceToEnd) {\n var flattenSpans = mode.flattenSpans;\n if (flattenSpans == null) { flattenSpans = cm.options.flattenSpans; }\n var curStart = 0, curStyle = null;\n var stream = new StringStream(text, cm.options.tabSize, context), style;\n var inner = cm.options.addModeClass && [null];\n if (text == \"\") { extractLineClasses(callBlankLine(mode, context.state), lineClasses); }\n while (!stream.eol()) {\n if (stream.pos > cm.options.maxHighlightLength) {\n flattenSpans = false;\n if (forceToEnd) { processLine(cm, text, context, stream.pos); }\n stream.pos = text.length;\n style = null;\n } else {\n style = extractLineClasses(readToken(mode, stream, context.state, inner), lineClasses);\n }\n if (inner) {\n var mName = inner[0].name;\n if (mName) { style = \"m-\" + (style ? mName + \" \" + style : mName); }\n }\n if (!flattenSpans || curStyle != style) {\n while (curStart < stream.start) {\n curStart = Math.min(stream.start, curStart + 5000);\n f(curStart, curStyle);\n }\n curStyle = style;\n }\n stream.start = stream.pos;\n }\n while (curStart < stream.pos) {\n // Webkit seems to refuse to render text nodes longer than 57444\n // characters, and returns inaccurate measurements in nodes\n // starting around 5000 chars.\n var pos = Math.min(stream.pos, curStart + 5000);\n f(pos, curStyle);\n curStart = pos;\n }\n}", "function runMode(cm, text, mode, state, f, lineClasses, forceToEnd) {\n var flattenSpans = mode.flattenSpans\n if (flattenSpans == null) { flattenSpans = cm.options.flattenSpans }\n var curStart = 0, curStyle = null\n var stream = new StringStream(text, cm.options.tabSize), style\n var inner = cm.options.addModeClass && [null]\n if (text == \"\") { extractLineClasses(callBlankLine(mode, state), lineClasses) }\n while (!stream.eol()) {\n if (stream.pos > cm.options.maxHighlightLength) {\n flattenSpans = false\n if (forceToEnd) { processLine(cm, text, state, stream.pos) }\n stream.pos = text.length\n style = null\n } else {\n style = extractLineClasses(readToken(mode, stream, state, inner), lineClasses)\n }\n if (inner) {\n var mName = inner[0].name\n if (mName) { style = \"m-\" + (style ? mName + \" \" + style : mName) }\n }\n if (!flattenSpans || curStyle != style) {\n while (curStart < stream.start) {\n curStart = Math.min(stream.start, curStart + 5000)\n f(curStart, curStyle)\n }\n curStyle = style\n }\n stream.start = stream.pos\n }\n while (curStart < stream.pos) {\n // Webkit seems to refuse to render text nodes longer than 57444\n // characters, and returns inaccurate measurements in nodes\n // starting around 5000 chars.\n var pos = Math.min(stream.pos, curStart + 5000)\n f(pos, curStyle)\n curStart = pos\n }\n}", "function runMode(cm, text, mode, state, f, lineClasses, forceToEnd) {\n var flattenSpans = mode.flattenSpans\n if (flattenSpans == null) { flattenSpans = cm.options.flattenSpans }\n var curStart = 0, curStyle = null\n var stream = new StringStream(text, cm.options.tabSize), style\n var inner = cm.options.addModeClass && [null]\n if (text == \"\") { extractLineClasses(callBlankLine(mode, state), lineClasses) }\n while (!stream.eol()) {\n if (stream.pos > cm.options.maxHighlightLength) {\n flattenSpans = false\n if (forceToEnd) { processLine(cm, text, state, stream.pos) }\n stream.pos = text.length\n style = null\n } else {\n style = extractLineClasses(readToken(mode, stream, state, inner), lineClasses)\n }\n if (inner) {\n var mName = inner[0].name\n if (mName) { style = \"m-\" + (style ? mName + \" \" + style : mName) }\n }\n if (!flattenSpans || curStyle != style) {\n while (curStart < stream.start) {\n curStart = Math.min(stream.start, curStart + 5000)\n f(curStart, curStyle)\n }\n curStyle = style\n }\n stream.start = stream.pos\n }\n while (curStart < stream.pos) {\n // Webkit seems to refuse to render text nodes longer than 57444\n // characters, and returns inaccurate measurements in nodes\n // starting around 5000 chars.\n var pos = Math.min(stream.pos, curStart + 5000)\n f(pos, curStyle)\n curStart = pos\n }\n}", "function runMode(cm, text, mode, context, f, lineClasses, forceToEnd) {\r\n var flattenSpans = mode.flattenSpans;\r\n if (flattenSpans == null) { flattenSpans = cm.options.flattenSpans; }\r\n var curStart = 0, curStyle = null;\r\n var stream = new StringStream(text, cm.options.tabSize, context), style;\r\n var inner = cm.options.addModeClass && [null];\r\n if (text == \"\") { extractLineClasses(callBlankLine(mode, context.state), lineClasses); }\r\n while (!stream.eol()) {\r\n if (stream.pos > cm.options.maxHighlightLength) {\r\n flattenSpans = false;\r\n if (forceToEnd) { processLine(cm, text, context, stream.pos); }\r\n stream.pos = text.length;\r\n style = null;\r\n } else {\r\n style = extractLineClasses(readToken(mode, stream, context.state, inner), lineClasses);\r\n }\r\n if (inner) {\r\n var mName = inner[0].name;\r\n if (mName) { style = \"m-\" + (style ? mName + \" \" + style : mName); }\r\n }\r\n if (!flattenSpans || curStyle != style) {\r\n while (curStart < stream.start) {\r\n curStart = Math.min(stream.start, curStart + 5000);\r\n f(curStart, curStyle);\r\n }\r\n curStyle = style;\r\n }\r\n stream.start = stream.pos;\r\n }\r\n while (curStart < stream.pos) {\r\n // Webkit seems to refuse to render text nodes longer than 57444\r\n // characters, and returns inaccurate measurements in nodes\r\n // starting around 5000 chars.\r\n var pos = Math.min(stream.pos, curStart + 5000);\r\n f(pos, curStyle);\r\n curStart = pos;\r\n }\r\n}", "function runMode(cm, text, mode, state, f, lineClasses, forceToEnd) {\n var flattenSpans = mode.flattenSpans;\n if (flattenSpans == null) flattenSpans = cm.options.flattenSpans;\n var curStart = 0, curStyle = null;\n var stream = new StringStream(text, cm.options.tabSize), style;\n var inner = cm.options.addModeClass && [null];\n if (text == \"\") extractLineClasses(callBlankLine(mode, state), lineClasses);\n while (!stream.eol()) {\n if (stream.pos > cm.options.maxHighlightLength) {\n flattenSpans = false;\n if (forceToEnd) processLine(cm, text, state, stream.pos);\n stream.pos = text.length;\n style = null;\n } else {\n style = extractLineClasses(readToken(mode, stream, state, inner), lineClasses);\n }\n if (inner) {\n var mName = inner[0].name;\n if (mName) style = \"m-\" + (style ? mName + \" \" + style : mName);\n }\n if (!flattenSpans || curStyle != style) {\n while (curStart < stream.start) {\n curStart = Math.min(stream.start, curStart + 50000);\n f(curStart, curStyle);\n }\n curStyle = style;\n }\n stream.start = stream.pos;\n }\n while (curStart < stream.pos) {\n // Webkit seems to refuse to render text nodes longer than 57444 characters\n var pos = Math.min(stream.pos, curStart + 50000);\n f(pos, curStyle);\n curStart = pos;\n }\n }", "function runMode(cm, text, mode, state, f, lineClasses, forceToEnd) {\n var flattenSpans = mode.flattenSpans;\n if (flattenSpans == null) flattenSpans = cm.options.flattenSpans;\n var curStart = 0, curStyle = null;\n var stream = new StringStream(text, cm.options.tabSize), style;\n var inner = cm.options.addModeClass && [null];\n if (text == \"\") extractLineClasses(callBlankLine(mode, state), lineClasses);\n while (!stream.eol()) {\n if (stream.pos > cm.options.maxHighlightLength) {\n flattenSpans = false;\n if (forceToEnd) processLine(cm, text, state, stream.pos);\n stream.pos = text.length;\n style = null;\n } else {\n style = extractLineClasses(readToken(mode, stream, state, inner), lineClasses);\n }\n if (inner) {\n var mName = inner[0].name;\n if (mName) style = \"m-\" + (style ? mName + \" \" + style : mName);\n }\n if (!flattenSpans || curStyle != style) {\n while (curStart < stream.start) {\n curStart = Math.min(stream.start, curStart + 50000);\n f(curStart, curStyle);\n }\n curStyle = style;\n }\n stream.start = stream.pos;\n }\n while (curStart < stream.pos) {\n // Webkit seems to refuse to render text nodes longer than 57444 characters\n var pos = Math.min(stream.pos, curStart + 50000);\n f(pos, curStyle);\n curStart = pos;\n }\n }", "function runMode(cm, text, mode, state, f, lineClasses, forceToEnd) {\n var flattenSpans = mode.flattenSpans;\n if (flattenSpans == null) flattenSpans = cm.options.flattenSpans;\n var curStart = 0, curStyle = null;\n var stream = new StringStream(text, cm.options.tabSize), style;\n var inner = cm.options.addModeClass && [null];\n if (text == \"\") extractLineClasses(callBlankLine(mode, state), lineClasses);\n while (!stream.eol()) {\n if (stream.pos > cm.options.maxHighlightLength) {\n flattenSpans = false;\n if (forceToEnd) processLine(cm, text, state, stream.pos);\n stream.pos = text.length;\n style = null;\n } else {\n style = extractLineClasses(readToken(mode, stream, state, inner), lineClasses);\n }\n if (inner) {\n var mName = inner[0].name;\n if (mName) style = \"m-\" + (style ? mName + \" \" + style : mName);\n }\n if (!flattenSpans || curStyle != style) {\n while (curStart < stream.start) {\n curStart = Math.min(stream.start, curStart + 50000);\n f(curStart, curStyle);\n }\n curStyle = style;\n }\n stream.start = stream.pos;\n }\n while (curStart < stream.pos) {\n // Webkit seems to refuse to render text nodes longer than 57444 characters\n var pos = Math.min(stream.pos, curStart + 50000);\n f(pos, curStyle);\n curStart = pos;\n }\n }", "function runMode(cm, text, mode, state, f, lineClasses, forceToEnd) {\n var flattenSpans = mode.flattenSpans;\n if (flattenSpans == null) flattenSpans = cm.options.flattenSpans;\n var curStart = 0, curStyle = null;\n var stream = new StringStream(text, cm.options.tabSize), style;\n var inner = cm.options.addModeClass && [null];\n if (text == \"\") extractLineClasses(callBlankLine(mode, state), lineClasses);\n while (!stream.eol()) {\n if (stream.pos > cm.options.maxHighlightLength) {\n flattenSpans = false;\n if (forceToEnd) processLine(cm, text, state, stream.pos);\n stream.pos = text.length;\n style = null;\n } else {\n style = extractLineClasses(readToken(mode, stream, state, inner), lineClasses);\n }\n if (inner) {\n var mName = inner[0].name;\n if (mName) style = \"m-\" + (style ? mName + \" \" + style : mName);\n }\n if (!flattenSpans || curStyle != style) {\n while (curStart < stream.start) {\n curStart = Math.min(stream.start, curStart + 50000);\n f(curStart, curStyle);\n }\n curStyle = style;\n }\n stream.start = stream.pos;\n }\n while (curStart < stream.pos) {\n // Webkit seems to refuse to render text nodes longer than 57444 characters\n var pos = Math.min(stream.pos, curStart + 50000);\n f(pos, curStyle);\n curStart = pos;\n }\n }", "function runMode(cm, text, mode, context, f, lineClasses, forceToEnd) {\n\t\t var flattenSpans = mode.flattenSpans;\n\t\t if (flattenSpans == null) { flattenSpans = cm.options.flattenSpans; }\n\t\t var curStart = 0, curStyle = null;\n\t\t var stream = new StringStream(text, cm.options.tabSize, context), style;\n\t\t var inner = cm.options.addModeClass && [null];\n\t\t if (text == \"\") { extractLineClasses(callBlankLine(mode, context.state), lineClasses); }\n\t\t while (!stream.eol()) {\n\t\t if (stream.pos > cm.options.maxHighlightLength) {\n\t\t flattenSpans = false;\n\t\t if (forceToEnd) { processLine(cm, text, context, stream.pos); }\n\t\t stream.pos = text.length;\n\t\t style = null;\n\t\t } else {\n\t\t style = extractLineClasses(readToken(mode, stream, context.state, inner), lineClasses);\n\t\t }\n\t\t if (inner) {\n\t\t var mName = inner[0].name;\n\t\t if (mName) { style = \"m-\" + (style ? mName + \" \" + style : mName); }\n\t\t }\n\t\t if (!flattenSpans || curStyle != style) {\n\t\t while (curStart < stream.start) {\n\t\t curStart = Math.min(stream.start, curStart + 5000);\n\t\t f(curStart, curStyle);\n\t\t }\n\t\t curStyle = style;\n\t\t }\n\t\t stream.start = stream.pos;\n\t\t }\n\t\t while (curStart < stream.pos) {\n\t\t // Webkit seems to refuse to render text nodes longer than 57444\n\t\t // characters, and returns inaccurate measurements in nodes\n\t\t // starting around 5000 chars.\n\t\t var pos = Math.min(stream.pos, curStart + 5000);\n\t\t f(pos, curStyle);\n\t\t curStart = pos;\n\t\t }\n\t\t }", "function runMode(cm, text, mode, state, f, lineClasses, forceToEnd) {\n\t\t var flattenSpans = mode.flattenSpans;\n\t\t if (flattenSpans == null) flattenSpans = cm.options.flattenSpans;\n\t\t var curStart = 0, curStyle = null;\n\t\t var stream = new StringStream(text, cm.options.tabSize), style;\n\t\t var inner = cm.options.addModeClass && [null];\n\t\t if (text == \"\") extractLineClasses(callBlankLine(mode, state), lineClasses);\n\t\t while (!stream.eol()) {\n\t\t if (stream.pos > cm.options.maxHighlightLength) {\n\t\t flattenSpans = false;\n\t\t if (forceToEnd) processLine(cm, text, state, stream.pos);\n\t\t stream.pos = text.length;\n\t\t style = null;\n\t\t } else {\n\t\t style = extractLineClasses(readToken(mode, stream, state, inner), lineClasses);\n\t\t }\n\t\t if (inner) {\n\t\t var mName = inner[0].name;\n\t\t if (mName) style = \"m-\" + (style ? mName + \" \" + style : mName);\n\t\t }\n\t\t if (!flattenSpans || curStyle != style) {\n\t\t while (curStart < stream.start) {\n\t\t curStart = Math.min(stream.start, curStart + 50000);\n\t\t f(curStart, curStyle);\n\t\t }\n\t\t curStyle = style;\n\t\t }\n\t\t stream.start = stream.pos;\n\t\t }\n\t\t while (curStart < stream.pos) {\n\t\t // Webkit seems to refuse to render text nodes longer than 57444 characters\n\t\t var pos = Math.min(stream.pos, curStart + 50000);\n\t\t f(pos, curStyle);\n\t\t curStart = pos;\n\t\t }\n\t\t }", "function runMode(cm, text, mode, state, f, lineClasses, forceToEnd) {\n\t var flattenSpans = mode.flattenSpans;\n\t if (flattenSpans == null) flattenSpans = cm.options.flattenSpans;\n\t var curStart = 0, curStyle = null;\n\t var stream = new StringStream(text, cm.options.tabSize), style;\n\t var inner = cm.options.addModeClass && [null];\n\t if (text == \"\") extractLineClasses(callBlankLine(mode, state), lineClasses);\n\t while (!stream.eol()) {\n\t if (stream.pos > cm.options.maxHighlightLength) {\n\t flattenSpans = false;\n\t if (forceToEnd) processLine(cm, text, state, stream.pos);\n\t stream.pos = text.length;\n\t style = null;\n\t } else {\n\t style = extractLineClasses(readToken(mode, stream, state, inner), lineClasses);\n\t }\n\t if (inner) {\n\t var mName = inner[0].name;\n\t if (mName) style = \"m-\" + (style ? mName + \" \" + style : mName);\n\t }\n\t if (!flattenSpans || curStyle != style) {\n\t while (curStart < stream.start) {\n\t curStart = Math.min(stream.start, curStart + 50000);\n\t f(curStart, curStyle);\n\t }\n\t curStyle = style;\n\t }\n\t stream.start = stream.pos;\n\t }\n\t while (curStart < stream.pos) {\n\t // Webkit seems to refuse to render text nodes longer than 57444 characters\n\t var pos = Math.min(stream.pos, curStart + 50000);\n\t f(pos, curStyle);\n\t curStart = pos;\n\t }\n\t }", "function runMode(cm, text, mode, state, f, lineClasses, forceToEnd) {\n\t var flattenSpans = mode.flattenSpans;\n\t if (flattenSpans == null) flattenSpans = cm.options.flattenSpans;\n\t var curStart = 0, curStyle = null;\n\t var stream = new StringStream(text, cm.options.tabSize), style;\n\t var inner = cm.options.addModeClass && [null];\n\t if (text == \"\") extractLineClasses(callBlankLine(mode, state), lineClasses);\n\t while (!stream.eol()) {\n\t if (stream.pos > cm.options.maxHighlightLength) {\n\t flattenSpans = false;\n\t if (forceToEnd) processLine(cm, text, state, stream.pos);\n\t stream.pos = text.length;\n\t style = null;\n\t } else {\n\t style = extractLineClasses(readToken(mode, stream, state, inner), lineClasses);\n\t }\n\t if (inner) {\n\t var mName = inner[0].name;\n\t if (mName) style = \"m-\" + (style ? mName + \" \" + style : mName);\n\t }\n\t if (!flattenSpans || curStyle != style) {\n\t while (curStart < stream.start) {\n\t curStart = Math.min(stream.start, curStart + 50000);\n\t f(curStart, curStyle);\n\t }\n\t curStyle = style;\n\t }\n\t stream.start = stream.pos;\n\t }\n\t while (curStart < stream.pos) {\n\t // Webkit seems to refuse to render text nodes longer than 57444 characters\n\t var pos = Math.min(stream.pos, curStart + 50000);\n\t f(pos, curStyle);\n\t curStart = pos;\n\t }\n\t }", "function runMode(cm, text, mode, state, f, lineClasses, forceToEnd) {\n\t var flattenSpans = mode.flattenSpans;\n\t if (flattenSpans == null) flattenSpans = cm.options.flattenSpans;\n\t var curStart = 0, curStyle = null;\n\t var stream = new StringStream(text, cm.options.tabSize), style;\n\t var inner = cm.options.addModeClass && [null];\n\t if (text == \"\") extractLineClasses(callBlankLine(mode, state), lineClasses);\n\t while (!stream.eol()) {\n\t if (stream.pos > cm.options.maxHighlightLength) {\n\t flattenSpans = false;\n\t if (forceToEnd) processLine(cm, text, state, stream.pos);\n\t stream.pos = text.length;\n\t style = null;\n\t } else {\n\t style = extractLineClasses(readToken(mode, stream, state, inner), lineClasses);\n\t }\n\t if (inner) {\n\t var mName = inner[0].name;\n\t if (mName) style = \"m-\" + (style ? mName + \" \" + style : mName);\n\t }\n\t if (!flattenSpans || curStyle != style) {\n\t while (curStart < stream.start) {\n\t curStart = Math.min(stream.start, curStart + 5000);\n\t f(curStart, curStyle);\n\t }\n\t curStyle = style;\n\t }\n\t stream.start = stream.pos;\n\t }\n\t while (curStart < stream.pos) {\n\t // Webkit seems to refuse to render text nodes longer than 57444\n\t // characters, and returns inaccurate measurements in nodes\n\t // starting around 5000 chars.\n\t var pos = Math.min(stream.pos, curStart + 5000);\n\t f(pos, curStyle);\n\t curStart = pos;\n\t }\n\t }", "function processLine(cm, line, state) {\n var mode = cm.view.mode;\n var stream = new StringStream(line.text, cm.options.tabSize);\n if (line.text == \"\" && mode.blankLine) mode.blankLine(state);\n while (!stream.eol() && stream.pos <= 5000) {\n mode.token(stream, state);\n stream.start = stream.pos;\n }\n }", "function processLine(cm, line, state) {\n var mode = cm.view.mode;\n var stream = new StringStream(line.text, cm.options.tabSize);\n if (line.text == \"\" && mode.blankLine) mode.blankLine(state);\n while (!stream.eol() && stream.pos <= 5000) {\n mode.token(stream, state);\n stream.start = stream.pos;\n }\n }", "function processLine(cm, line, state) {\n var mode = cm.view.mode;\n var stream = new StringStream(line.text, cm.options.tabSize);\n if (line.text == \"\" && mode.blankLine) mode.blankLine(state);\n while (!stream.eol() && stream.pos <= 5000) {\n mode.token(stream, state);\n stream.start = stream.pos;\n }\n }", "function processLine(cm, text, context, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize, context);\n stream.start = stream.pos = startAt || 0;\n\n if (text == \"\") {\n callBlankLine(mode, context.state);\n }\n\n while (!stream.eol()) {\n readToken(mode, stream, context.state);\n stream.start = stream.pos;\n }\n }", "function processLine(cm, text, context, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize, context);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") { callBlankLine(mode, context.state); }\n while (!stream.eol()) {\n readToken(mode, stream, context.state);\n stream.start = stream.pos;\n }\n }", "function processLine(cm, text, context, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize, context);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") { callBlankLine(mode, context.state); }\n while (!stream.eol()) {\n readToken(mode, stream, context.state);\n stream.start = stream.pos;\n }\n }", "function processLine(cm, text, context, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize, context);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") { callBlankLine(mode, context.state); }\n while (!stream.eol()) {\n readToken(mode, stream, context.state);\n stream.start = stream.pos;\n }\n }", "function processLine(cm, text, context, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize, context);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") { callBlankLine(mode, context.state); }\n while (!stream.eol()) {\n readToken(mode, stream, context.state);\n stream.start = stream.pos;\n }\n }", "function processLine(cm, text, context, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize, context);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") { callBlankLine(mode, context.state); }\n while (!stream.eol()) {\n readToken(mode, stream, context.state);\n stream.start = stream.pos;\n }\n }", "function processLine(cm, text, context, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize, context);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") { callBlankLine(mode, context.state); }\n while (!stream.eol()) {\n readToken(mode, stream, context.state);\n stream.start = stream.pos;\n }\n }", "function processLine(cm, text, context, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize, context);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") { callBlankLine(mode, context.state); }\n while (!stream.eol()) {\n readToken(mode, stream, context.state);\n stream.start = stream.pos;\n }\n }", "function processLine(cm, text, context, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize, context);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") { callBlankLine(mode, context.state); }\n while (!stream.eol()) {\n readToken(mode, stream, context.state);\n stream.start = stream.pos;\n }\n }", "function processLine(cm, text, context, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize, context);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") { callBlankLine(mode, context.state); }\n while (!stream.eol()) {\n readToken(mode, stream, context.state);\n stream.start = stream.pos;\n }\n }", "function processLine(cm, text, context, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize, context);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") { callBlankLine(mode, context.state); }\n while (!stream.eol()) {\n readToken(mode, stream, context.state);\n stream.start = stream.pos;\n }\n }", "function processLine(cm, text, context, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize, context);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") { callBlankLine(mode, context.state); }\n while (!stream.eol()) {\n readToken(mode, stream, context.state);\n stream.start = stream.pos;\n }\n }", "function processLine(cm, text, context, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize, context);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") { callBlankLine(mode, context.state); }\n while (!stream.eol()) {\n readToken(mode, stream, context.state);\n stream.start = stream.pos;\n }\n }", "function processLine(cm, text, context, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize, context);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") { callBlankLine(mode, context.state); }\n while (!stream.eol()) {\n readToken(mode, stream, context.state);\n stream.start = stream.pos;\n }\n }", "function processLine(cm, text, context, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize, context);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") { callBlankLine(mode, context.state); }\n while (!stream.eol()) {\n readToken(mode, stream, context.state);\n stream.start = stream.pos;\n }\n }", "function processLine(cm, text, context, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize, context);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") { callBlankLine(mode, context.state); }\n while (!stream.eol()) {\n readToken(mode, stream, context.state);\n stream.start = stream.pos;\n }\n }", "function processLine(cm, text, context, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize, context);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") { callBlankLine(mode, context.state); }\n while (!stream.eol()) {\n readToken(mode, stream, context.state);\n stream.start = stream.pos;\n }\n }", "function processLine(cm, text, context, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize, context);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") { callBlankLine(mode, context.state); }\n while (!stream.eol()) {\n readToken(mode, stream, context.state);\n stream.start = stream.pos;\n }\n }", "function processLine(cm, line, state) {\n var mode = cm.doc.mode;\n var stream = new StringStream(line.text, cm.options.tabSize);\n if (line.text == \"\" && mode.blankLine) mode.blankLine(state);\n while (!stream.eol() && stream.pos <= cm.options.maxHighlightLength) {\n mode.token(stream, state);\n stream.start = stream.pos;\n }\n }", "function processLine(cm, line, state) {\n var mode = cm.doc.mode;\n var stream = new StringStream(line.text, cm.options.tabSize);\n if (line.text == \"\" && mode.blankLine) mode.blankLine(state);\n while (!stream.eol() && stream.pos <= cm.options.maxHighlightLength) {\n mode.token(stream, state);\n stream.start = stream.pos;\n }\n }", "function processLine(cm, text, state, startAt) {\n var mode = cm.doc.mode\n var stream = new StringStream(text, cm.options.tabSize)\n stream.start = stream.pos = startAt || 0\n if (text == \"\") { callBlankLine(mode, state) }\n while (!stream.eol()) {\n readToken(mode, stream, state)\n stream.start = stream.pos\n }\n}", "function processLine(cm, text, state, startAt) {\n var mode = cm.doc.mode\n var stream = new StringStream(text, cm.options.tabSize)\n stream.start = stream.pos = startAt || 0\n if (text == \"\") { callBlankLine(mode, state) }\n while (!stream.eol()) {\n readToken(mode, stream, state)\n stream.start = stream.pos\n }\n}", "function processLine(cm, text, context, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize, context);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") { callBlankLine(mode, context.state); }\n while (!stream.eol()) {\n readToken(mode, stream, context.state);\n stream.start = stream.pos;\n }\n}", "function processLine(cm, text, context, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize, context);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") { callBlankLine(mode, context.state); }\n while (!stream.eol()) {\n readToken(mode, stream, context.state);\n stream.start = stream.pos;\n }\n}", "function processLine(cm, text, context, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize, context);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") { callBlankLine(mode, context.state); }\n while (!stream.eol()) {\n readToken(mode, stream, context.state);\n stream.start = stream.pos;\n }\n}", "function processLine(cm, text, context, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize, context);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") { callBlankLine(mode, context.state); }\n while (!stream.eol()) {\n readToken(mode, stream, context.state);\n stream.start = stream.pos;\n }\n}", "function processLine(cm, text, context, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize, context);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") { callBlankLine(mode, context.state); }\n while (!stream.eol()) {\n readToken(mode, stream, context.state);\n stream.start = stream.pos;\n }\n}", "function processLine(cm, text, context, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize, context);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") { callBlankLine(mode, context.state); }\n while (!stream.eol()) {\n readToken(mode, stream, context.state);\n stream.start = stream.pos;\n }\n}", "function processLine(cm, text, context, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize, context);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") { callBlankLine(mode, context.state); }\n while (!stream.eol()) {\n readToken(mode, stream, context.state);\n stream.start = stream.pos;\n }\n}", "function processLine(cm, text, context, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize, context);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") { callBlankLine(mode, context.state); }\n while (!stream.eol()) {\n readToken(mode, stream, context.state);\n stream.start = stream.pos;\n }\n}", "function processLine(cm, text, context, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize, context);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") { callBlankLine(mode, context.state); }\n while (!stream.eol()) {\n readToken(mode, stream, context.state);\n stream.start = stream.pos;\n }\n}", "function processLine(cm, text, context, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize, context);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") { callBlankLine(mode, context.state); }\n while (!stream.eol()) {\n readToken(mode, stream, context.state);\n stream.start = stream.pos;\n }\n}", "function processLine(cm, text, context, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize, context);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") { callBlankLine(mode, context.state); }\n while (!stream.eol()) {\n readToken(mode, stream, context.state);\n stream.start = stream.pos;\n }\n}", "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 processLine(cm, text, context, startAt) {\r\n var mode = cm.doc.mode;\r\n var stream = new StringStream(text, cm.options.tabSize, context);\r\n stream.start = stream.pos = startAt || 0;\r\n if (text == \"\") { callBlankLine(mode, context.state); }\r\n while (!stream.eol()) {\r\n readToken(mode, stream, context.state);\r\n stream.start = stream.pos;\r\n }\r\n}", "function processLine(cm, text, state, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") callBlankLine(mode, state);\n while (!stream.eol()) {\n readToken(mode, stream, state);\n stream.start = stream.pos;\n }\n }", "function processLine(cm, text, state, startAt) {\n\t var mode = cm.doc.mode;\n\t var stream = new StringStream(text, cm.options.tabSize);\n\t stream.start = stream.pos = startAt || 0;\n\t if (text == \"\") callBlankLine(mode, state);\n\t while (!stream.eol()) {\n\t readToken(mode, stream, state);\n\t stream.start = stream.pos;\n\t }\n\t }", "function processLine(cm, text, state, startAt) {\n\t var mode = cm.doc.mode;\n\t var stream = new StringStream(text, cm.options.tabSize);\n\t stream.start = stream.pos = startAt || 0;\n\t if (text == \"\") callBlankLine(mode, state);\n\t while (!stream.eol()) {\n\t readToken(mode, stream, state);\n\t stream.start = stream.pos;\n\t }\n\t }", "function processLine(cm, text, state, startAt) {\n\t var mode = cm.doc.mode;\n\t var stream = new StringStream(text, cm.options.tabSize);\n\t stream.start = stream.pos = startAt || 0;\n\t if (text == \"\") callBlankLine(mode, state);\n\t while (!stream.eol()) {\n\t readToken(mode, stream, state);\n\t stream.start = stream.pos;\n\t }\n\t }", "function processLine(cm, text, state, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\" && mode.blankLine) mode.blankLine(state);\n while (!stream.eol() && stream.pos <= cm.options.maxHighlightLength) {\n mode.token(stream, state);\n stream.start = stream.pos;\n }\n }", "function processLine(cm, text, state, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\" && mode.blankLine) mode.blankLine(state);\n while (!stream.eol() && stream.pos <= cm.options.maxHighlightLength) {\n mode.token(stream, state);\n stream.start = stream.pos;\n }\n }", "function processLine(cm, text, state, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") callBlankLine(mode, state);\n while (!stream.eol() && stream.pos <= cm.options.maxHighlightLength) {\n readToken(mode, stream, state);\n stream.start = stream.pos;\n }\n }", "function processLine(cm, text, state, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") callBlankLine(mode, state);\n while (!stream.eol() && stream.pos <= cm.options.maxHighlightLength) {\n readToken(mode, stream, state);\n stream.start = stream.pos;\n }\n }", "function processLine(cm, text, state, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") callBlankLine(mode, state);\n while (!stream.eol() && stream.pos <= cm.options.maxHighlightLength) {\n readToken(mode, stream, state);\n stream.start = stream.pos;\n }\n }", "function processLine(cm, text, state, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") callBlankLine(mode, state);\n while (!stream.eol() && stream.pos <= cm.options.maxHighlightLength) {\n readToken(mode, stream, state);\n stream.start = stream.pos;\n }\n }", "function processLine(cm, text, state, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") callBlankLine(mode, state);\n while (!stream.eol() && stream.pos <= cm.options.maxHighlightLength) {\n readToken(mode, stream, state);\n stream.start = stream.pos;\n }\n }", "function processLine(cm, text, state, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") callBlankLine(mode, state);\n while (!stream.eol() && stream.pos <= cm.options.maxHighlightLength) {\n readToken(mode, stream, state);\n stream.start = stream.pos;\n }\n }" ]
[ "0.6838197", "0.6827097", "0.6827097", "0.67748964", "0.66096807", "0.64827806", "0.6438834", "0.63332313", "0.63332313", "0.6289509", "0.6289127", "0.6215229", "0.6215229", "0.6215229", "0.6215229", "0.6215229", "0.6215229", "0.6215229", "0.6215229", "0.6215229", "0.6215229", "0.6215229", "0.6205357", "0.6205357", "0.6193113", "0.6190139", "0.6190139", "0.6190139", "0.6190139", "0.61424494", "0.6094651", "0.608618", "0.608618", "0.60752887", "0.5464678", "0.5464678", "0.5464678", "0.54216754", "0.54178977", "0.54178977", "0.54178977", "0.54178977", "0.54178977", "0.54178977", "0.54178977", "0.54178977", "0.54178977", "0.54178977", "0.54178977", "0.54178977", "0.54178977", "0.54178977", "0.54178977", "0.54178977", "0.54178977", "0.5383871", "0.5383871", "0.5378692", "0.5378692", "0.53629404", "0.53629404", "0.53629404", "0.53629404", "0.53629404", "0.53629404", "0.53629404", "0.53629404", "0.53629404", "0.53629404", "0.53629404", "0.5328053", "0.53175855", "0.5302803", "0.52870095", "0.52870095", "0.52870095", "0.5261471", "0.5261471", "0.5233219", "0.5233219", "0.5233219", "0.5233219", "0.5233219", "0.5233219" ]
0.6225963
25
Finds the line to start with when starting a parse. Tries to find a line with a stateAfter, so that it can start with a valid state. If that fails, it returns the line with the smallest indentation, which tends to need the least context to parse correctly.
function findStartLine(cm, n, precise) { var minindent, minline, doc = cm.doc; var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100); for (var search = n; search > lim; --search) { if (search <= doc.first) { return doc.first } var line = getLine(doc, search - 1), after = line.stateAfter; if (after && (!precise || search + (after instanceof SavedContext ? after.lookAhead : 0) <= doc.modeFrontier)) { return search } var indented = countColumn(line.text, null, cm.options.tabSize); if (minline == null || minindent > indented) { minline = search - 1; minindent = indented; } } return minline }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findStartLine(n) {\n var minindent, minline;\n for (var search = n, lim = n - 40; search > lim; --search) {\n if (search == 0) return 0;\n var line = lines[search-1];\n if (line.stateAfter) return search;\n var indented = line.indentation();\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline;\n }", "function findStartLine(n) {\n var minindent, minline;\n for (var search = n, lim = n - 40; search > lim; --search) {\n if (search == 0) return 0;\n var line = lines[search-1];\n if (line.stateAfter) return search;\n var indented = line.indentation();\n if (minline == null || minindent > indented) {\n minline = search;\n minindent = indented;\n }\n }\n return minline;\n }", "function findStartLine(n) {\n var minindent, minline;\n for (var search = n, lim = n - 40; search > lim; --search) {\n if (search == 0) return 0;\n var line = lines[search-1];\n if (line.stateAfter) return search;\n var indented = line.indentation();\n if (minline == null || minindent > indented) {\n minline = search;\n minindent = indented;\n }\n }\n return minline;\n }", "function find_start_line() {\n // TODO:\n return 0\n}", "function findStartLine(n) {\n var minindent, minline;\n for (var search = n, lim = n - 40; search > lim; --search) {\n if (search == 0) return 0;\n var line = getLine(search-1);\n if (line.stateAfter) return search;\n var indented = line.indentation(options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline;\n }", "function findStartLine(n) {\n var minindent, minline;\n for (var search = n, lim = n - 40; search > lim; --search) {\n if (search == 0) return 0;\n var line = getLine(search-1);\n if (line.stateAfter) return search;\n var indented = line.indentation(options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline;\n }", "function findStartLine(n) {\n var minindent, minline;\n for (var search = n, lim = n - 40; search > lim; --search) {\n if (search == 0) return 0;\n var line = getLine(search-1);\n if (line.stateAfter) return search;\n var indented = line.indentation(options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline;\n }", "function findStartLine(n) {\n var minindent, minline;\n for (var search = n, lim = n - 40; search > lim; --search) {\n if (search == 0) return 0;\n var line = getLine(search-1);\n if (line.stateAfter) return search;\n var indented = line.indentation(options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline;\n }", "function findStartLine(cm, n, precise) {\n\t\t var minindent, minline, doc = cm.doc;\n\t\t var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n\t\t for (var search = n; search > lim; --search) {\n\t\t if (search <= doc.first) { return doc.first }\n\t\t var line = getLine(doc, search - 1), after = line.stateAfter;\n\t\t if (after && (!precise || search + (after instanceof SavedContext ? after.lookAhead : 0) <= doc.modeFrontier))\n\t\t { return search }\n\t\t var indented = countColumn(line.text, null, cm.options.tabSize);\n\t\t if (minline == null || minindent > indented) {\n\t\t minline = search - 1;\n\t\t minindent = indented;\n\t\t }\n\t\t }\n\t\t return minline\n\t\t }", "function findStartLine(cm, n) {\n var minindent, minline, doc = cm.view.doc;\n for (var search = n, lim = n - 100; search > lim; --search) {\n if (search == 0) return 0;\n var line = getLine(doc, search-1);\n if (line.stateAfter) return search;\n var indented = countColumn(line.text, null, cm.options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline;\n }", "function findStartLine(cm, n) {\n var minindent, minline, doc = cm.view.doc;\n for (var search = n, lim = n - 100; search > lim; --search) {\n if (search == 0) return 0;\n var line = getLine(doc, search-1);\n if (line.stateAfter) return search;\n var indented = countColumn(line.text, null, cm.options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline;\n }", "function findStartLine(cm, n) {\n var minindent, minline, doc = cm.view.doc;\n for (var search = n, lim = n - 100; search > lim; --search) {\n if (search == 0) return 0;\n var line = getLine(doc, search-1);\n if (line.stateAfter) return search;\n var indented = countColumn(line.text, null, cm.options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline;\n }", "function findStartLine(cm, n, precise) {\n var minindent,\n minline,\n doc = cm.doc;\n var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n\n for (var search = n; search > lim; --search) {\n if (search <= doc.first) {\n return doc.first;\n }\n\n var line = getLine(doc, search - 1),\n after = line.stateAfter;\n\n if (after && (!precise || search + (after instanceof SavedContext ? after.lookAhead : 0) <= doc.modeFrontier)) {\n return search;\n }\n\n var indented = countColumn(line.text, null, cm.options.tabSize);\n\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n\n return minline;\n }", "function findStartLine(cm, n, precise) {\n var minindent, minline, doc = cm.doc;\n var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n for (var search = n; search > lim; --search) {\n if (search <= doc.first) { return doc.first }\n var line = getLine(doc, search - 1), after = line.stateAfter;\n if (after && (!precise || search + (after instanceof SavedContext ? after.lookAhead : 0) <= doc.modeFrontier))\n { return search }\n var indented = countColumn(line.text, null, cm.options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline\n}", "function findStartLine(cm, n, precise) {\n var minindent, minline, doc = cm.doc;\n var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n for (var search = n; search > lim; --search) {\n if (search <= doc.first) { return doc.first }\n var line = getLine(doc, search - 1), after = line.stateAfter;\n if (after && (!precise || search + (after instanceof SavedContext ? after.lookAhead : 0) <= doc.modeFrontier))\n { return search }\n var indented = countColumn(line.text, null, cm.options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline\n}", "function findStartLine(cm, n, precise) {\n var minindent, minline, doc = cm.doc;\n var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n for (var search = n; search > lim; --search) {\n if (search <= doc.first) { return doc.first }\n var line = getLine(doc, search - 1), after = line.stateAfter;\n if (after && (!precise || search + (after instanceof SavedContext ? after.lookAhead : 0) <= doc.modeFrontier))\n { return search }\n var indented = countColumn(line.text, null, cm.options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline\n}", "function findStartLine(cm, n, precise) {\n var minindent, minline, doc = cm.doc;\n var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n for (var search = n; search > lim; --search) {\n if (search <= doc.first) { return doc.first }\n var line = getLine(doc, search - 1), after = line.stateAfter;\n if (after && (!precise || search + (after instanceof SavedContext ? after.lookAhead : 0) <= doc.modeFrontier))\n { return search }\n var indented = countColumn(line.text, null, cm.options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline\n}", "function findStartLine(cm, n, precise) {\n var minindent, minline, doc = cm.doc;\n var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n for (var search = n; search > lim; --search) {\n if (search <= doc.first) { return doc.first }\n var line = getLine(doc, search - 1), after = line.stateAfter;\n if (after && (!precise || search + (after instanceof SavedContext ? after.lookAhead : 0) <= doc.modeFrontier))\n { return search }\n var indented = countColumn(line.text, null, cm.options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline\n}", "function findStartLine(cm, n, precise) {\n var minindent, minline, doc = cm.doc;\n var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n for (var search = n; search > lim; --search) {\n if (search <= doc.first) { return doc.first }\n var line = getLine(doc, search - 1), after = line.stateAfter;\n if (after && (!precise || search + (after instanceof SavedContext ? after.lookAhead : 0) <= doc.modeFrontier))\n { return search }\n var indented = countColumn(line.text, null, cm.options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline\n}", "function findStartLine(cm, n, precise) {\n var minindent, minline, doc = cm.doc;\n var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n for (var search = n; search > lim; --search) {\n if (search <= doc.first) { return doc.first }\n var line = getLine(doc, search - 1), after = line.stateAfter;\n if (after && (!precise || search + (after instanceof SavedContext ? after.lookAhead : 0) <= doc.modeFrontier))\n { return search }\n var indented = countColumn(line.text, null, cm.options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline\n}", "function findStartLine(cm, n, precise) {\n var minindent, minline, doc = cm.doc;\n var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n for (var search = n; search > lim; --search) {\n if (search <= doc.first) { return doc.first }\n var line = getLine(doc, search - 1), after = line.stateAfter;\n if (after && (!precise || search + (after instanceof SavedContext ? after.lookAhead : 0) <= doc.modeFrontier))\n { return search }\n var indented = countColumn(line.text, null, cm.options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline\n}", "function findStartLine(cm, n, precise) {\n var minindent, minline, doc = cm.doc;\n var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n for (var search = n; search > lim; --search) {\n if (search <= doc.first) { return doc.first }\n var line = getLine(doc, search - 1), after = line.stateAfter;\n if (after && (!precise || search + (after instanceof SavedContext ? after.lookAhead : 0) <= doc.modeFrontier))\n { return search }\n var indented = countColumn(line.text, null, cm.options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline\n}", "function findStartLine(cm, n, precise) {\n var minindent, minline, doc = cm.doc;\n var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n for (var search = n; search > lim; --search) {\n if (search <= doc.first) { return doc.first }\n var line = getLine(doc, search - 1), after = line.stateAfter;\n if (after && (!precise || search + (after instanceof SavedContext ? after.lookAhead : 0) <= doc.modeFrontier))\n { return search }\n var indented = countColumn(line.text, null, cm.options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline\n}", "function findStartLine(cm, n, precise) {\n var minindent, minline, doc = cm.doc;\n var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n for (var search = n; search > lim; --search) {\n if (search <= doc.first) { return doc.first }\n var line = getLine(doc, search - 1), after = line.stateAfter;\n if (after && (!precise || search + (after instanceof SavedContext ? after.lookAhead : 0) <= doc.modeFrontier))\n { return search }\n var indented = countColumn(line.text, null, cm.options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline\n}", "function findStartLine(cm, n, precise) {\r\n var minindent, minline, doc = cm.doc;\r\n var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\r\n for (var search = n; search > lim; --search) {\r\n if (search <= doc.first) { return doc.first }\r\n var line = getLine(doc, search - 1), after = line.stateAfter;\r\n if (after && (!precise || search + (after instanceof SavedContext ? after.lookAhead : 0) <= doc.modeFrontier))\r\n { return search }\r\n var indented = countColumn(line.text, null, cm.options.tabSize);\r\n if (minline == null || minindent > indented) {\r\n minline = search - 1;\r\n minindent = indented;\r\n }\r\n }\r\n return minline\r\n}", "function findStartLine(cm, n, precise) {\n var minindent, minline, doc = cm.doc;\n for (var search = n, lim = n - 100; search > lim; --search) {\n if (search <= doc.first) return doc.first;\n var line = getLine(doc, search - 1);\n if (line.stateAfter && (!precise || search <= doc.frontier)) return search;\n var indented = countColumn(line.text, null, cm.options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline;\n }", "function findStartLine(cm, n, precise) {\n var minindent, minline, doc = cm.doc;\n var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n for (var search = n; search > lim; --search) {\n if (search <= doc.first) return doc.first;\n var line = getLine(doc, search - 1);\n if (line.stateAfter && (!precise || search <= doc.frontier)) return search;\n var indented = countColumn(line.text, null, cm.options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline;\n }", "function findStartLine(cm, n, precise) {\n var minindent, minline, doc = cm.doc;\n var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n for (var search = n; search > lim; --search) {\n if (search <= doc.first) return doc.first;\n var line = getLine(doc, search - 1);\n if (line.stateAfter && (!precise || search <= doc.frontier)) return search;\n var indented = countColumn(line.text, null, cm.options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline;\n }", "function findStartLine(cm, n, precise) {\n var minindent, minline, doc = cm.doc;\n var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n for (var search = n; search > lim; --search) {\n if (search <= doc.first) return doc.first;\n var line = getLine(doc, search - 1);\n if (line.stateAfter && (!precise || search <= doc.frontier)) return search;\n var indented = countColumn(line.text, null, cm.options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline;\n }", "function findStartLine(cm, n, precise) {\n var minindent, minline, doc = cm.doc;\n var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n for (var search = n; search > lim; --search) {\n if (search <= doc.first) return doc.first;\n var line = getLine(doc, search - 1);\n if (line.stateAfter && (!precise || search <= doc.frontier)) return search;\n var indented = countColumn(line.text, null, cm.options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline;\n }", "function findStartLine(cm, n, precise) {\n var minindent, minline, doc = cm.doc;\n var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n for (var search = n; search > lim; --search) {\n if (search <= doc.first) return doc.first;\n var line = getLine(doc, search - 1);\n if (line.stateAfter && (!precise || search <= doc.frontier)) return search;\n var indented = countColumn(line.text, null, cm.options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline;\n }", "function findStartLine(cm, n, precise) {\n var minindent, minline, doc = cm.doc;\n var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n for (var search = n; search > lim; --search) {\n if (search <= doc.first) return doc.first;\n var line = getLine(doc, search - 1);\n if (line.stateAfter && (!precise || search <= doc.frontier)) return search;\n var indented = countColumn(line.text, null, cm.options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline;\n }", "function findStartLine(cm, n, precise) {\n var minindent, minline, doc = cm.doc;\n var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n for (var search = n; search > lim; --search) {\n if (search <= doc.first) return doc.first;\n var line = getLine(doc, search - 1);\n if (line.stateAfter && (!precise || search <= doc.frontier)) return search;\n var indented = countColumn(line.text, null, cm.options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline;\n }", "function findStartLine(cm, n, precise) {\n var minindent, minline, doc = cm.doc;\n var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n for (var search = n; search > lim; --search) {\n if (search <= doc.first) return doc.first;\n var line = getLine(doc, search - 1);\n if (line.stateAfter && (!precise || search <= doc.frontier)) return search;\n var indented = countColumn(line.text, null, cm.options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline;\n }", "function findStartLine(cm, n, precise) {\n var minindent, minline, doc = cm.doc;\n var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n for (var search = n; search > lim; --search) {\n if (search <= doc.first) return doc.first;\n var line = getLine(doc, search - 1);\n if (line.stateAfter && (!precise || search <= doc.frontier)) return search;\n var indented = countColumn(line.text, null, cm.options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline;\n }", "function findStartLine(cm, n, precise) {\n var minindent, minline, doc = cm.doc;\n var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n for (var search = n; search > lim; --search) {\n if (search <= doc.first) return doc.first;\n var line = getLine(doc, search - 1);\n if (line.stateAfter && (!precise || search <= doc.frontier)) return search;\n var indented = countColumn(line.text, null, cm.options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline;\n }", "function findStartLine(cm, n, precise) {\n var minindent, minline, doc = cm.doc;\n var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n for (var search = n; search > lim; --search) {\n if (search <= doc.first) return doc.first;\n var line = getLine(doc, search - 1);\n if (line.stateAfter && (!precise || search <= doc.frontier)) return search;\n var indented = countColumn(line.text, null, cm.options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline;\n }", "function findStartLine(cm, n, precise) {\n\t\t var minindent, minline, doc = cm.doc;\n\t\t var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n\t\t for (var search = n; search > lim; --search) {\n\t\t if (search <= doc.first) return doc.first;\n\t\t var line = getLine(doc, search - 1);\n\t\t if (line.stateAfter && (!precise || search <= doc.frontier)) return search;\n\t\t var indented = countColumn(line.text, null, cm.options.tabSize);\n\t\t if (minline == null || minindent > indented) {\n\t\t minline = search - 1;\n\t\t minindent = indented;\n\t\t }\n\t\t }\n\t\t return minline;\n\t\t }", "function findStartLine(cm, n, precise) {\n var minindent, minline, doc = cm.doc\n var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100)\n for (var search = n; search > lim; --search) {\n if (search <= doc.first) { return doc.first }\n var line = getLine(doc, search - 1)\n if (line.stateAfter && (!precise || search <= doc.frontier)) { return search }\n var indented = countColumn(line.text, null, cm.options.tabSize)\n if (minline == null || minindent > indented) {\n minline = search - 1\n minindent = indented\n }\n }\n return minline\n}", "function findStartLine(cm, n, precise) {\n var minindent, minline, doc = cm.doc\n var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100)\n for (var search = n; search > lim; --search) {\n if (search <= doc.first) { return doc.first }\n var line = getLine(doc, search - 1)\n if (line.stateAfter && (!precise || search <= doc.frontier)) { return search }\n var indented = countColumn(line.text, null, cm.options.tabSize)\n if (minline == null || minindent > indented) {\n minline = search - 1\n minindent = indented\n }\n }\n return minline\n}", "function findStartLine(cm, n, precise) {\r\n var minindent, minline, doc = cm.doc;\r\n var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\r\n for (var search = n; search > lim; --search) {\r\n if (search <= doc.first) return doc.first;\r\n var line = getLine(doc, search - 1);\r\n if (line.stateAfter && (!precise || search <= doc.frontier)) return search;\r\n var indented = countColumn(line.text, null, cm.options.tabSize);\r\n if (minline == null || minindent > indented) {\r\n minline = search - 1;\r\n minindent = indented;\r\n }\r\n }\r\n return minline;\r\n }", "function findStartLine(cm, n, precise) {\n\t var minindent, minline, doc = cm.doc;\n\t var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n\t for (var search = n; search > lim; --search) {\n\t if (search <= doc.first) return doc.first;\n\t var line = getLine(doc, search - 1);\n\t if (line.stateAfter && (!precise || search <= doc.frontier)) return search;\n\t var indented = countColumn(line.text, null, cm.options.tabSize);\n\t if (minline == null || minindent > indented) {\n\t minline = search - 1;\n\t minindent = indented;\n\t }\n\t }\n\t return minline;\n\t }", "function findStartLine(cm, n, precise) {\n\t var minindent, minline, doc = cm.doc;\n\t var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n\t for (var search = n; search > lim; --search) {\n\t if (search <= doc.first) return doc.first;\n\t var line = getLine(doc, search - 1);\n\t if (line.stateAfter && (!precise || search <= doc.frontier)) return search;\n\t var indented = countColumn(line.text, null, cm.options.tabSize);\n\t if (minline == null || minindent > indented) {\n\t minline = search - 1;\n\t minindent = indented;\n\t }\n\t }\n\t return minline;\n\t }", "function findStartLine(cm, n, precise) {\n\t var minindent, minline, doc = cm.doc;\n\t var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n\t for (var search = n; search > lim; --search) {\n\t if (search <= doc.first) return doc.first;\n\t var line = getLine(doc, search - 1);\n\t if (line.stateAfter && (!precise || search <= doc.frontier)) return search;\n\t var indented = countColumn(line.text, null, cm.options.tabSize);\n\t if (minline == null || minindent > indented) {\n\t minline = search - 1;\n\t minindent = indented;\n\t }\n\t }\n\t return minline;\n\t }", "function startLine(token) {\n return token.startLine || token.line;\n }", "get lineBegin() {\n\t\treturn this.state.lineBegin;\n\t}", "matchBefore(expr) {\n let line = this.state.doc.lineAt(this.pos);\n let start = Math.max(line.from, this.pos - 250);\n let str = line.text.slice(start - line.from, this.pos - line.from);\n let found = str.search(ensureAnchor(expr, false));\n return found < 0 ? null : { from: start + found, to: this.pos, text: str.slice(found) };\n }", "function getBeginningOfLineOffset(node) {\n return node.position.start.offset - node.position.start.column + 1;\n}", "function lineStart(area) {\n area.pos = area.pos || pos(area);\n return pos - linePos(area);\n }", "getPrecedingValidLine(model, lineNumber, indentRulesSupport) {\r\n let languageID = model.getLanguageIdAtPosition(lineNumber, 0);\r\n if (lineNumber > 1) {\r\n let lastLineNumber;\r\n let resultLineNumber = -1;\r\n for (lastLineNumber = lineNumber - 1; lastLineNumber >= 1; lastLineNumber--) {\r\n if (model.getLanguageIdAtPosition(lastLineNumber, 0) !== languageID) {\r\n return resultLineNumber;\r\n }\r\n let text = model.getLineContent(lastLineNumber);\r\n if (indentRulesSupport.shouldIgnore(text) || /^\\s+$/.test(text) || text === '') {\r\n resultLineNumber = lastLineNumber;\r\n continue;\r\n }\r\n return lastLineNumber;\r\n }\r\n }\r\n return -1;\r\n }", "before(depth) {\n depth = this.resolveDepth(depth);\n if (!depth)\n throw new RangeError(\"There is no position before the top-level node\");\n return depth == this.depth + 1 ? this.pos : this.path[depth * 3 - 1];\n }", "function getLocation(source, position) {\n let lastLineStart = 0;\n let line = 1;\n\n for (const match of source.body.matchAll(LineRegExp)) {\n typeof match.index === 'number' || invariant(false);\n\n if (match.index >= position) {\n break;\n }\n\n lastLineStart = match.index + match[0].length;\n line += 1;\n }\n\n return {\n line,\n column: position + 1 - lastLineStart,\n };\n}", "function updateParserState(line, state) {\n if (!state.inMultilineDirective) {\n const maybeStatement = reStatementWord.exec(line);\n if (maybeStatement) {\n const currentVerb = maybeStatement[1];\n const inMultilineDirective = !!maybeStatement[2]; // whether we found \"(\"\n if (inMultilineDirective) {\n return { inMultilineDirective, currentVerb, lineRemainder: null };\n }\n else {\n return { inMultilineDirective, currentVerb,\n lineRemainder: line.substr(currentVerb.length + 1).trim() };\n }\n }\n else {\n const lineNoComment = reLineWithComments.exec(line)[1].trim();\n if (lineNoComment) {\n throw new Error('Unrecognized statement: ' + line);\n }\n return { inMultilineDirective: false, currentVerb: null, lineRemainder: null };\n }\n }\n else if (line === ')') {\n return { inMultilineDirective: false, currentVerb: null, lineRemainder: null };\n }\n else {\n return { inMultilineDirective: true, currentVerb: state.currentVerb, lineRemainder: line };\n }\n}", "function lineBefore(area) { return beforeLines(area).last(); }", "baseIndentFor(node) {\n let line = this.state.doc.lineAt(node.from);\n // Skip line starts that are covered by a sibling (or cousin, etc)\n for (;;) {\n let atBreak = node.resolve(line.from);\n while (atBreak.parent && atBreak.parent.from == atBreak.from)\n atBreak = atBreak.parent;\n if (isParent(atBreak, node))\n break;\n line = this.state.doc.lineAt(atBreak.from);\n }\n return this.lineIndent(line.from);\n }", "getLineStartLeft(widget) {\n let left = widget.paragraph.x;\n let paragraphFormat = widget.paragraph.paragraphFormat;\n if (this.isParagraphFirstLine(widget) && !paragraphFormat.bidi) {\n left += HelperMethods.convertPointToPixel(paragraphFormat.firstLineIndent);\n }\n if (widget.children.length > 0) {\n left += widget.children[0].margin.left;\n }\n return left;\n }", "_getStartRefLineNumber(referenceNumber) {\n var refRef = PassageMarkdown.START_REF_PREFIX + referenceNumber;\n var ref = this.refs[refRef];\n\n if (!ref) {\n return null;\n }\n\n var $ref = $$1(ReactDOM$c.findDOMNode(ref)); // We really care about the first text after the ref, not the\n // ref element itself:\n\n var $refText = $ref.next();\n\n if ($refText.length === 0) {\n // But if there are no elements after the ref, just\n // use the ref itself.\n $refText = $ref;\n }\n\n var vPos = $refText.offset().top;\n return this.state.startLineNumbersAfter + 1 + this._convertPosToLineNumber(vPos);\n }", "function getNextSyntacticCharOffset(char, state) {\n var pendingSource = state.g.source.substring(state.g.position);\n var pendingSourceLines = pendingSource.split('\\n');\n\n var charOffset = 0;\n var line;\n var withinBlockComment = false;\n var withinString = false;\n lineLoop: while ((line = pendingSourceLines.shift()) !== undefined) {\n var lineEndPos = charOffset + line.length;\n charLoop: for (; charOffset < lineEndPos; charOffset++) {\n var currChar = pendingSource[charOffset];\n if (currChar === '\"' || currChar === '\\'') {\n withinString = !withinString;\n continue charLoop;\n } else if (withinString) {\n continue charLoop;\n } else if (charOffset + 1 < lineEndPos) {\n var nextTwoChars = currChar + line[charOffset + 1];\n if (nextTwoChars === '//') {\n charOffset = lineEndPos + 1;\n continue lineLoop;\n } else if (nextTwoChars === '/*') {\n withinBlockComment = true;\n charOffset += 1;\n continue charLoop;\n } else if (nextTwoChars === '*/') {\n withinBlockComment = false;\n charOffset += 1;\n continue charLoop;\n }\n }\n\n if (!withinBlockComment && currChar === char) {\n return charOffset + state.g.position;\n }\n }\n\n // Account for '\\n'\n charOffset++;\n withinString = false;\n }\n\n throw new Error('`' + char + '` not found!');\n}", "function getNextSyntacticCharOffset(char, state) {\n var pendingSource = state.g.source.substring(state.g.position);\n var pendingSourceLines = pendingSource.split('\\n');\n\n var charOffset = 0;\n var line;\n var withinBlockComment = false;\n var withinString = false;\n lineLoop: while ((line = pendingSourceLines.shift()) !== undefined) {\n var lineEndPos = charOffset + line.length;\n charLoop: for (; charOffset < lineEndPos; charOffset++) {\n var currChar = pendingSource[charOffset];\n if (currChar === '\"' || currChar === '\\'') {\n withinString = !withinString;\n continue charLoop;\n } else if (withinString) {\n continue charLoop;\n } else if (charOffset + 1 < lineEndPos) {\n var nextTwoChars = currChar + line[charOffset + 1];\n if (nextTwoChars === '//') {\n charOffset = lineEndPos + 1;\n continue lineLoop;\n } else if (nextTwoChars === '/*') {\n withinBlockComment = true;\n charOffset += 1;\n continue charLoop;\n } else if (nextTwoChars === '*/') {\n withinBlockComment = false;\n charOffset += 1;\n continue charLoop;\n }\n }\n\n if (!withinBlockComment && currChar === char) {\n return charOffset + state.g.position;\n }\n }\n\n // Account for '\\n'\n charOffset++;\n withinString = false;\n }\n\n throw new Error('`' + char + '` not found!');\n}", "getCurrentLineIndentation() {\n return this.currentLine.length - Utils.ltrim(this.currentLine, ' ').length;\n }", "function lineWordStart(area) {\n area.pos = area.pos || pos(area);\n return linePos(area) - wordPos(area);\n }", "function startOfLine(node) {\n while (node && !isBR(node)) node = node.previousSibling;\n return node;\n }", "getLineAfterViewZone() {\n // TODO: abstract away the data, ids etc.\n const range = this.data.model.getDecorationRange(this.data.startEditDecId);\n // if the first decoration is missing, this implies the region reaches the\n // start of the editor.\n return range ? range.endLineNumber + 1 : 1;\n }", "function findNodeBefore(node, pos, test, base, state) {\n test = makeTest(test);\n if (!base) { base = exports.base; }\n var max;(function c(node, st, override) {\n if (node.start > pos) { return }\n var type = override || node.type;\n if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node))\n { max = new Found(node, st); }\n base[type](node, st, c);\n })(node, state);\n return max\n}", "lineToken({chunk = this.chunk, offset = 0} = {}) {\r\n\t\t\t\tvar backslash, diff, endsContinuationLineIndentation, indent, match, minLiteralLength, newIndentLiteral, noNewlines, prev, ref, size;\r\n\t\t\t\tif (!(match = MULTI_DENT.exec(chunk))) {\r\n\t\t\t\t\treturn 0;\r\n\t\t\t\t}\r\n\t\t\t\tindent = match[0];\r\n\t\t\t\tprev = this.prev();\r\n\t\t\t\tbackslash = (prev != null ? prev[0] : void 0) === '\\\\';\r\n\t\t\t\tif (!((backslash || ((ref = this.seenFor) != null ? ref.endsLength : void 0) < this.ends.length) && this.seenFor)) {\r\n\t\t\t\t\tthis.seenFor = false;\r\n\t\t\t\t}\r\n\t\t\t\tif (!((backslash && this.seenImport) || this.importSpecifierList)) {\r\n\t\t\t\t\tthis.seenImport = false;\r\n\t\t\t\t}\r\n\t\t\t\tif (!((backslash && this.seenExport) || this.exportSpecifierList)) {\r\n\t\t\t\t\tthis.seenExport = false;\r\n\t\t\t\t}\r\n\t\t\t\tsize = indent.length - 1 - indent.lastIndexOf('\\n');\r\n\t\t\t\tnoNewlines = this.unfinished();\r\n\t\t\t\tnewIndentLiteral = size > 0 ? indent.slice(-size) : '';\r\n\t\t\t\tif (!/^(.?)\\1*$/.exec(newIndentLiteral)) {\r\n\t\t\t\t\tthis.error('mixed indentation', {\r\n\t\t\t\t\t\toffset: indent.length\r\n\t\t\t\t\t});\r\n\t\t\t\t\treturn indent.length;\r\n\t\t\t\t}\r\n\t\t\t\tminLiteralLength = Math.min(newIndentLiteral.length, this.indentLiteral.length);\r\n\t\t\t\tif (newIndentLiteral.slice(0, minLiteralLength) !== this.indentLiteral.slice(0, minLiteralLength)) {\r\n\t\t\t\t\tthis.error('indentation mismatch', {\r\n\t\t\t\t\t\toffset: indent.length\r\n\t\t\t\t\t});\r\n\t\t\t\t\treturn indent.length;\r\n\t\t\t\t}\r\n\t\t\t\tif (size - this.continuationLineAdditionalIndent === this.indent) {\r\n\t\t\t\t\tif (noNewlines) {\r\n\t\t\t\t\t\tthis.suppressNewlines();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.newlineToken(offset);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn indent.length;\r\n\t\t\t\t}\r\n\t\t\t\tif (size > this.indent) {\r\n\t\t\t\t\tif (noNewlines) {\r\n\t\t\t\t\t\tif (!backslash) {\r\n\t\t\t\t\t\t\tthis.continuationLineAdditionalIndent = size - this.indent;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (this.continuationLineAdditionalIndent) {\r\n\t\t\t\t\t\t\tprev.continuationLineIndent = this.indent + this.continuationLineAdditionalIndent;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tthis.suppressNewlines();\r\n\t\t\t\t\t\treturn indent.length;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!this.tokens.length) {\r\n\t\t\t\t\t\tthis.baseIndent = this.indent = size;\r\n\t\t\t\t\t\tthis.indentLiteral = newIndentLiteral;\r\n\t\t\t\t\t\treturn indent.length;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdiff = size - this.indent + this.outdebt;\r\n\t\t\t\t\tthis.token('INDENT', diff, {\r\n\t\t\t\t\t\toffset: offset + indent.length - size,\r\n\t\t\t\t\t\tlength: size\r\n\t\t\t\t\t});\r\n\t\t\t\t\tthis.indents.push(diff);\r\n\t\t\t\t\tthis.ends.push({\r\n\t\t\t\t\t\ttag: 'OUTDENT'\r\n\t\t\t\t\t});\r\n\t\t\t\t\tthis.outdebt = this.continuationLineAdditionalIndent = 0;\r\n\t\t\t\t\tthis.indent = size;\r\n\t\t\t\t\tthis.indentLiteral = newIndentLiteral;\r\n\t\t\t\t} else if (size < this.baseIndent) {\r\n\t\t\t\t\tthis.error('missing indentation', {\r\n\t\t\t\t\t\toffset: offset + indent.length\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\tendsContinuationLineIndentation = this.continuationLineAdditionalIndent > 0;\r\n\t\t\t\t\tthis.continuationLineAdditionalIndent = 0;\r\n\t\t\t\t\tthis.outdentToken({\r\n\t\t\t\t\t\tmoveOut: this.indent - size,\r\n\t\t\t\t\t\tnoNewlines,\r\n\t\t\t\t\t\toutdentLength: indent.length,\r\n\t\t\t\t\t\toffset,\r\n\t\t\t\t\t\tindentSize: size,\r\n\t\t\t\t\t\tendsContinuationLineIndentation\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\treturn indent.length;\r\n\t\t\t}", "function editorLineNumberForError(error) {\n if (!error) return null;\n var parsed = parsestack(error);\n if (!parsed) return null;\n if (!scope || !scope.CoffeeScript || !scope.CoffeeScript.code) return null;\n // Find the innermost call that corresponds to compiled CoffeeScript.\n var frame = null;\n for (var j = 0; j < parsed.length; ++j) {\n if (parsed[j].file in scope.CoffeeScript.code) {\n frame = parsed[j];\n }\n }\n if (!frame) return null;\n var map = scope.CoffeeScript.code[frame.file].map;\n if (!map) return null;\n var smc = new sourcemap.SourceMapConsumer(map);\n var mapped = smc.originalPositionFor(frame);\n if (!mapped) return null;\n if (!mapped.line || mapped.line < 4) return null;\n // Subtract a few lines of boilerplate from the top of the script.\n return mapped.line - 3;\n}", "function getLocation(source, position) {\n var lineRegexp = /\\r\\n|[\\n\\r]/g;\n var line = 1;\n var column = position + 1;\n var match = void 0;\n while ((match = lineRegexp.exec(source.body)) && match.index < position) {\n line += 1;\n column = position + 1 - (match.index + match[0].length);\n }\n return { line: line, column: column };\n}", "function getLocation(source, position) {\n var lineRegexp = /\\r\\n|[\\n\\r]/g;\n var line = 1;\n var column = position + 1;\n var match = void 0;\n while ((match = lineRegexp.exec(source.body)) && match.index < position) {\n line += 1;\n column = position + 1 - (match.index + match[0].length);\n }\n return { line: line, column: column };\n}", "function getLocation(source, position) {\n var lineRegexp = /\\r\\n|[\\n\\r]/g;\n var line = 1;\n var column = position + 1;\n var match = void 0;\n while ((match = lineRegexp.exec(source.body)) && match.index < position) {\n line += 1;\n column = position + 1 - (match.index + match[0].length);\n }\n return { line: line, column: column };\n}", "function getLocation(source, position) {\n var lineRegexp = /\\r\\n|[\\n\\r]/g;\n var line = 1;\n var column = position + 1;\n var match = void 0;\n while ((match = lineRegexp.exec(source.body)) && match.index < position) {\n line += 1;\n column = position + 1 - (match.index + match[0].length);\n }\n return { line: line, column: column };\n}", "function getLocation(source, position) {\n var lineRegexp = /\\r\\n|[\\n\\r]/g;\n var line = 1;\n var column = position + 1;\n var match = void 0;\n while ((match = lineRegexp.exec(source.body)) && match.index < position) {\n line += 1;\n column = position + 1 - (match.index + match[0].length);\n }\n return { line: line, column: column };\n}", "function getLocation(source, position) {\n var lineRegexp = /\\r\\n|[\\n\\r]/g;\n var line = 1;\n var column = position + 1;\n var match = void 0;\n while ((match = lineRegexp.exec(source.body)) && match.index < position) {\n line += 1;\n column = position + 1 - (match.index + match[0].length);\n }\n return { line: line, column: column };\n}", "function getLocation(source, position) {\n var lineRegexp = /\\r\\n|[\\n\\r]/g;\n var line = 1;\n var column = position + 1;\n var match = void 0;\n while ((match = lineRegexp.exec(source.body)) && match.index < position) {\n line += 1;\n column = position + 1 - (match.index + match[0].length);\n }\n return { line: line, column: column };\n}", "function getLocation(source, position) {\n var lineRegexp = /\\r\\n|[\\n\\r]/g;\n var line = 1;\n var column = position + 1;\n var match = void 0;\n while ((match = lineRegexp.exec(source.body)) && match.index < position) {\n line += 1;\n column = position + 1 - (match.index + match[0].length);\n }\n return { line: line, column: column };\n}", "function getLocation(source, position) {\n var lineRegexp = /\\r\\n|[\\n\\r]/g;\n var line = 1;\n var column = position + 1;\n var match = void 0;\n while ((match = lineRegexp.exec(source.body)) && match.index < position) {\n line += 1;\n column = position + 1 - (match.index + match[0].length);\n }\n return { line: line, column: column };\n}", "function getLocation(source, position) {\n var lineRegexp = /\\r\\n|[\\n\\r]/g;\n var line = 1;\n var column = position + 1;\n var match = void 0;\n while ((match = lineRegexp.exec(source.body)) && match.index < position) {\n line += 1;\n column = position + 1 - (match.index + match[0].length);\n }\n return { line: line, column: column };\n}", "function getLocation(source, position) {\n var lineRegexp = /\\r\\n|[\\n\\r]/g;\n var line = 1;\n var column = position + 1;\n var match = void 0;\n while ((match = lineRegexp.exec(source.body)) && match.index < position) {\n line += 1;\n column = position + 1 - (match.index + match[0].length);\n }\n return { line: line, column: column };\n}", "walkBackwardsToBeginningOfCall(document, position) {\n let parenBalance = 0;\n let maxLookupLines = 30;\n const commas = [];\n for (let lineNr = position.line; lineNr >= 0 && maxLookupLines >= 0; lineNr--, maxLookupLines--) {\n const line = document.lineAt(lineNr);\n // Stop processing if we're inside a comment\n if (util_1.isPositionInComment(document, position)) {\n return null;\n }\n // if its current line, get the text until the position given, otherwise get the full line.\n const [currentLine, characterPosition] = lineNr === position.line\n ? [line.text.substring(0, position.character), position.character]\n : [line.text, line.text.length - 1];\n for (let char = characterPosition; char >= 0; char--) {\n switch (currentLine[char]) {\n case '(':\n parenBalance--;\n if (parenBalance < 0) {\n return {\n openParen: new vscode_1.Position(lineNr, char),\n commas\n };\n }\n break;\n case ')':\n parenBalance++;\n break;\n case ',':\n const commaPos = new vscode_1.Position(lineNr, char);\n if (parenBalance === 0 && !util_1.isPositionInString(document, commaPos)) {\n commas.push(commaPos);\n }\n break;\n }\n }\n }\n return null;\n }", "function getLocation(source, position) {\n var lineRegexp = /\\r\\n|[\\n\\r]/g;\n var line = 1;\n var column = position + 1;\n var match = undefined;\n while ((match = lineRegexp.exec(source.body)) && match.index < position) {\n line += 1;\n column = position + 1 - (match.index + match[0].length);\n }\n return { line: line, column: column };\n}", "function syntaxIndentation(cx, ast, pos) {\n return indentFrom(ast.resolveInner(pos).enterUnfinishedNodesBefore(pos), pos, cx);\n}", "line() { return this.program.currentLine(); }", "function findStartIndex(markdown) {\n const match = markdown.match(/\\n## Table of Contents\\n/);\n if (match === null || match.index === undefined) return null;\n return match.index + match[0].length - 1;\n}", "function skipMarker(state, line) {\n var pos, marker,\n start = state.bMarks[line] + state.tShift[line],\n max = state.eMarks[line];\n\n if (start >= max) { return -1; }\n\n // Check bullet\n marker = state.src.charCodeAt(start++);\n if (marker !== 0x7E/* ~ */ && marker !== 0x3A/* : */) { return -1; }\n\n pos = state.skipSpaces(start);\n\n // require space after \":\"\n if (start === pos) { return -1; }\n\n // no empty definitions, e.g. \" : \"\n if (pos >= max) { return -1; }\n\n return start;\n }", "function skipMarker(state, line) {\n var pos, marker,\n start = state.bMarks[line] + state.tShift[line],\n max = state.eMarks[line];\n\n if (start >= max) { return -1; }\n\n // Check bullet\n marker = state.src.charCodeAt(start++);\n if (marker !== 0x7E/* ~ */ && marker !== 0x3A/* : */) { return -1; }\n\n pos = state.skipSpaces(start);\n\n // require space after \":\"\n if (start === pos) { return -1; }\n\n // no empty definitions, e.g. \" : \"\n if (pos >= max) { return -1; }\n\n return start;\n }" ]
[ "0.69607425", "0.69534135", "0.69534135", "0.6898711", "0.6818646", "0.6818646", "0.6818646", "0.68133503", "0.67161345", "0.66479206", "0.66479206", "0.66479206", "0.66240996", "0.66035306", "0.66035306", "0.66035306", "0.66035306", "0.66035306", "0.66035306", "0.66035306", "0.66035306", "0.66035306", "0.66035306", "0.66035306", "0.65600747", "0.64272124", "0.63872516", "0.63872516", "0.63872516", "0.63872516", "0.63872516", "0.63872516", "0.63872516", "0.63872516", "0.63872516", "0.63872516", "0.63872516", "0.63760924", "0.6358918", "0.6358918", "0.6332215", "0.6308495", "0.6308495", "0.6308495", "0.5890574", "0.57796156", "0.5496675", "0.5494599", "0.5364185", "0.5321135", "0.5279907", "0.5236618", "0.5219412", "0.5198885", "0.51763433", "0.5163649", "0.51486814", "0.5085166", "0.5085166", "0.5084437", "0.507287", "0.50609535", "0.5031847", "0.50182766", "0.501636", "0.50154185", "0.5003542", "0.5003542", "0.5003542", "0.5003542", "0.5003542", "0.5003542", "0.5003542", "0.5003542", "0.5003542", "0.5003542", "0.5003542", "0.5002773", "0.49792764", "0.49758077", "0.49728295", "0.4946242", "0.49445337", "0.49445337" ]
0.6713184
25
Search an array of spans for a span matching the given marker.
function getMarkedSpanFor(spans, marker) { if (spans) { for (var i = 0; i < spans.length; ++i) { var span = spans[i]; if (span.marker == marker) { return span } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMarkedSpanFor(spans, marker) {\n if (spans) for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) return span;\n }\n }", "function getMarkedSpanFor(spans, marker) {\n if (spans) for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) return span;\n }\n }", "function getMarkedSpanFor(spans, marker) {\n if (spans) for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) return span;\n }\n }", "function getMarkedSpanFor(spans, marker) {\n if (spans) for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) return span;\n }\n }", "function getMarkedSpanFor(spans, marker) {\n if (spans) for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) return span;\n }\n }", "function getMarkedSpanFor(spans, marker) {\n if (spans) for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) return span;\n }\n }", "function getMarkedSpanFor(spans, marker) {\n if (spans) for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) return span;\n }\n }", "function getMarkedSpanFor(spans, marker) {\n\t\t if (spans) for (var i = 0; i < spans.length; ++i) {\n\t\t var span = spans[i];\n\t\t if (span.marker == marker) return span;\n\t\t }\n\t\t }", "function getMarkedSpanFor(spans, marker) {\r\n if (spans) for (var i = 0; i < spans.length; ++i) {\r\n var span = spans[i];\r\n if (span.marker == marker) return span;\r\n }\r\n }", "function getMarkedSpanFor(spans, marker) {\n\t\t if (spans) { for (var i = 0; i < spans.length; ++i) {\n\t\t var span = spans[i];\n\t\t if (span.marker == marker) { return span }\n\t\t } }\n\t\t }", "function getMarkedSpanFor(spans, marker) {\n\t if (spans) for (var i = 0; i < spans.length; ++i) {\n\t var span = spans[i];\n\t if (span.marker == marker) return span;\n\t }\n\t }", "function getMarkedSpanFor(spans, marker) {\n\t if (spans) for (var i = 0; i < spans.length; ++i) {\n\t var span = spans[i];\n\t if (span.marker == marker) return span;\n\t }\n\t }", "function getMarkedSpanFor(spans, marker) {\n\t if (spans) for (var i = 0; i < spans.length; ++i) {\n\t var span = spans[i];\n\t if (span.marker == marker) return span;\n\t }\n\t }", "function getMarkedSpanFor(spans, marker) {\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i]\n if (span.marker == marker) { return span }\n } }\n}", "function getMarkedSpanFor(spans, marker) {\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i]\n if (span.marker == marker) { return span }\n } }\n}", "function getMarkedSpanFor(spans, marker) {\r\n if (spans) { for (var i = 0; i < spans.length; ++i) {\r\n var span = spans[i];\r\n if (span.marker == marker) { return span }\r\n } }\r\n}", "function getMarkedSpanFor(spans, marker) {\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) { return span }\n } }\n}", "function getMarkedSpanFor(spans, marker) {\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) { return span }\n } }\n}", "function getMarkedSpanFor(spans, marker) {\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) { return span }\n } }\n}", "function getMarkedSpanFor(spans, marker) {\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) { return span }\n } }\n}", "function getMarkedSpanFor(spans, marker) {\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) { return span }\n } }\n}", "function getMarkedSpanFor(spans, marker) {\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) { return span }\n } }\n}", "function getMarkedSpanFor(spans, marker) {\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) { return span }\n } }\n}", "function getMarkedSpanFor(spans, marker) {\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) { return span }\n } }\n}", "function getMarkedSpanFor(spans, marker) {\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) { return span }\n } }\n}", "function getMarkedSpanFor(spans, marker) {\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) { return span }\n } }\n}", "function getMarkedSpanFor(spans, marker) {\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) { return span }\n } }\n}", "function findMarker(markers, place) {\n return markers.find(function (value) {\n return value.title.toLowerCase() === place.toLowerCase();\n });\n }", "function findMarker(datasetNum, arrayOfMarkers) {\n return arrayOfMarkers[datasetNum].current.marker;\n }", "function findMarker(buffer, position) {\n var index;\n for (index = position; index < buffer.length; index++) {\n if ((buffer[index] == marker1) && (buffer[index + 1] == marker2))\n return index;\n }\n return -1;\n}", "function findMarkerIndex(name) {\n //name 'SFO - San Fr...'\n return markers.findIndex(function (m) {\n return m.title === name;\n });\n}", "function highlight_marker(data) {\n for (var i = 0; i < markers.length; i++) {\n if (markers[i].title == data) {\n makeItBounce( markers[ i ] );\n populateInfoWindow(markers[i], largeInfowindow);\n break;\n }\n }\n}", "function findMarker(lat, lng) {\r\n\t\t\tvar marker = null;\r\n\r\n\t\t\tfor (var i = 0; i < _markers.length; i++) {\r\n\t\t\t\tvar m = _markers[i];\r\n\t\t\t\tif (m.position.lat() == lat && m.position.lng() == lng) {\r\n\t\t\t\t\tmarker = m;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn marker;\r\n\r\n\t\t} // findMarker", "function findInArray(arr, val){\n var foundIt = arr.indexOf(val);\n if(arr[foundIt] === val) {\n return true;\n }\n else return false;\n}", "function findNeedle(array) {\n\n for (let i=0; i < array.length; i++){\n if (array[i] === 'needle') return 'found the needle at position ' + i;\n }\n \n}", "function search() {\n // Retrieves the value in the search text <input> tag\n // For loop to search through all students names and emails for a match to student text <input> entry\n // If a match is found it is added to the visibleStudents[] array \n let entry = studentSearchInput.value;\n for (let i = 0; i < students.length; i++) {\n let studentName = students[i].querySelector('div h3').textContent;\n let studentEmail = students[i].querySelector('.email').textContent;\n\n if (studentName.indexOf(entry) >= 0 || studentEmail.indexOf(entry) >= 0) {\n visibleStudents.push(i);\n }\n }\n}", "function linearSearchIndexOf(arr, val) {\n for (let i = 0; i < arr.length; i++) {\n if (val === arr[i]) return i;\n }\n return -1;\n}", "function linearSearch(arr, val){\n for(let i=0; i<arr.length; i++){\n if(arr[i] === val){\n return i;\n }\n return -1;\n }\n console.log('Hello World!')\n}", "function search(arr, item) {\n return arr.indexOf(item);\n }", "function linearSearch(arr, val) {\n for (let i = 0; i < arr.length; i++) {\n if (arr[i] === val) return i\n }\n return -1\n}", "function search(arr, item) {\n return arr.indexOf(item)\n }", "function indexOf(arr, searchItem) {\n // code here\n}", "function indexOf(arr, searchItem) {\n // code here\n}", "function findWaldo(arr, found) {\n for (var i = 0; i < arr.length; i++) {\n debugger;\n if (arr[i] == \"Waldo\") {\n found(i); // execute callback\n }\n }\n}", "function removeMarkedSpan(spans, span) {\n\t\t for (var r, i = 0; i < spans.length; ++i)\n\t\t if (spans[i] != span) (r || (r = [])).push(spans[i]);\n\t\t return r;\n\t\t }", "function linearSearch(arr, val){\n for (var i = 0; i < arr.length; i++) {\n if (arr[i] === val) {\n return i;\n }\n }\n return -1;\n}", "function linear_search(arr, n){\n for(var elem of arr){\n if(elem === n){\n return arr.indexOf(elem);\n }\n }\n}", "function addlistenertoMarkers(k) {\n for (var i = 0; i < snowCaps.peaks.length; i++) {\n if (snowCaps.peaks[i].marker.id == k) {\n locateSelected(snowCaps.peaks[i]);\n }\n }\n}", "function search(arr, item) {\n\treturn arr.indexOf(item)\n}", "function removeMarkedSpan(spans, span) {\n for (var r, i = 0; i < spans.length; ++i)\n if (spans[i] != span) (r || (r = [])).push(spans[i]);\n return r;\n }", "function removeMarkedSpan(spans, span) {\n for (var r, i = 0; i < spans.length; ++i)\n if (spans[i] != span) (r || (r = [])).push(spans[i]);\n return r;\n }", "function removeMarkedSpan(spans, span) {\n for (var r, i = 0; i < spans.length; ++i)\n if (spans[i] != span) (r || (r = [])).push(spans[i]);\n return r;\n }", "function removeMarkedSpan(spans, span) {\n for (var r, i = 0; i < spans.length; ++i)\n if (spans[i] != span) (r || (r = [])).push(spans[i]);\n return r;\n }", "function removeMarkedSpan(spans, span) {\n for (var r, i = 0; i < spans.length; ++i)\n if (spans[i] != span) (r || (r = [])).push(spans[i]);\n return r;\n }", "function removeMarkedSpan(spans, span) {\n for (var r, i = 0; i < spans.length; ++i)\n if (spans[i] != span) (r || (r = [])).push(spans[i]);\n return r;\n }", "function removeMarkedSpan(spans, span) {\n for (var r, i = 0; i < spans.length; ++i)\n if (spans[i] != span) (r || (r = [])).push(spans[i]);\n return r;\n }", "function search(arr, item) {\n return arr.indexOf(item);\n}", "function removeMarkedSpan(spans, span) {\n\t for (var r, i = 0; i < spans.length; ++i)\n\t if (spans[i] != span) (r || (r = [])).push(spans[i]);\n\t return r;\n\t }", "function removeMarkedSpan(spans, span) {\n\t for (var r, i = 0; i < spans.length; ++i)\n\t if (spans[i] != span) (r || (r = [])).push(spans[i]);\n\t return r;\n\t }", "function removeMarkedSpan(spans, span) {\n\t for (var r, i = 0; i < spans.length; ++i)\n\t if (spans[i] != span) (r || (r = [])).push(spans[i]);\n\t return r;\n\t }", "function removeMarkedSpan(spans, span) {\r\n for (var r, i = 0; i < spans.length; ++i)\r\n if (spans[i] != span) (r || (r = [])).push(spans[i]);\r\n return r;\r\n }", "function renderSpan(sid, spanIds) {\n var element = document.createElement('span');\n element.setAttribute('id', sid);\n element.setAttribute('title', '[' + sid + '] ');\n element.setAttribute('class', 'span');\n\n var pid = getPidBySid(sid);\n var beg = spans[sid].begin;\n var end = spans[sid].end;\n var len = end - beg;\n\n var c; // index of current span\n for (c = 0; c < spanIds.length; c++) if (spanIds[c] == sid) break;\n\n var begnode = document.getElementById(pid).childNodes[0];\n var begoff = beg - pars[pid].begin;\n\n // adjust the begin node and offset\n if (c > 0) {\n var p = c - 1; // index of preceding span\n\n // when the previous span includes the region\n if (spans[spanIds[p]].end > beg) {\n begnode = document.getElementById(spanIds[p]).childNodes[0];\n begoff = beg - spans[spanIds[p]].begin;\n }\n\n else {\n if (getPidBySid(spanIds[p]) == pid) {\n // find the outermost preceding span\n var pnode = document.getElementById(spanIds[p]);\n while (pnode.parentElement &&\n spans[pnode.parentElement.id] &&\n spans[pnode.parentElement.id].end > spans[pnode.id].begin &&\n spans[pnode.parentElement.id].end < end) {pnode = pnode.parentElement}\n\n begnode = pnode.nextSibling;\n begoff = beg - spans[pnode.id].end;\n }\n }\n }\n\n var endnode = begnode;\n var endoff = begoff + len;\n\n // if there is an intervening span, adjust the end node and offset\n if ((c < spanIds.length - 1) && (end > spans[spanIds[c + 1]].begin)) {\n var i = c + 1; // index of the rightmost intervening span\n // if there is a room for further intervening\n while (i < spanIds.length - 1) {\n // find the next span at the same level\n var n = i + 1;\n while ((n < spanIds.length) && (spans[spanIds[n]].begin < spans[spanIds[i]].end)) n++;\n if (n == spanIds.length) break;\n if (end > spans[spanIds[n]].begin) i = n;\n else break;\n }\n endnode = document.getElementById(spanIds[i]).nextSibling;\n endoff = end - spans[spanIds[i]].end;\n }\n\n var range = document.createRange();\n range.setStart(begnode, begoff);\n range.setEnd(endnode, endoff);\n range.surroundContents(element);\n\n $('#' + sid).off('mouseup', spanClicked).on('mouseup', spanClicked);\n }", "function linearSearch(arr, val) {\n // Loop through the array and check if the current array element is equal to the value\n for (let i = 0; i < arr.length; i++) {\n // If it is, return the index at which the element is found\n if (arr[i] === val) return i;\n \n }\n // if the value is never found, return -1;\n return -1;\n}", "function search(arr, val) {\n for (let i = 0; i < arr.length; i++) {\n if (arr[i] === val) {\n return i;\n }\n }\n return -1\n}", "function searchLocations(str) {\n var input = str.toLowerCase();\n var locations = LVM.getLocations();\n var temp_array = []\n console.log('input: \"' + input + '\"');\n\n // Do nothing if input has not changed.\n if (LVM.searchInput() == str) { return; }\n\n // Body\n for (var i = 0; i < locations.length; i++) {\n var item = LVM.currLocations()[i];\n var marker = markers[i];\n // I chose to use `setMap()` instead of `setVisible()` because the\n // infowindow doesn't automatically hide in `setVisible()`.\n if (locations[i].title.toLowerCase().includes(input)) {\n item.toHide(false);\n marker.setVisible(true);\n temp_array.push(marker);\n } else {\n item.toHide(true);\n marker.setVisible(false);\n\n // Hide infowindow if marker is not shown\n if (largeInfowindow.marker == marker) {\n console.log(\"close infowindow\");\n largeInfowindow.close();\n console.log(largeInfowindow);\n }\n }\n }\n\n // Closing\n if (temp_array.length > 0) { fitBounds(temp_array); }\n LVM.searchInput(str);\n}", "function removeMarkedSpan(spans, span) {\n\t\t var r;\n\t\t for (var i = 0; i < spans.length; ++i)\n\t\t { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n\t\t return r\n\t\t }", "function linearSearch(arr, num) {\n // add whatever parameters you deem necessary - good luck!\n let indexOfItem = -1;\n for (let i = 0; i < arr.length; i++) {\n if (arr[i] === num) indexOfItem = i;\n }\n return indexOfItem;\n}", "function search(arr, val) {\n for (let i = 0; i < arr.length; i++) {\n if (arr[i] === val) {\n return i\n }\n }\n return -1\n}", "function removeMarkedSpan(spans, span) {\n var r;\n\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i] != span) {\n (r || (r = [])).push(spans[i]);\n }\n }\n\n return r;\n } // Add a span to a line.", "function removeMarkedSpan(spans, span) {\n var r\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]) } }\n return r\n}", "function removeMarkedSpan(spans, span) {\n var r\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]) } }\n return r\n}", "function linearSearch(arr, val){\n// loop through the array and check if the\n for(let i = 0; i < arr.length; i++){\n // current array element is equal to the value\n if(arr[i] === val)return i;//if it is, return the index at which the element is found\n }\n return -1;// if the value is never found, return -1\n \n }", "function search (arr, val) {\n for (let i = 0; i < arr.length; i++) {\n if (arr[i] === value) {\n return i\n }\n }\n return -1;\n}", "function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n }", "function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n }", "function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n }", "function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n }", "function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n }", "function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n }", "function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n }", "function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n }", "function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n }", "function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n }", "function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n }" ]
[ "0.7196434", "0.7196434", "0.7196434", "0.7196434", "0.7196434", "0.7196434", "0.7196434", "0.71662706", "0.7142382", "0.7124794", "0.71201074", "0.71201074", "0.71201074", "0.7105415", "0.7105415", "0.71047986", "0.7089332", "0.7089332", "0.7089332", "0.7089332", "0.7089332", "0.7089332", "0.7089332", "0.7089332", "0.7089332", "0.7089332", "0.7089332", "0.62907994", "0.58886707", "0.5596451", "0.55899185", "0.5535891", "0.54799825", "0.53503484", "0.53402096", "0.53302336", "0.5239454", "0.5205537", "0.5190879", "0.51821023", "0.51802087", "0.51680136", "0.51680136", "0.51679224", "0.5159928", "0.5141958", "0.5126036", "0.5113098", "0.5110799", "0.5110586", "0.5110586", "0.5110586", "0.5110586", "0.5110586", "0.5110586", "0.5110586", "0.51064223", "0.51008505", "0.51008505", "0.51008505", "0.5099552", "0.5093323", "0.509304", "0.5035722", "0.50355095", "0.5032974", "0.5027292", "0.5008424", "0.50079167", "0.5007484", "0.5007484", "0.49998575", "0.49954355", "0.49909917", "0.49909917", "0.49909917", "0.49909917", "0.49909917", "0.49909917", "0.49909917", "0.49909917", "0.49909917", "0.49909917", "0.49909917" ]
0.7183609
20
Remove a span from an array, returning undefined if no spans are left (we don't store arrays for lines without spans).
function removeMarkedSpan(spans, span) { var r; for (var i = 0; i < spans.length; ++i) { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } } return r }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeMarkedSpan(spans, span) {\n\t\t for (var r, i = 0; i < spans.length; ++i)\n\t\t if (spans[i] != span) (r || (r = [])).push(spans[i]);\n\t\t return r;\n\t\t }", "function removeMarkedSpan(spans, span) {\n for (var r, i = 0; i < spans.length; ++i)\n if (spans[i] != span) (r || (r = [])).push(spans[i]);\n return r;\n }", "function removeMarkedSpan(spans, span) {\n for (var r, i = 0; i < spans.length; ++i)\n if (spans[i] != span) (r || (r = [])).push(spans[i]);\n return r;\n }", "function removeMarkedSpan(spans, span) {\n for (var r, i = 0; i < spans.length; ++i)\n if (spans[i] != span) (r || (r = [])).push(spans[i]);\n return r;\n }", "function removeMarkedSpan(spans, span) {\n for (var r, i = 0; i < spans.length; ++i)\n if (spans[i] != span) (r || (r = [])).push(spans[i]);\n return r;\n }", "function removeMarkedSpan(spans, span) {\n for (var r, i = 0; i < spans.length; ++i)\n if (spans[i] != span) (r || (r = [])).push(spans[i]);\n return r;\n }", "function removeMarkedSpan(spans, span) {\n for (var r, i = 0; i < spans.length; ++i)\n if (spans[i] != span) (r || (r = [])).push(spans[i]);\n return r;\n }", "function removeMarkedSpan(spans, span) {\n for (var r, i = 0; i < spans.length; ++i)\n if (spans[i] != span) (r || (r = [])).push(spans[i]);\n return r;\n }", "function removeMarkedSpan(spans, span) {\n\t for (var r, i = 0; i < spans.length; ++i)\n\t if (spans[i] != span) (r || (r = [])).push(spans[i]);\n\t return r;\n\t }", "function removeMarkedSpan(spans, span) {\n\t for (var r, i = 0; i < spans.length; ++i)\n\t if (spans[i] != span) (r || (r = [])).push(spans[i]);\n\t return r;\n\t }", "function removeMarkedSpan(spans, span) {\n\t for (var r, i = 0; i < spans.length; ++i)\n\t if (spans[i] != span) (r || (r = [])).push(spans[i]);\n\t return r;\n\t }", "function removeMarkedSpan(spans, span) {\r\n for (var r, i = 0; i < spans.length; ++i)\r\n if (spans[i] != span) (r || (r = [])).push(spans[i]);\r\n return r;\r\n }", "function removeMarkedSpan(spans, span) {\n\t\t var r;\n\t\t for (var i = 0; i < spans.length; ++i)\n\t\t { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n\t\t return r\n\t\t }", "function removeMarkedSpan(spans, span) {\n var r;\n\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i] != span) {\n (r || (r = [])).push(spans[i]);\n }\n }\n\n return r;\n } // Add a span to a line.", "function removeMarkedSpan(spans, span) {\r\n var r;\r\n for (var i = 0; i < spans.length; ++i)\r\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\r\n return r\r\n}", "function removeMarkedSpan(spans, span) {\n var r\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]) } }\n return r\n}", "function removeMarkedSpan(spans, span) {\n var r\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]) } }\n return r\n}", "function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n}", "function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n}", "function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n}", "function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n}", "function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n}", "function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n}", "function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n}", "function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n}", "function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n}", "function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n}", "function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i) } }\n else if (out) { out.push(spans[i]) }\n }\n return !out ? spans : out.length ? out : null\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i) } }\n else if (out) { out.push(spans[i]) }\n }\n return !out ? spans : out.length ? out : null\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n}", "function removeClearedSpans(spans) {\r\n if (!spans) { return null }\r\n var out;\r\n for (var i = 0; i < spans.length; ++i) {\r\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\r\n else if (out) { out.push(spans[i]); }\r\n }\r\n return !out ? spans : out.length ? out : null\r\n}", "function removeClearedSpans(spans) {\n if (!spans) {\n return null;\n }\n\n var out;\n\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) {\n if (!out) {\n out = spans.slice(0, i);\n }\n } else if (out) {\n out.push(spans[i]);\n }\n }\n\n return !out ? spans : out.length ? out : null;\n } // Retrieve and filter the old marked spans stored in a change event.", "function removeClearedSpans(spans) {\n if (!spans) return null;\n for (var i = 0, out; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }\n else if (out) out.push(spans[i]);\n }\n return !out ? spans : out.length ? out : null;\n }", "function removeClearedSpans(spans) {\n if (!spans) return null;\n for (var i = 0, out; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }\n else if (out) out.push(spans[i]);\n }\n return !out ? spans : out.length ? out : null;\n }", "function removeClearedSpans(spans) {\n if (!spans) return null;\n for (var i = 0, out; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }\n else if (out) out.push(spans[i]);\n }\n return !out ? spans : out.length ? out : null;\n }", "function removeClearedSpans(spans) {\n if (!spans) return null;\n for (var i = 0, out; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }\n else if (out) out.push(spans[i]);\n }\n return !out ? spans : out.length ? out : null;\n }", "function removeClearedSpans(spans) {\n if (!spans) return null;\n for (var i = 0, out; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }\n else if (out) out.push(spans[i]);\n }\n return !out ? spans : out.length ? out : null;\n }", "function removeClearedSpans(spans) {\n if (!spans) return null;\n for (var i = 0, out; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }\n else if (out) out.push(spans[i]);\n }\n return !out ? spans : out.length ? out : null;\n }", "function removeClearedSpans(spans) {\n if (!spans) return null;\n for (var i = 0, out; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }\n else if (out) out.push(spans[i]);\n }\n return !out ? spans : out.length ? out : null;\n }", "function removeClearedSpans(spans) {\n\t\t if (!spans) { return null }\n\t\t var out;\n\t\t for (var i = 0; i < spans.length; ++i) {\n\t\t if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n\t\t else if (out) { out.push(spans[i]); }\n\t\t }\n\t\t return !out ? spans : out.length ? out : null\n\t\t }", "function removeClearedSpans(spans) {\r\n if (!spans) return null;\r\n for (var i = 0, out; i < spans.length; ++i) {\r\n if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }\r\n else if (out) out.push(spans[i]);\r\n }\r\n return !out ? spans : out.length ? out : null;\r\n }", "function removeClearedSpans(spans) {\n\t\t if (!spans) return null;\n\t\t for (var i = 0, out; i < spans.length; ++i) {\n\t\t if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }\n\t\t else if (out) out.push(spans[i]);\n\t\t }\n\t\t return !out ? spans : out.length ? out : null;\n\t\t }", "function removeClearedSpans(spans) {\n\t if (!spans) return null;\n\t for (var i = 0, out; i < spans.length; ++i) {\n\t if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }\n\t else if (out) out.push(spans[i]);\n\t }\n\t return !out ? spans : out.length ? out : null;\n\t }", "function removeClearedSpans(spans) {\n\t if (!spans) return null;\n\t for (var i = 0, out; i < spans.length; ++i) {\n\t if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }\n\t else if (out) out.push(spans[i]);\n\t }\n\t return !out ? spans : out.length ? out : null;\n\t }", "function removeClearedSpans(spans) {\n\t if (!spans) return null;\n\t for (var i = 0, out; i < spans.length; ++i) {\n\t if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }\n\t else if (out) out.push(spans[i]);\n\t }\n\t return !out ? spans : out.length ? out : null;\n\t }", "function removeSpan(id) {\n for( var i=0; i<spans.length; i++){ \n if ( spans[i].id === id) { spans.splice(i,1); }\n }\n}", "function clearEmptySpans(spans) {\r\n for (var i = 0; i < spans.length; ++i) {\r\n var span = spans[i];\r\n if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\r\n { spans.splice(i--, 1); }\r\n }\r\n if (!spans.length) { return null }\r\n return spans\r\n}", "function clearEmptySpans(spans) {\n\t\t for (var i = 0; i < spans.length; ++i) {\n\t\t var span = spans[i];\n\t\t if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n\t\t { spans.splice(i--, 1); }\n\t\t }\n\t\t if (!spans.length) { return null }\n\t\t return spans\n\t\t }", "function removeSpans(start, end){\n // spans must be ordered\n // normalize span\n if (start > end) {\n var tmp = start;\n start = end;\n end = tmp;\n }\n start = Math.max(0, start);\n end = Math.min(textLength, end);\n if (start === end) { return; }\n // find insertion point\n var n = spans.length,\n i, span,\n iLeft = 0,\n iRight = n;\n while (iLeft < iRight) {\n i = iLeft + iRight >> 1;\n if (end <= spans[i].start) { iRight = i; }\n else if (start >= spans[i].end) { iLeft = i + 1; }\n else { iRight = i; }\n }\n // exclude spans which intersect\n var toremove_start,\n toremove_end;\n while (iRight < n) {\n span = spans[iRight];\n if (span.start > end) {\n break;\n }\n toremove_start = Math.max(span.start, start);\n toremove_end = Math.min(span.end, end);\n // remove span within span\n if (toremove_start > span.start && toremove_end < span.end) {\n spans.splice(iRight + 1, 0, { start: toremove_end, end: span.end });\n span.end = toremove_start;\n iRight += 2;\n n++;\n }\n // remove span from start\n else if (toremove_start === span.start && toremove_end < span.end) {\n span.start = toremove_end;\n iRight++;\n }\n // remove span from end\n else if (toremove_start > span.start && toremove_end === span.end) {\n span.end = toremove_start;\n iRight++;\n }\n // remove span\n else {\n spans.splice(iRight, 1);\n n--;\n }\n }\n}", "function clearEmptySpans(spans) {\n for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n { spans.splice(i--, 1); }\n }\n if (!spans.length) { return null }\n return spans\n }", "function clearEmptySpans(spans) {\n for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n { spans.splice(i--, 1); }\n }\n if (!spans.length) { return null }\n return spans\n }", "function clearEmptySpans(spans) {\n for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n { spans.splice(i--, 1); }\n }\n if (!spans.length) { return null }\n return spans\n }", "function clearEmptySpans(spans) {\n for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n { spans.splice(i--, 1); }\n }\n if (!spans.length) { return null }\n return spans\n }", "function clearEmptySpans(spans) {\n for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n { spans.splice(i--, 1); }\n }\n if (!spans.length) { return null }\n return spans\n }", "function clearEmptySpans(spans) {\n for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n { spans.splice(i--, 1); }\n }\n if (!spans.length) { return null }\n return spans\n }", "function clearEmptySpans(spans) {\n for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n { spans.splice(i--, 1); }\n }\n if (!spans.length) { return null }\n return spans\n }" ]
[ "0.74046427", "0.7398266", "0.7398266", "0.7398266", "0.7398266", "0.7398266", "0.7398266", "0.7398266", "0.73859435", "0.73859435", "0.73859435", "0.736235", "0.7315828", "0.7315045", "0.7235346", "0.7223111", "0.7223111", "0.72049785", "0.72049785", "0.72049785", "0.72049785", "0.72049785", "0.72049785", "0.72049785", "0.72049785", "0.72049785", "0.72049785", "0.72049785", "0.6918599", "0.6918599", "0.69034827", "0.69034827", "0.69034827", "0.69034827", "0.69034827", "0.69034827", "0.69034827", "0.69034827", "0.69034827", "0.69034827", "0.69034827", "0.69034827", "0.69034827", "0.69034827", "0.69034827", "0.69034827", "0.69034827", "0.68971264", "0.68971264", "0.68971264", "0.68971264", "0.68971264", "0.68971264", "0.68971264", "0.68971264", "0.68971264", "0.68971264", "0.68971264", "0.68930143", "0.6858238", "0.68428636", "0.68428636", "0.68428636", "0.68428636", "0.68428636", "0.68428636", "0.68428636", "0.68157315", "0.6812375", "0.68006665", "0.677906", "0.677906", "0.677906", "0.647962", "0.59739953", "0.59663475", "0.59485376", "0.5922272", "0.5922272", "0.5922272", "0.5922272", "0.5922272", "0.5922272", "0.5922272" ]
0.72939557
30
Add a span to a line.
function addMarkedSpan(line, span) { line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span]; span.marker.attachLine(line); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addMarkedSpan(line, span) {\r\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\r\n span.marker.attachLine(line);\r\n }", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span]\n span.marker.attachLine(line)\n}", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span]\n span.marker.attachLine(line)\n}", "function addMarkedSpan(line, span) {\r\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\r\n span.marker.attachLine(line);\r\n}", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n}", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n}", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n}", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n}", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n}", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n}", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n}", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n}", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n}", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n}", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n}", "function addMarkedSpan(line, span) {\n\t line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n\t span.marker.attachLine(line);\n\t }", "function addMarkedSpan(line, span) {\n\t line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n\t span.marker.attachLine(line);\n\t }", "function addMarkedSpan(line, span) {\n\t line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n\t span.marker.attachLine(line);\n\t }", "function addMarkedSpan(line, span) {\n\t\t line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n\t\t span.marker.attachLine(line);\n\t\t }", "function addMarkedSpan(line, span, op) {\n var inThisOp = op && window.WeakSet && (op.markedSpans || (op.markedSpans = new WeakSet));\n if (inThisOp && inThisOp.has(line.markedSpans)) {\n line.markedSpans.push(span);\n } else {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n if (inThisOp) { inThisOp.add(line.markedSpans); }\n }\n span.marker.attachLine(line);\n }", "function addMarkedSpan(line, span, op) {\n var inThisOp = op && window.WeakSet && (op.markedSpans || (op.markedSpans = new WeakSet));\n if (inThisOp && line.markedSpans && inThisOp.has(line.markedSpans)) {\n line.markedSpans.push(span);\n } else {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n if (inThisOp) { inThisOp.add(line.markedSpans); }\n }\n span.marker.attachLine(line);\n }", "function addMarkedSpan(line, span, op) {\n var inThisOp = op && window.WeakSet && (op.markedSpans || (op.markedSpans = new WeakSet));\n if (inThisOp && line.markedSpans && inThisOp.has(line.markedSpans)) {\n line.markedSpans.push(span);\n } else {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n if (inThisOp) { inThisOp.add(line.markedSpans); }\n }\n span.marker.attachLine(line);\n }", "function addMarkedSpan(line, span, op) {\n\t\t var inThisOp = op && window.WeakSet && (op.markedSpans || (op.markedSpans = new WeakSet));\n\t\t if (inThisOp && line.markedSpans && inThisOp.has(line.markedSpans)) {\n\t\t line.markedSpans.push(span);\n\t\t } else {\n\t\t line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n\t\t if (inThisOp) { inThisOp.add(line.markedSpans); }\n\t\t }\n\t\t span.marker.attachLine(line);\n\t\t }", "function createLine() {\n\t\tlet element = document.createElement('span')\n\t\telement.className = 'line'\n\t\treturn element\n\t}", "function addMarksToLine(tr, state, node, pos, boldSentence) {\n const markType = state.schema.marks[MARK_STRONG];\n let textContent = getNodeText(node);\n const endPos = textContent.length;\n let content = '';\n let counter = 0;\n if (boldSentence) {\n content = textContent.split('.');\n } else {\n content = textContent.split(' ');\n }\n if ('' !== content[0]) {\n textContent = content[0];\n } else {\n if (content.length > 1) {\n for (let index = 0; index < content.length; index++) {\n if ('' === content[index]) {\n counter++;\n } else {\n textContent = content[index];\n index = content.length;\n }\n }\n }\n }\n tr = tr.addMark(\n pos,\n pos + textContent.length + 1 + counter,\n markType.create(null)\n );\n if (content.length > 1) {\n tr = tr.removeMark(\n pos + textContent.length + 1 + counter,\n pos + endPos + 1,\n markType\n );\n }\n return tr;\n}", "function addSpan(start, end){\n // spans must be ordered\n // normalize span\n if (start > end) {\n var tmp = start;\n start = end;\n end = tmp;\n }\n start = Math.max(0, start);\n end = Math.min(textLength, end);\n if (start === end) { return; }\n // find insertion point\n var n = spans.length,\n i, span,\n iLeft = 0,\n iRight = n;//alert(n);\n while (iLeft < iRight) {\n i = iLeft + iRight >> 1;\n if (end < spans[i].start) { iRight = i; }\n else if (start > spans[i].end) { iLeft = i + 1; }\n else { iRight = i; }\n }\n // merge spans which intersect\n while (iRight < n) {\n span = spans[iRight];\n if (span.start > end) {\n break;\n }\n start = Math.min(span.start, start);\n end = Math.max(span.end, end);\n iRight++;\n }\n // insert\n spans.splice(iLeft, iRight - iLeft, { start: start, end: end });\n}", "function addTextline(element, word, additionalClass) {\n if (element === undefined || word === undefined) {\n return;\n }\n element\n .append('tspan')\n .attr('class', additionalClass)\n .classed('text', true)\n .attr('x', 0)\n .attr('y', function() {\n return (element.property('childNodes').length - 1) * SPACE_BETWEEN_SPANS;\n })\n .text(word);\n }", "function addLine () {\n\tconst linksCoords = this.getBoundingClientRect();\n\tline.style.width = `${linksCoords.width}px`;\n\tline.style.transform = `translate(${linksCoords.left}px, ${linksCoords.top}px)`;\n\tline.style.opacity = 1;\n}", "function makeLine(text, markedSpans, height) {\n var line = {text: text, height: height};\n attachMarkedSpans(line, markedSpans);\n if (lineIsHidden(line)) line.height = 0;\n return line;\n }", "function makeLine(text, markedSpans, height) {\n var line = {text: text, height: height};\n attachMarkedSpans(line, markedSpans);\n if (lineIsHidden(line)) line.height = 0;\n return line;\n }", "function makeLine(text, markedSpans, height) {\n var line = {text: text, height: height};\n attachMarkedSpans(line, markedSpans);\n if (lineIsHidden(line)) line.height = 0;\n return line;\n }", "function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans,\n allText = line.text,\n at = 0;\n\n if (!spans) {\n for (var i$1 = 1; i$1 < styles.length; i$1 += 2) {\n builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1 + 1], builder.cm.options));\n }\n\n return;\n }\n\n var len = allText.length,\n pos = 0,\n i = 1,\n text = \"\",\n style,\n css;\n var nextChange = 0,\n spanStyle,\n spanEndStyle,\n spanStartStyle,\n collapsed,\n attributes;\n\n for (;;) {\n if (nextChange == pos) {\n // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = css = \"\";\n attributes = null;\n collapsed = null;\n nextChange = Infinity;\n var foundBookmarks = [],\n endStyles = void 0;\n\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j],\n m = sp.marker;\n\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = \"\";\n }\n\n if (m.className) {\n spanStyle += \" \" + m.className;\n }\n\n if (m.css) {\n css = (css ? css + \";\" : \"\") + m.css;\n }\n\n if (m.startStyle && sp.from == pos) {\n spanStartStyle += \" \" + m.startStyle;\n }\n\n if (m.endStyle && sp.to == nextChange) {\n (endStyles || (endStyles = [])).push(m.endStyle, sp.to);\n } // support for the old title property\n // https://github.com/codemirror/CodeMirror/pull/5673\n\n\n if (m.title) {\n (attributes || (attributes = {})).title = m.title;\n }\n\n if (m.attributes) {\n for (var attr in m.attributes) {\n (attributes || (attributes = {}))[attr] = m.attributes[attr];\n }\n }\n\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0)) {\n collapsed = sp;\n }\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n\n if (endStyles) {\n for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2) {\n if (endStyles[j$1 + 1] == nextChange) {\n spanEndStyle += \" \" + endStyles[j$1];\n }\n }\n }\n\n if (!collapsed || collapsed.from == pos) {\n for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2) {\n buildCollapsedSpan(builder, 0, foundBookmarks[j$2]);\n }\n }\n\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos, collapsed.marker, collapsed.from == null);\n\n if (collapsed.to == null) {\n return;\n }\n\n if (collapsed.to == pos) {\n collapsed = false;\n }\n }\n }\n\n if (pos >= len) {\n break;\n }\n\n var upto = Math.min(len, nextChange);\n\n while (true) {\n if (text) {\n var end = pos + text.length;\n\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle, spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", css, attributes);\n }\n\n if (end >= upto) {\n text = text.slice(upto - pos);\n pos = upto;\n break;\n }\n\n pos = end;\n spanStartStyle = \"\";\n }\n\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n } // These objects are used to represent the visible (currently drawn)", "function trace(text) {\n d3.select(\"#trace1\").append(\"span\").text(text).append(\"br\");\n }", "function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\n return\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = title = css = \"\";\n collapsed = null; nextChange = Infinity;\n var foundBookmarks = [], endStyles = (void 0);\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = \"\";\n }\n if (m.className) { spanStyle += \" \" + m.className; }\n if (m.css) { css = (css ? css + \";\" : \"\") + m.css; }\n if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle; }\n if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\n if (m.title && !title) { title = m.title; }\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n { collapsed = sp; }\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1]; } } }\n\n if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) { return }\n if (collapsed.to == pos) { collapsed = false; }\n }\n }\n if (pos >= len) { break }\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", title, css);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n pos = end;\n spanStartStyle = \"\";\n }\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n }", "function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\n return\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = title = css = \"\";\n collapsed = null; nextChange = Infinity;\n var foundBookmarks = [], endStyles = (void 0);\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = \"\";\n }\n if (m.className) { spanStyle += \" \" + m.className; }\n if (m.css) { css = (css ? css + \";\" : \"\") + m.css; }\n if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle; }\n if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\n if (m.title && !title) { title = m.title; }\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n { collapsed = sp; }\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1]; } } }\n\n if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) { return }\n if (collapsed.to == pos) { collapsed = false; }\n }\n }\n if (pos >= len) { break }\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", title, css);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n pos = end;\n spanStartStyle = \"\";\n }\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n }", "function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0\n if (!spans) {\n for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)) }\n return\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = title = css = \"\"\n collapsed = null; nextChange = Infinity\n var foundBookmarks = [], endStyles = (void 0)\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m)\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to\n spanEndStyle = \"\"\n }\n if (m.className) { spanStyle += \" \" + m.className }\n if (m.css) { css = (css ? css + \";\" : \"\") + m.css }\n if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle }\n if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to) }\n if (m.title && !title) { title = m.title }\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n { collapsed = sp }\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from\n }\n }\n if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1] } } }\n\n if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]) } }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null)\n if (collapsed.to == null) { return }\n if (collapsed.to == pos) { collapsed = false }\n }\n }\n if (pos >= len) { break }\n\n var upto = Math.min(len, nextChange)\n while (true) {\n if (text) {\n var end = pos + text.length\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", title, css)\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n pos = end\n spanStartStyle = \"\"\n }\n text = allText.slice(at, at = styles[i++])\n style = interpretTokenStyle(styles[i++], builder.cm.options)\n }\n }\n}", "function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0\n if (!spans) {\n for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)) }\n return\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = title = css = \"\"\n collapsed = null; nextChange = Infinity\n var foundBookmarks = [], endStyles = (void 0)\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m)\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to\n spanEndStyle = \"\"\n }\n if (m.className) { spanStyle += \" \" + m.className }\n if (m.css) { css = (css ? css + \";\" : \"\") + m.css }\n if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle }\n if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to) }\n if (m.title && !title) { title = m.title }\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n { collapsed = sp }\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from\n }\n }\n if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1] } } }\n\n if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]) } }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null)\n if (collapsed.to == null) { return }\n if (collapsed.to == pos) { collapsed = false }\n }\n }\n if (pos >= len) { break }\n\n var upto = Math.min(len, nextChange)\n while (true) {\n if (text) {\n var end = pos + text.length\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", title, css)\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n pos = end\n spanStartStyle = \"\"\n }\n text = allText.slice(at, at = styles[i++])\n style = interpretTokenStyle(styles[i++], builder.cm.options)\n }\n }\n}", "function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\n return\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = title = css = \"\";\n collapsed = null; nextChange = Infinity;\n var foundBookmarks = [], endStyles = (void 0);\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = \"\";\n }\n if (m.className) { spanStyle += \" \" + m.className; }\n if (m.css) { css = (css ? css + \";\" : \"\") + m.css; }\n if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle; }\n if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\n if (m.title && !title) { title = m.title; }\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n { collapsed = sp; }\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1]; } } }\n\n if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) { return }\n if (collapsed.to == pos) { collapsed = false; }\n }\n }\n if (pos >= len) { break }\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", title, css);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n pos = end;\n spanStartStyle = \"\";\n }\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n}", "function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\n return\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = title = css = \"\";\n collapsed = null; nextChange = Infinity;\n var foundBookmarks = [], endStyles = (void 0);\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = \"\";\n }\n if (m.className) { spanStyle += \" \" + m.className; }\n if (m.css) { css = (css ? css + \";\" : \"\") + m.css; }\n if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle; }\n if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\n if (m.title && !title) { title = m.title; }\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n { collapsed = sp; }\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1]; } } }\n\n if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) { return }\n if (collapsed.to == pos) { collapsed = false; }\n }\n }\n if (pos >= len) { break }\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", title, css);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n pos = end;\n spanStartStyle = \"\";\n }\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n}", "function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\n return\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = title = css = \"\";\n collapsed = null; nextChange = Infinity;\n var foundBookmarks = [], endStyles = (void 0);\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = \"\";\n }\n if (m.className) { spanStyle += \" \" + m.className; }\n if (m.css) { css = (css ? css + \";\" : \"\") + m.css; }\n if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle; }\n if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\n if (m.title && !title) { title = m.title; }\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n { collapsed = sp; }\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1]; } } }\n\n if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) { return }\n if (collapsed.to == pos) { collapsed = false; }\n }\n }\n if (pos >= len) { break }\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", title, css);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n pos = end;\n spanStartStyle = \"\";\n }\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n}", "function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\n return\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = title = css = \"\";\n collapsed = null; nextChange = Infinity;\n var foundBookmarks = [], endStyles = (void 0);\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = \"\";\n }\n if (m.className) { spanStyle += \" \" + m.className; }\n if (m.css) { css = (css ? css + \";\" : \"\") + m.css; }\n if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle; }\n if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\n if (m.title && !title) { title = m.title; }\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n { collapsed = sp; }\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1]; } } }\n\n if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) { return }\n if (collapsed.to == pos) { collapsed = false; }\n }\n }\n if (pos >= len) { break }\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", title, css);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n pos = end;\n spanStartStyle = \"\";\n }\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n}", "function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\n return\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = title = css = \"\";\n collapsed = null; nextChange = Infinity;\n var foundBookmarks = [], endStyles = (void 0);\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = \"\";\n }\n if (m.className) { spanStyle += \" \" + m.className; }\n if (m.css) { css = (css ? css + \";\" : \"\") + m.css; }\n if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle; }\n if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\n if (m.title && !title) { title = m.title; }\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n { collapsed = sp; }\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1]; } } }\n\n if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) { return }\n if (collapsed.to == pos) { collapsed = false; }\n }\n }\n if (pos >= len) { break }\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", title, css);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n pos = end;\n spanStartStyle = \"\";\n }\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n}", "function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\n return\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = title = css = \"\";\n collapsed = null; nextChange = Infinity;\n var foundBookmarks = [], endStyles = (void 0);\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = \"\";\n }\n if (m.className) { spanStyle += \" \" + m.className; }\n if (m.css) { css = (css ? css + \";\" : \"\") + m.css; }\n if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle; }\n if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\n if (m.title && !title) { title = m.title; }\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n { collapsed = sp; }\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1]; } } }\n\n if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) { return }\n if (collapsed.to == pos) { collapsed = false; }\n }\n }\n if (pos >= len) { break }\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", title, css);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n pos = end;\n spanStartStyle = \"\";\n }\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n}", "function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\n return\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = title = css = \"\";\n collapsed = null; nextChange = Infinity;\n var foundBookmarks = [], endStyles = (void 0);\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = \"\";\n }\n if (m.className) { spanStyle += \" \" + m.className; }\n if (m.css) { css = (css ? css + \";\" : \"\") + m.css; }\n if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle; }\n if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\n if (m.title && !title) { title = m.title; }\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n { collapsed = sp; }\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1]; } } }\n\n if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) { return }\n if (collapsed.to == pos) { collapsed = false; }\n }\n }\n if (pos >= len) { break }\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", title, css);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n pos = end;\n spanStartStyle = \"\";\n }\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n}", "function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\n return\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = title = css = \"\";\n collapsed = null; nextChange = Infinity;\n var foundBookmarks = [], endStyles = (void 0);\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = \"\";\n }\n if (m.className) { spanStyle += \" \" + m.className; }\n if (m.css) { css = (css ? css + \";\" : \"\") + m.css; }\n if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle; }\n if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\n if (m.title && !title) { title = m.title; }\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n { collapsed = sp; }\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1]; } } }\n\n if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) { return }\n if (collapsed.to == pos) { collapsed = false; }\n }\n }\n if (pos >= len) { break }\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", title, css);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n pos = end;\n spanStartStyle = \"\";\n }\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n}", "function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\n return\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = title = css = \"\";\n collapsed = null; nextChange = Infinity;\n var foundBookmarks = [], endStyles = (void 0);\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = \"\";\n }\n if (m.className) { spanStyle += \" \" + m.className; }\n if (m.css) { css = (css ? css + \";\" : \"\") + m.css; }\n if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle; }\n if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\n if (m.title && !title) { title = m.title; }\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n { collapsed = sp; }\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1]; } } }\n\n if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) { return }\n if (collapsed.to == pos) { collapsed = false; }\n }\n }\n if (pos >= len) { break }\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", title, css);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n pos = end;\n spanStartStyle = \"\";\n }\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n}", "function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\n return\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = title = css = \"\";\n collapsed = null; nextChange = Infinity;\n var foundBookmarks = [], endStyles = (void 0);\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = \"\";\n }\n if (m.className) { spanStyle += \" \" + m.className; }\n if (m.css) { css = (css ? css + \";\" : \"\") + m.css; }\n if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle; }\n if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\n if (m.title && !title) { title = m.title; }\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n { collapsed = sp; }\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1]; } } }\n\n if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) { return }\n if (collapsed.to == pos) { collapsed = false; }\n }\n }\n if (pos >= len) { break }\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", title, css);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n pos = end;\n spanStartStyle = \"\";\n }\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n}", "function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\n return\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = title = css = \"\";\n collapsed = null; nextChange = Infinity;\n var foundBookmarks = [], endStyles = (void 0);\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = \"\";\n }\n if (m.className) { spanStyle += \" \" + m.className; }\n if (m.css) { css = (css ? css + \";\" : \"\") + m.css; }\n if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle; }\n if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\n if (m.title && !title) { title = m.title; }\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n { collapsed = sp; }\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1]; } } }\n\n if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) { return }\n if (collapsed.to == pos) { collapsed = false; }\n }\n }\n if (pos >= len) { break }\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", title, css);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n pos = end;\n spanStartStyle = \"\";\n }\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n}", "function insertLineContent(line, builder, styles) {\n\t\t var spans = line.markedSpans, allText = line.text, at = 0;\n\t\t if (!spans) {\n\t\t for (var i = 1; i < styles.length; i+=2)\n\t\t builder.addToken(builder, allText.slice(at, at = styles[i]), interpretTokenStyle(styles[i+1], builder.cm.options));\n\t\t return;\n\t\t }\n\t\t\n\t\t var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n\t\t var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed;\n\t\t for (;;) {\n\t\t if (nextChange == pos) { // Update current marker set\n\t\t spanStyle = spanEndStyle = spanStartStyle = title = css = \"\";\n\t\t collapsed = null; nextChange = Infinity;\n\t\t var foundBookmarks = [], endStyles\n\t\t for (var j = 0; j < spans.length; ++j) {\n\t\t var sp = spans[j], m = sp.marker;\n\t\t if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n\t\t foundBookmarks.push(m);\n\t\t } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n\t\t if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n\t\t nextChange = sp.to;\n\t\t spanEndStyle = \"\";\n\t\t }\n\t\t if (m.className) spanStyle += \" \" + m.className;\n\t\t if (m.css) css = (css ? css + \";\" : \"\") + m.css;\n\t\t if (m.startStyle && sp.from == pos) spanStartStyle += \" \" + m.startStyle;\n\t\t if (m.endStyle && sp.to == nextChange) (endStyles || (endStyles = [])).push(m.endStyle, sp.to)\n\t\t if (m.title && !title) title = m.title;\n\t\t if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n\t\t collapsed = sp;\n\t\t } else if (sp.from > pos && nextChange > sp.from) {\n\t\t nextChange = sp.from;\n\t\t }\n\t\t }\n\t\t if (endStyles) for (var j = 0; j < endStyles.length; j += 2)\n\t\t if (endStyles[j + 1] == nextChange) spanEndStyle += \" \" + endStyles[j]\n\t\t\n\t\t if (!collapsed || collapsed.from == pos) for (var j = 0; j < foundBookmarks.length; ++j)\n\t\t buildCollapsedSpan(builder, 0, foundBookmarks[j]);\n\t\t if (collapsed && (collapsed.from || 0) == pos) {\n\t\t buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n\t\t collapsed.marker, collapsed.from == null);\n\t\t if (collapsed.to == null) return;\n\t\t if (collapsed.to == pos) collapsed = false;\n\t\t }\n\t\t }\n\t\t if (pos >= len) break;\n\t\t\n\t\t var upto = Math.min(len, nextChange);\n\t\t while (true) {\n\t\t if (text) {\n\t\t var end = pos + text.length;\n\t\t if (!collapsed) {\n\t\t var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n\t\t builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n\t\t spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", title, css);\n\t\t }\n\t\t if (end >= upto) {text = text.slice(upto - pos); pos = upto; break;}\n\t\t pos = end;\n\t\t spanStartStyle = \"\";\n\t\t }\n\t\t text = allText.slice(at, at = styles[i++]);\n\t\t style = interpretTokenStyle(styles[i++], builder.cm.options);\n\t\t }\n\t\t }\n\t\t }", "function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i = 1; i < styles.length; i+=2)\n builder.addToken(builder, allText.slice(at, at = styles[i]), interpretTokenStyle(styles[i+1], builder.cm.options));\n return;\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = title = css = \"\";\n collapsed = null; nextChange = Infinity;\n var foundBookmarks = [];\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = \"\";\n }\n if (m.className) spanStyle += \" \" + m.className;\n if (m.css) css = m.css;\n if (m.startStyle && sp.from == pos) spanStartStyle += \" \" + m.startStyle;\n if (m.endStyle && sp.to == nextChange) spanEndStyle += \" \" + m.endStyle;\n if (m.title && !title) title = m.title;\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n collapsed = sp;\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) return;\n if (collapsed.to == pos) collapsed = false;\n }\n if (!collapsed && foundBookmarks.length) for (var j = 0; j < foundBookmarks.length; ++j)\n buildCollapsedSpan(builder, 0, foundBookmarks[j]);\n }\n if (pos >= len) break;\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", title, css);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break;}\n pos = end;\n spanStartStyle = \"\";\n }\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n }", "function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans;\n if (!spans) {\n for (var i = 1; i < styles.length; i+=2)\n builder.addToken(builder, styles[i], styleToClass(styles[i+1]));\n return;\n }\n\n var allText = line.text, len = allText.length;\n var pos = 0, i = 1, text = \"\", style;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, collapsed;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = \"\";\n collapsed = null; nextChange = Infinity;\n var foundBookmark = null;\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (sp.from <= pos && (sp.to == null || sp.to > pos)) {\n if (sp.to != null && nextChange > sp.to) { nextChange = sp.to; spanEndStyle = \"\"; }\n if (m.className) spanStyle += \" \" + m.className;\n if (m.startStyle && sp.from == pos) spanStartStyle += \" \" + m.startStyle;\n if (m.endStyle && sp.to == nextChange) spanEndStyle += \" \" + m.endStyle;\n if (m.collapsed && (!collapsed || collapsed.marker.width < m.width))\n collapsed = sp;\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n if (m.type == \"bookmark\" && sp.from == pos && m.replacedWith)\n foundBookmark = m.replacedWith;\n }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len : collapsed.to) - pos,\n collapsed.from != null && collapsed.marker.replacedWith);\n if (collapsed.to == null) return collapsed.marker.find();\n }\n if (foundBookmark && !collapsed) buildCollapsedSpan(builder, 0, foundBookmark);\n }\n if (pos >= len) break;\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style + spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\");\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break;}\n pos = end;\n spanStartStyle = \"\";\n }\n text = styles[i++]; style = styleToClass(styles[i++]);\n }\n }\n }", "function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans;\n if (!spans) {\n for (var i = 1; i < styles.length; i+=2)\n builder.addToken(builder, styles[i], styleToClass(styles[i+1]));\n return;\n }\n\n var allText = line.text, len = allText.length;\n var pos = 0, i = 1, text = \"\", style;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, collapsed;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = \"\";\n collapsed = null; nextChange = Infinity;\n var foundBookmark = null;\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (sp.from <= pos && (sp.to == null || sp.to > pos)) {\n if (sp.to != null && nextChange > sp.to) { nextChange = sp.to; spanEndStyle = \"\"; }\n if (m.className) spanStyle += \" \" + m.className;\n if (m.startStyle && sp.from == pos) spanStartStyle += \" \" + m.startStyle;\n if (m.endStyle && sp.to == nextChange) spanEndStyle += \" \" + m.endStyle;\n if (m.collapsed && (!collapsed || collapsed.marker.width < m.width))\n collapsed = sp;\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n if (m.type == \"bookmark\" && sp.from == pos && m.replacedWith)\n foundBookmark = m.replacedWith;\n }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len : collapsed.to) - pos,\n collapsed.from != null && collapsed.marker.replacedWith);\n if (collapsed.to == null) return collapsed.marker.find();\n }\n if (foundBookmark && !collapsed) buildCollapsedSpan(builder, 0, foundBookmark);\n }\n if (pos >= len) break;\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style + spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\");\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break;}\n pos = end;\n spanStartStyle = \"\";\n }\n text = styles[i++]; style = styleToClass(styles[i++]);\n }\n }\n }", "function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans;\n if (!spans) {\n for (var i = 1; i < styles.length; i+=2)\n builder.addToken(builder, styles[i], styleToClass(styles[i+1]));\n return;\n }\n\n var allText = line.text, len = allText.length;\n var pos = 0, i = 1, text = \"\", style;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, collapsed;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = \"\";\n collapsed = null; nextChange = Infinity;\n var foundBookmark = null;\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (sp.from <= pos && (sp.to == null || sp.to > pos)) {\n if (sp.to != null && nextChange > sp.to) { nextChange = sp.to; spanEndStyle = \"\"; }\n if (m.className) spanStyle += \" \" + m.className;\n if (m.startStyle && sp.from == pos) spanStartStyle += \" \" + m.startStyle;\n if (m.endStyle && sp.to == nextChange) spanEndStyle += \" \" + m.endStyle;\n if (m.collapsed && (!collapsed || collapsed.marker.width < m.width))\n collapsed = sp;\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n if (m.type == \"bookmark\" && sp.from == pos && m.replacedWith)\n foundBookmark = m.replacedWith;\n }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len : collapsed.to) - pos,\n collapsed.from != null && collapsed.marker.replacedWith);\n if (collapsed.to == null) return collapsed.marker.find();\n }\n if (foundBookmark && !collapsed) buildCollapsedSpan(builder, 0, foundBookmark);\n }\n if (pos >= len) break;\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style + spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\");\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break;}\n pos = end;\n spanStartStyle = \"\";\n }\n text = styles[i++]; style = styleToClass(styles[i++]);\n }\n }\n }", "function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i = 1; i < styles.length; i+=2)\n builder.addToken(builder, allText.slice(at, at = styles[i]), interpretTokenStyle(styles[i+1], builder.cm.options));\n return;\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = title = css = \"\";\n collapsed = null; nextChange = Infinity;\n var foundBookmarks = [], endStyles\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = \"\";\n }\n if (m.className) spanStyle += \" \" + m.className;\n if (m.css) css = (css ? css + \";\" : \"\") + m.css;\n if (m.startStyle && sp.from == pos) spanStartStyle += \" \" + m.startStyle;\n if (m.endStyle && sp.to == nextChange) (endStyles || (endStyles = [])).push(m.endStyle, sp.to)\n if (m.title && !title) title = m.title;\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n collapsed = sp;\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n if (endStyles) for (var j = 0; j < endStyles.length; j += 2)\n if (endStyles[j + 1] == nextChange) spanEndStyle += \" \" + endStyles[j]\n\n if (!collapsed || collapsed.from == pos) for (var j = 0; j < foundBookmarks.length; ++j)\n buildCollapsedSpan(builder, 0, foundBookmarks[j]);\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) return;\n if (collapsed.to == pos) collapsed = false;\n }\n }\n if (pos >= len) break;\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", title, css);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break;}\n pos = end;\n spanStartStyle = \"\";\n }\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n }", "function insertLineContent(line, builder, styles) {\r\n var spans = line.markedSpans, allText = line.text, at = 0;\r\n if (!spans) {\r\n for (var i$1 = 1; i$1 < styles.length; i$1+=2)\r\n { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\r\n return\r\n }\r\n\r\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\r\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed;\r\n for (;;) {\r\n if (nextChange == pos) { // Update current marker set\r\n spanStyle = spanEndStyle = spanStartStyle = title = css = \"\";\r\n collapsed = null; nextChange = Infinity;\r\n var foundBookmarks = [], endStyles = (void 0);\r\n for (var j = 0; j < spans.length; ++j) {\r\n var sp = spans[j], m = sp.marker;\r\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\r\n foundBookmarks.push(m);\r\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\r\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\r\n nextChange = sp.to;\r\n spanEndStyle = \"\";\r\n }\r\n if (m.className) { spanStyle += \" \" + m.className; }\r\n if (m.css) { css = (css ? css + \";\" : \"\") + m.css; }\r\n if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle; }\r\n if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\r\n if (m.title && !title) { title = m.title; }\r\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\r\n { collapsed = sp; }\r\n } else if (sp.from > pos && nextChange > sp.from) {\r\n nextChange = sp.from;\r\n }\r\n }\r\n if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\r\n { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1]; } } }\r\n\r\n if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\r\n { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\r\n if (collapsed && (collapsed.from || 0) == pos) {\r\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\r\n collapsed.marker, collapsed.from == null);\r\n if (collapsed.to == null) { return }\r\n if (collapsed.to == pos) { collapsed = false; }\r\n }\r\n }\r\n if (pos >= len) { break }\r\n\r\n var upto = Math.min(len, nextChange);\r\n while (true) {\r\n if (text) {\r\n var end = pos + text.length;\r\n if (!collapsed) {\r\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\r\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\r\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", title, css);\r\n }\r\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\r\n pos = end;\r\n spanStartStyle = \"\";\r\n }\r\n text = allText.slice(at, at = styles[i++]);\r\n style = interpretTokenStyle(styles[i++], builder.cm.options);\r\n }\r\n }\r\n}", "function insertLineContent(line, builder, styles) {\n\t var spans = line.markedSpans, allText = line.text, at = 0;\n\t if (!spans) {\n\t for (var i = 1; i < styles.length; i+=2)\n\t builder.addToken(builder, allText.slice(at, at = styles[i]), interpretTokenStyle(styles[i+1], builder.cm.options));\n\t return;\n\t }\n\n\t var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n\t var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed;\n\t for (;;) {\n\t if (nextChange == pos) { // Update current marker set\n\t spanStyle = spanEndStyle = spanStartStyle = title = css = \"\";\n\t collapsed = null; nextChange = Infinity;\n\t var foundBookmarks = [], endStyles\n\t for (var j = 0; j < spans.length; ++j) {\n\t var sp = spans[j], m = sp.marker;\n\t if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n\t foundBookmarks.push(m);\n\t } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n\t if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n\t nextChange = sp.to;\n\t spanEndStyle = \"\";\n\t }\n\t if (m.className) spanStyle += \" \" + m.className;\n\t if (m.css) css = (css ? css + \";\" : \"\") + m.css;\n\t if (m.startStyle && sp.from == pos) spanStartStyle += \" \" + m.startStyle;\n\t if (m.endStyle && sp.to == nextChange) (endStyles || (endStyles = [])).push(m.endStyle, sp.to)\n\t if (m.title && !title) title = m.title;\n\t if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n\t collapsed = sp;\n\t } else if (sp.from > pos && nextChange > sp.from) {\n\t nextChange = sp.from;\n\t }\n\t }\n\t if (endStyles) for (var j = 0; j < endStyles.length; j += 2)\n\t if (endStyles[j + 1] == nextChange) spanEndStyle += \" \" + endStyles[j]\n\n\t if (!collapsed || collapsed.from == pos) for (var j = 0; j < foundBookmarks.length; ++j)\n\t buildCollapsedSpan(builder, 0, foundBookmarks[j]);\n\t if (collapsed && (collapsed.from || 0) == pos) {\n\t buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n\t collapsed.marker, collapsed.from == null);\n\t if (collapsed.to == null) return;\n\t if (collapsed.to == pos) collapsed = false;\n\t }\n\t }\n\t if (pos >= len) break;\n\n\t var upto = Math.min(len, nextChange);\n\t while (true) {\n\t if (text) {\n\t var end = pos + text.length;\n\t if (!collapsed) {\n\t var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n\t builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n\t spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", title, css);\n\t }\n\t if (end >= upto) {text = text.slice(upto - pos); pos = upto; break;}\n\t pos = end;\n\t spanStartStyle = \"\";\n\t }\n\t text = allText.slice(at, at = styles[i++]);\n\t style = interpretTokenStyle(styles[i++], builder.cm.options);\n\t }\n\t }\n\t }", "function insertLineContent(line, builder, styles) {\n\t var spans = line.markedSpans, allText = line.text, at = 0;\n\t if (!spans) {\n\t for (var i = 1; i < styles.length; i+=2)\n\t builder.addToken(builder, allText.slice(at, at = styles[i]), interpretTokenStyle(styles[i+1], builder.cm.options));\n\t return;\n\t }\n\n\t var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n\t var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed;\n\t for (;;) {\n\t if (nextChange == pos) { // Update current marker set\n\t spanStyle = spanEndStyle = spanStartStyle = title = css = \"\";\n\t collapsed = null; nextChange = Infinity;\n\t var foundBookmarks = [], endStyles\n\t for (var j = 0; j < spans.length; ++j) {\n\t var sp = spans[j], m = sp.marker;\n\t if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n\t foundBookmarks.push(m);\n\t } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n\t if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n\t nextChange = sp.to;\n\t spanEndStyle = \"\";\n\t }\n\t if (m.className) spanStyle += \" \" + m.className;\n\t if (m.css) css = (css ? css + \";\" : \"\") + m.css;\n\t if (m.startStyle && sp.from == pos) spanStartStyle += \" \" + m.startStyle;\n\t if (m.endStyle && sp.to == nextChange) (endStyles || (endStyles = [])).push(m.endStyle, sp.to)\n\t if (m.title && !title) title = m.title;\n\t if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n\t collapsed = sp;\n\t } else if (sp.from > pos && nextChange > sp.from) {\n\t nextChange = sp.from;\n\t }\n\t }\n\t if (endStyles) for (var j = 0; j < endStyles.length; j += 2)\n\t if (endStyles[j + 1] == nextChange) spanEndStyle += \" \" + endStyles[j]\n\n\t if (collapsed && (collapsed.from || 0) == pos) {\n\t buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n\t collapsed.marker, collapsed.from == null);\n\t if (collapsed.to == null) return;\n\t if (collapsed.to == pos) collapsed = false;\n\t }\n\t if (!collapsed && foundBookmarks.length) for (var j = 0; j < foundBookmarks.length; ++j)\n\t buildCollapsedSpan(builder, 0, foundBookmarks[j]);\n\t }\n\t if (pos >= len) break;\n\n\t var upto = Math.min(len, nextChange);\n\t while (true) {\n\t if (text) {\n\t var end = pos + text.length;\n\t if (!collapsed) {\n\t var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n\t builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n\t spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", title, css);\n\t }\n\t if (end >= upto) {text = text.slice(upto - pos); pos = upto; break;}\n\t pos = end;\n\t spanStartStyle = \"\";\n\t }\n\t text = allText.slice(at, at = styles[i++]);\n\t style = interpretTokenStyle(styles[i++], builder.cm.options);\n\t }\n\t }\n\t }", "function createTagline(text) {\n var span = $(\"span#tagline\");\n span.append(text);\n span.css(\"font-family: Courier, monospace; font-size: 100%;\");\n }", "function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\n return\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, collapsed, attributes;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = css = \"\";\n attributes = null;\n collapsed = null; nextChange = Infinity;\n var foundBookmarks = [], endStyles = (void 0);\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = \"\";\n }\n if (m.className) { spanStyle += \" \" + m.className; }\n if (m.css) { css = (css ? css + \";\" : \"\") + m.css; }\n if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle; }\n if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\n // support for the old title property\n // https://github.com/codemirror/CodeMirror/pull/5673\n if (m.title) { (attributes || (attributes = {})).title = m.title; }\n if (m.attributes) {\n for (var attr in m.attributes)\n { (attributes || (attributes = {}))[attr] = m.attributes[attr]; }\n }\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n { collapsed = sp; }\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1]; } } }\n\n if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) { return }\n if (collapsed.to == pos) { collapsed = false; }\n }\n }\n if (pos >= len) { break }\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", css, attributes);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n pos = end;\n spanStartStyle = \"\";\n }\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n }", "function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\n return\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, collapsed, attributes;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = css = \"\";\n attributes = null;\n collapsed = null; nextChange = Infinity;\n var foundBookmarks = [], endStyles = (void 0);\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = \"\";\n }\n if (m.className) { spanStyle += \" \" + m.className; }\n if (m.css) { css = (css ? css + \";\" : \"\") + m.css; }\n if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle; }\n if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\n // support for the old title property\n // https://github.com/codemirror/CodeMirror/pull/5673\n if (m.title) { (attributes || (attributes = {})).title = m.title; }\n if (m.attributes) {\n for (var attr in m.attributes)\n { (attributes || (attributes = {}))[attr] = m.attributes[attr]; }\n }\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n { collapsed = sp; }\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1]; } } }\n\n if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) { return }\n if (collapsed.to == pos) { collapsed = false; }\n }\n }\n if (pos >= len) { break }\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", css, attributes);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n pos = end;\n spanStartStyle = \"\";\n }\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n }", "function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\n return\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, collapsed, attributes;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = css = \"\";\n attributes = null;\n collapsed = null; nextChange = Infinity;\n var foundBookmarks = [], endStyles = (void 0);\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = \"\";\n }\n if (m.className) { spanStyle += \" \" + m.className; }\n if (m.css) { css = (css ? css + \";\" : \"\") + m.css; }\n if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle; }\n if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\n // support for the old title property\n // https://github.com/codemirror/CodeMirror/pull/5673\n if (m.title) { (attributes || (attributes = {})).title = m.title; }\n if (m.attributes) {\n for (var attr in m.attributes)\n { (attributes || (attributes = {}))[attr] = m.attributes[attr]; }\n }\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n { collapsed = sp; }\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1]; } } }\n\n if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) { return }\n if (collapsed.to == pos) { collapsed = false; }\n }\n }\n if (pos >= len) { break }\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", css, attributes);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n pos = end;\n spanStartStyle = \"\";\n }\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n }", "function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\n return\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, collapsed, attributes;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = css = \"\";\n attributes = null;\n collapsed = null; nextChange = Infinity;\n var foundBookmarks = [], endStyles = (void 0);\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = \"\";\n }\n if (m.className) { spanStyle += \" \" + m.className; }\n if (m.css) { css = (css ? css + \";\" : \"\") + m.css; }\n if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle; }\n if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\n // support for the old title property\n // https://github.com/codemirror/CodeMirror/pull/5673\n if (m.title) { (attributes || (attributes = {})).title = m.title; }\n if (m.attributes) {\n for (var attr in m.attributes)\n { (attributes || (attributes = {}))[attr] = m.attributes[attr]; }\n }\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n { collapsed = sp; }\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1]; } } }\n\n if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) { return }\n if (collapsed.to == pos) { collapsed = false; }\n }\n }\n if (pos >= len) { break }\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", css, attributes);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n pos = end;\n spanStartStyle = \"\";\n }\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n }", "function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\n return\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, collapsed, attributes;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = css = \"\";\n attributes = null;\n collapsed = null; nextChange = Infinity;\n var foundBookmarks = [], endStyles = (void 0);\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = \"\";\n }\n if (m.className) { spanStyle += \" \" + m.className; }\n if (m.css) { css = (css ? css + \";\" : \"\") + m.css; }\n if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle; }\n if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\n // support for the old title property\n // https://github.com/codemirror/CodeMirror/pull/5673\n if (m.title) { (attributes || (attributes = {})).title = m.title; }\n if (m.attributes) {\n for (var attr in m.attributes)\n { (attributes || (attributes = {}))[attr] = m.attributes[attr]; }\n }\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n { collapsed = sp; }\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1]; } } }\n\n if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) { return }\n if (collapsed.to == pos) { collapsed = false; }\n }\n }\n if (pos >= len) { break }\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", css, attributes);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n pos = end;\n spanStartStyle = \"\";\n }\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n }", "function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\n return\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, collapsed, attributes;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = css = \"\";\n attributes = null;\n collapsed = null; nextChange = Infinity;\n var foundBookmarks = [], endStyles = (void 0);\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = \"\";\n }\n if (m.className) { spanStyle += \" \" + m.className; }\n if (m.css) { css = (css ? css + \";\" : \"\") + m.css; }\n if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle; }\n if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\n // support for the old title property\n // https://github.com/codemirror/CodeMirror/pull/5673\n if (m.title) { (attributes || (attributes = {})).title = m.title; }\n if (m.attributes) {\n for (var attr in m.attributes)\n { (attributes || (attributes = {}))[attr] = m.attributes[attr]; }\n }\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n { collapsed = sp; }\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1]; } } }\n\n if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) { return }\n if (collapsed.to == pos) { collapsed = false; }\n }\n }\n if (pos >= len) { break }\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", css, attributes);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n pos = end;\n spanStartStyle = \"\";\n }\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n }", "function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\n return\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, collapsed, attributes;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = css = \"\";\n attributes = null;\n collapsed = null; nextChange = Infinity;\n var foundBookmarks = [], endStyles = (void 0);\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = \"\";\n }\n if (m.className) { spanStyle += \" \" + m.className; }\n if (m.css) { css = (css ? css + \";\" : \"\") + m.css; }\n if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle; }\n if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\n // support for the old title property\n // https://github.com/codemirror/CodeMirror/pull/5673\n if (m.title) { (attributes || (attributes = {})).title = m.title; }\n if (m.attributes) {\n for (var attr in m.attributes)\n { (attributes || (attributes = {}))[attr] = m.attributes[attr]; }\n }\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n { collapsed = sp; }\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1]; } } }\n\n if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) { return }\n if (collapsed.to == pos) { collapsed = false; }\n }\n }\n if (pos >= len) { break }\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", css, attributes);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n pos = end;\n spanStartStyle = \"\";\n }\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n }", "function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\n return\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, collapsed, attributes;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = css = \"\";\n attributes = null;\n collapsed = null; nextChange = Infinity;\n var foundBookmarks = [], endStyles = (void 0);\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = \"\";\n }\n if (m.className) { spanStyle += \" \" + m.className; }\n if (m.css) { css = (css ? css + \";\" : \"\") + m.css; }\n if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle; }\n if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\n // support for the old title property\n // https://github.com/codemirror/CodeMirror/pull/5673\n if (m.title) { (attributes || (attributes = {})).title = m.title; }\n if (m.attributes) {\n for (var attr in m.attributes)\n { (attributes || (attributes = {}))[attr] = m.attributes[attr]; }\n }\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n { collapsed = sp; }\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1]; } } }\n\n if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) { return }\n if (collapsed.to == pos) { collapsed = false; }\n }\n }\n if (pos >= len) { break }\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", css, attributes);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n pos = end;\n spanStartStyle = \"\";\n }\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n }", "function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\n return\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, collapsed, attributes;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = css = \"\";\n attributes = null;\n collapsed = null; nextChange = Infinity;\n var foundBookmarks = [], endStyles = (void 0);\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = \"\";\n }\n if (m.className) { spanStyle += \" \" + m.className; }\n if (m.css) { css = (css ? css + \";\" : \"\") + m.css; }\n if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle; }\n if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\n // support for the old title property\n // https://github.com/codemirror/CodeMirror/pull/5673\n if (m.title) { (attributes || (attributes = {})).title = m.title; }\n if (m.attributes) {\n for (var attr in m.attributes)\n { (attributes || (attributes = {}))[attr] = m.attributes[attr]; }\n }\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n { collapsed = sp; }\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1]; } } }\n\n if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) { return }\n if (collapsed.to == pos) { collapsed = false; }\n }\n }\n if (pos >= len) { break }\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", css, attributes);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n pos = end;\n spanStartStyle = \"\";\n }\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n }", "function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\n return\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, collapsed, attributes;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = css = \"\";\n attributes = null;\n collapsed = null; nextChange = Infinity;\n var foundBookmarks = [], endStyles = (void 0);\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = \"\";\n }\n if (m.className) { spanStyle += \" \" + m.className; }\n if (m.css) { css = (css ? css + \";\" : \"\") + m.css; }\n if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle; }\n if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\n // support for the old title property\n // https://github.com/codemirror/CodeMirror/pull/5673\n if (m.title) { (attributes || (attributes = {})).title = m.title; }\n if (m.attributes) {\n for (var attr in m.attributes)\n { (attributes || (attributes = {}))[attr] = m.attributes[attr]; }\n }\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n { collapsed = sp; }\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1]; } } }\n\n if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) { return }\n if (collapsed.to == pos) { collapsed = false; }\n }\n }\n if (pos >= len) { break }\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", css, attributes);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n pos = end;\n spanStartStyle = \"\";\n }\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n }", "function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\n return\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, collapsed, attributes;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = css = \"\";\n attributes = null;\n collapsed = null; nextChange = Infinity;\n var foundBookmarks = [], endStyles = (void 0);\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = \"\";\n }\n if (m.className) { spanStyle += \" \" + m.className; }\n if (m.css) { css = (css ? css + \";\" : \"\") + m.css; }\n if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle; }\n if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\n // support for the old title property\n // https://github.com/codemirror/CodeMirror/pull/5673\n if (m.title) { (attributes || (attributes = {})).title = m.title; }\n if (m.attributes) {\n for (var attr in m.attributes)\n { (attributes || (attributes = {}))[attr] = m.attributes[attr]; }\n }\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n { collapsed = sp; }\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1]; } } }\n\n if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) { return }\n if (collapsed.to == pos) { collapsed = false; }\n }\n }\n if (pos >= len) { break }\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", css, attributes);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n pos = end;\n spanStartStyle = \"\";\n }\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n }", "function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\n return\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, collapsed, attributes;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = css = \"\";\n attributes = null;\n collapsed = null; nextChange = Infinity;\n var foundBookmarks = [], endStyles = (void 0);\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = \"\";\n }\n if (m.className) { spanStyle += \" \" + m.className; }\n if (m.css) { css = (css ? css + \";\" : \"\") + m.css; }\n if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle; }\n if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\n // support for the old title property\n // https://github.com/codemirror/CodeMirror/pull/5673\n if (m.title) { (attributes || (attributes = {})).title = m.title; }\n if (m.attributes) {\n for (var attr in m.attributes)\n { (attributes || (attributes = {}))[attr] = m.attributes[attr]; }\n }\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n { collapsed = sp; }\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1]; } } }\n\n if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) { return }\n if (collapsed.to == pos) { collapsed = false; }\n }\n }\n if (pos >= len) { break }\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", css, attributes);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n pos = end;\n spanStartStyle = \"\";\n }\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n }", "function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\n return\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, collapsed, attributes;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = css = \"\";\n attributes = null;\n collapsed = null; nextChange = Infinity;\n var foundBookmarks = [], endStyles = (void 0);\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = \"\";\n }\n if (m.className) { spanStyle += \" \" + m.className; }\n if (m.css) { css = (css ? css + \";\" : \"\") + m.css; }\n if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle; }\n if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\n // support for the old title property\n // https://github.com/codemirror/CodeMirror/pull/5673\n if (m.title) { (attributes || (attributes = {})).title = m.title; }\n if (m.attributes) {\n for (var attr in m.attributes)\n { (attributes || (attributes = {}))[attr] = m.attributes[attr]; }\n }\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n { collapsed = sp; }\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1]; } } }\n\n if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) { return }\n if (collapsed.to == pos) { collapsed = false; }\n }\n }\n if (pos >= len) { break }\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", css, attributes);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n pos = end;\n spanStartStyle = \"\";\n }\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n }", "function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\n return\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, collapsed, attributes;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = css = \"\";\n attributes = null;\n collapsed = null; nextChange = Infinity;\n var foundBookmarks = [], endStyles = (void 0);\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = \"\";\n }\n if (m.className) { spanStyle += \" \" + m.className; }\n if (m.css) { css = (css ? css + \";\" : \"\") + m.css; }\n if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle; }\n if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\n // support for the old title property\n // https://github.com/codemirror/CodeMirror/pull/5673\n if (m.title) { (attributes || (attributes = {})).title = m.title; }\n if (m.attributes) {\n for (var attr in m.attributes)\n { (attributes || (attributes = {}))[attr] = m.attributes[attr]; }\n }\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n { collapsed = sp; }\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1]; } } }\n\n if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) { return }\n if (collapsed.to == pos) { collapsed = false; }\n }\n }\n if (pos >= len) { break }\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", css, attributes);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n pos = end;\n spanStartStyle = \"\";\n }\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n }", "function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\n return\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, collapsed, attributes;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = css = \"\";\n attributes = null;\n collapsed = null; nextChange = Infinity;\n var foundBookmarks = [], endStyles = (void 0);\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = \"\";\n }\n if (m.className) { spanStyle += \" \" + m.className; }\n if (m.css) { css = (css ? css + \";\" : \"\") + m.css; }\n if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle; }\n if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\n // support for the old title property\n // https://github.com/codemirror/CodeMirror/pull/5673\n if (m.title) { (attributes || (attributes = {})).title = m.title; }\n if (m.attributes) {\n for (var attr in m.attributes)\n { (attributes || (attributes = {}))[attr] = m.attributes[attr]; }\n }\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n { collapsed = sp; }\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1]; } } }\n\n if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) { return }\n if (collapsed.to == pos) { collapsed = false; }\n }\n }\n if (pos >= len) { break }\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", css, attributes);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n pos = end;\n spanStartStyle = \"\";\n }\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n }", "function insertLineContent(line, builder, styles) {\n\t var spans = line.markedSpans, allText = line.text, at = 0;\n\t if (!spans) {\n\t for (var i = 1; i < styles.length; i+=2)\n\t builder.addToken(builder, allText.slice(at, at = styles[i]), interpretTokenStyle(styles[i+1], builder.cm.options));\n\t return;\n\t }\n\t\n\t var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n\t var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed;\n\t for (;;) {\n\t if (nextChange == pos) { // Update current marker set\n\t spanStyle = spanEndStyle = spanStartStyle = title = css = \"\";\n\t collapsed = null; nextChange = Infinity;\n\t var foundBookmarks = [], endStyles\n\t for (var j = 0; j < spans.length; ++j) {\n\t var sp = spans[j], m = sp.marker;\n\t if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n\t foundBookmarks.push(m);\n\t } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n\t if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n\t nextChange = sp.to;\n\t spanEndStyle = \"\";\n\t }\n\t if (m.className) spanStyle += \" \" + m.className;\n\t if (m.css) css = (css ? css + \";\" : \"\") + m.css;\n\t if (m.startStyle && sp.from == pos) spanStartStyle += \" \" + m.startStyle;\n\t if (m.endStyle && sp.to == nextChange) (endStyles || (endStyles = [])).push(m.endStyle, sp.to)\n\t if (m.title && !title) title = m.title;\n\t if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n\t collapsed = sp;\n\t } else if (sp.from > pos && nextChange > sp.from) {\n\t nextChange = sp.from;\n\t }\n\t }\n\t if (endStyles) for (var j = 0; j < endStyles.length; j += 2)\n\t if (endStyles[j + 1] == nextChange) spanEndStyle += \" \" + endStyles[j]\n\t\n\t if (!collapsed || collapsed.from == pos) for (var j = 0; j < foundBookmarks.length; ++j)\n\t buildCollapsedSpan(builder, 0, foundBookmarks[j]);\n\t if (collapsed && (collapsed.from || 0) == pos) {\n\t buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n\t collapsed.marker, collapsed.from == null);\n\t if (collapsed.to == null) return;\n\t if (collapsed.to == pos) collapsed = false;\n\t }\n\t }\n\t if (pos >= len) break;\n\t\n\t var upto = Math.min(len, nextChange);\n\t while (true) {\n\t if (text) {\n\t var end = pos + text.length;\n\t if (!collapsed) {\n\t var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n\t builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n\t spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", title, css);\n\t }\n\t if (end >= upto) {text = text.slice(upto - pos); pos = upto; break;}\n\t pos = end;\n\t spanStartStyle = \"\";\n\t }\n\t text = allText.slice(at, at = styles[i++]);\n\t style = interpretTokenStyle(styles[i++], builder.cm.options);\n\t }\n\t }\n\t }", "function insertLineContent(line, builder, styles) {\n\t\t var spans = line.markedSpans, allText = line.text, at = 0;\n\t\t if (!spans) {\n\t\t for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n\t\t { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\n\t\t return\n\t\t }\n\n\t\t var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n\t\t var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, collapsed, attributes;\n\t\t for (;;) {\n\t\t if (nextChange == pos) { // Update current marker set\n\t\t spanStyle = spanEndStyle = spanStartStyle = css = \"\";\n\t\t attributes = null;\n\t\t collapsed = null; nextChange = Infinity;\n\t\t var foundBookmarks = [], endStyles = (void 0);\n\t\t for (var j = 0; j < spans.length; ++j) {\n\t\t var sp = spans[j], m = sp.marker;\n\t\t if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n\t\t foundBookmarks.push(m);\n\t\t } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n\t\t if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n\t\t nextChange = sp.to;\n\t\t spanEndStyle = \"\";\n\t\t }\n\t\t if (m.className) { spanStyle += \" \" + m.className; }\n\t\t if (m.css) { css = (css ? css + \";\" : \"\") + m.css; }\n\t\t if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle; }\n\t\t if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\n\t\t // support for the old title property\n\t\t // https://github.com/codemirror/CodeMirror/pull/5673\n\t\t if (m.title) { (attributes || (attributes = {})).title = m.title; }\n\t\t if (m.attributes) {\n\t\t for (var attr in m.attributes)\n\t\t { (attributes || (attributes = {}))[attr] = m.attributes[attr]; }\n\t\t }\n\t\t if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n\t\t { collapsed = sp; }\n\t\t } else if (sp.from > pos && nextChange > sp.from) {\n\t\t nextChange = sp.from;\n\t\t }\n\t\t }\n\t\t if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n\t\t { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1]; } } }\n\n\t\t if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n\t\t { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\n\t\t if (collapsed && (collapsed.from || 0) == pos) {\n\t\t buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n\t\t collapsed.marker, collapsed.from == null);\n\t\t if (collapsed.to == null) { return }\n\t\t if (collapsed.to == pos) { collapsed = false; }\n\t\t }\n\t\t }\n\t\t if (pos >= len) { break }\n\n\t\t var upto = Math.min(len, nextChange);\n\t\t while (true) {\n\t\t if (text) {\n\t\t var end = pos + text.length;\n\t\t if (!collapsed) {\n\t\t var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n\t\t builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n\t\t spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", css, attributes);\n\t\t }\n\t\t if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n\t\t pos = end;\n\t\t spanStartStyle = \"\";\n\t\t }\n\t\t text = allText.slice(at, at = styles[i++]);\n\t\t style = interpretTokenStyle(styles[i++], builder.cm.options);\n\t\t }\n\t\t }\n\t\t }", "function setSpan(context, span) {\n return api.trace.setSpan(context, span);\n}", "function setSpan(context, span) {\n return api.trace.setSpan(context, span);\n}", "function makeSpan(cl, text) {\n var sp = document.createElement('span');\n sp.appendChild(document.createTextNode(text));\n sp.classList.add(cl);\n return sp;\n}", "function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i = 1; i < styles.length; i+=2)\n builder.addToken(builder, allText.slice(at, at = styles[i]), styleToClass(styles[i+1]));\n return;\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = title = \"\";\n collapsed = null; nextChange = Infinity;\n var foundBookmark = null;\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (sp.from <= pos && (sp.to == null || sp.to > pos)) {\n if (sp.to != null && nextChange > sp.to) { nextChange = sp.to; spanEndStyle = \"\"; }\n if (m.className) spanStyle += \" \" + m.className;\n if (m.startStyle && sp.from == pos) spanStartStyle += \" \" + m.startStyle;\n if (m.endStyle && sp.to == nextChange) spanEndStyle += \" \" + m.endStyle;\n if (m.title && !title) title = m.title;\n if (m.collapsed && (!collapsed || collapsed.marker.size < m.size))\n collapsed = sp;\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n if (m.type == \"bookmark\" && sp.from == pos && m.replacedWith) foundBookmark = m;\n }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) return collapsed.marker.find();\n }\n if (foundBookmark && !collapsed) buildCollapsedSpan(builder, 0, foundBookmark);\n }\n if (pos >= len) break;\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", title);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break;}\n pos = end;\n spanStartStyle = \"\";\n }\n text = allText.slice(at, at = styles[i++]);\n style = styleToClass(styles[i++]);\n }\n }\n }", "annotateLine(annotationId, lineNum, columnStart, columnEnd) {\n let line = this.source_lines[lineNum];\n\n // Add the annotation\n line.glow(\n annotationId,\n columnStart,\n columnEnd,\n event => {\n this.displayTextsForLine(lineNum, event, event.pageX, event.pageY);\n },\n () => {\n this.annotation_text_displayer.hide();\n },\n this.annotations[annotationId].is_remark\n );\n }" ]
[ "0.7691716", "0.7679906", "0.7679906", "0.7669774", "0.7664771", "0.7664771", "0.7664771", "0.7664771", "0.7664771", "0.7664771", "0.7664771", "0.7664771", "0.7664771", "0.7664771", "0.7664771", "0.7613698", "0.7613698", "0.7613698", "0.7580196", "0.708091", "0.7062368", "0.7062368", "0.69769293", "0.66609555", "0.6457428", "0.6401242", "0.6333956", "0.62218225", "0.6190201", "0.6190201", "0.6190201", "0.61757386", "0.6135848", "0.61127853", "0.61127853", "0.6109859", "0.6109859", "0.6097452", "0.6097452", "0.6097452", "0.6097452", "0.6097452", "0.6097452", "0.6097452", "0.6097452", "0.6097452", "0.6097452", "0.6097452", "0.60930735", "0.6090282", "0.60870296", "0.60870296", "0.60870296", "0.60868037", "0.60866046", "0.6071966", "0.6071966", "0.60657966", "0.6063017", "0.6063017", "0.6063017", "0.6063017", "0.6063017", "0.6063017", "0.6063017", "0.6063017", "0.6063017", "0.6063017", "0.6063017", "0.6063017", "0.6063017", "0.6063017", "0.6063017", "0.60496324", "0.6043428", "0.6017045", "0.6017045", "0.6012259", "0.5999873", "0.5989861" ]
0.76913285
16
Used for the algorithm that adjusts markers for a change in the document. These functions cut an array of spans at a given character position, returning an array of remaining chunks (or undefined if nothing remains).
function markedSpansBefore(old, startCh, isInsert) { var nw; if (old) { for (var i = 0; i < old.length; ++i) { var span = old[i], marker = span.marker; var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh); if (startsBefore || span.from == startCh && marker.type == "bookmark" && (!isInsert || !span.marker.insertLeft)) { var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh) ;(nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to)); } } } return nw }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getOldSpans(doc, change) {\n\t\t var found = change[\"spans_\" + doc.id];\n\t\t if (!found) return null;\n\t\t for (var i = 0, nw = []; i < change.text.length; ++i)\n\t\t nw.push(removeClearedSpans(found[i]));\n\t\t return nw;\n\t\t }", "function removeClearedSpans(spans) {\n if (!spans) {\n return null;\n }\n\n var out;\n\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) {\n if (!out) {\n out = spans.slice(0, i);\n }\n } else if (out) {\n out.push(spans[i]);\n }\n }\n\n return !out ? spans : out.length ? out : null;\n } // Retrieve and filter the old marked spans stored in a change event.", "function getOldSpans(doc, change) {\n\t\t var found = change[\"spans_\" + doc.id];\n\t\t if (!found) { return null }\n\t\t var nw = [];\n\t\t for (var i = 0; i < change.text.length; ++i)\n\t\t { nw.push(removeClearedSpans(found[i])); }\n\t\t return nw\n\t\t }", "function getOldSpans(doc, change) {\n\t var found = change[\"spans_\" + doc.id];\n\t if (!found) return null;\n\t for (var i = 0, nw = []; i < change.text.length; ++i)\n\t nw.push(removeClearedSpans(found[i]));\n\t return nw;\n\t }", "function getOldSpans(doc, change) {\n\t var found = change[\"spans_\" + doc.id];\n\t if (!found) return null;\n\t for (var i = 0, nw = []; i < change.text.length; ++i)\n\t nw.push(removeClearedSpans(found[i]));\n\t return nw;\n\t }", "function getOldSpans(doc, change) {\n\t var found = change[\"spans_\" + doc.id];\n\t if (!found) return null;\n\t for (var i = 0, nw = []; i < change.text.length; ++i)\n\t nw.push(removeClearedSpans(found[i]));\n\t return nw;\n\t }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) return null;\n for (var i = 0, nw = []; i < change.text.length; ++i)\n nw.push(removeClearedSpans(found[i]));\n return nw;\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) return null;\n for (var i = 0, nw = []; i < change.text.length; ++i)\n nw.push(removeClearedSpans(found[i]));\n return nw;\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) return null;\n for (var i = 0, nw = []; i < change.text.length; ++i)\n nw.push(removeClearedSpans(found[i]));\n return nw;\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) return null;\n for (var i = 0, nw = []; i < change.text.length; ++i)\n nw.push(removeClearedSpans(found[i]));\n return nw;\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) return null;\n for (var i = 0, nw = []; i < change.text.length; ++i)\n nw.push(removeClearedSpans(found[i]));\n return nw;\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) return null;\n for (var i = 0, nw = []; i < change.text.length; ++i)\n nw.push(removeClearedSpans(found[i]));\n return nw;\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) return null;\n for (var i = 0, nw = []; i < change.text.length; ++i)\n nw.push(removeClearedSpans(found[i]));\n return nw;\n }", "function getOldSpans(doc, change) {\r\n var found = change[\"spans_\" + doc.id];\r\n if (!found) return null;\r\n for (var i = 0, nw = []; i < change.text.length; ++i)\r\n nw.push(removeClearedSpans(found[i]));\r\n return nw;\r\n }", "function getOldSpans(doc, change) {\r\n var found = change[\"spans_\" + doc.id];\r\n if (!found) { return null }\r\n var nw = [];\r\n for (var i = 0; i < change.text.length; ++i)\r\n { nw.push(removeClearedSpans(found[i])); }\r\n return nw\r\n}", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n}", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n}", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n}", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n}", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n}", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n}", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n}", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n}", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n}", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n}", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n}", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id]\n if (!found) { return null }\n var nw = []\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])) }\n return nw\n}", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id]\n if (!found) { return null }\n var nw = []\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])) }\n return nw\n}", "function getOffsetsAfterAccountingForSomeSpecialSelectionCases(allText, offsets) {\n var newOffs = oldOffs = offsets;\n \n // strip leading and trailing white space\n newOffs = getOffsetsAfterStrippingWhiteSpace(allText,newOffs[0],newOffs[1]);\n \n //remove trailing &nbsp; tag if there\n // this can happen if a user shift down-clicks and the following line\n // is empty; dw expands the selection to include the \"<p>nbsp;\"\n // on the next line\n var selStr = allText.substring(newOffs[0],newOffs[1]);\n var chunk = \"&nbsp;\";\n var chunkPos = selStr.lastIndexOf(chunk);\n if (chunkPos!=-1 && chunkPos == (selStr.length - chunk.length)) \n newOffs[1] -= chunk.length;\n\n // remove last tag if it is an opening block tag\n // this can happen if a user shift down-clicks; dw selects the\n // opening block tag on the next paragraph, resulting in a selection like:\n // <p>|some text</p>\n // <p>|more text</p>\n selStr = allText.substring(newOffs[0], newOffs[1]);\n var pattern = /<([^>]*)>$/;\n var result = selStr.match(pattern);\n if (result != null){\n if ( isAContainerTag(result[1]) ){\n newOffs[1] -= result[0].length;\n }\n }\n\n // if selection starts with a closing block tag, remove it\n // this can happen if a user puts the mouse at the end of a line and\n // presses shift-up-arrow to select it\n selStr = allText.substring(newOffs[0],newOffs[1]);\n pattern = /^<\\/([^>]*)>/;\n result = selStr.match(pattern);\n if (result != null){\n if ( isAContainerTag(result[1]) ){\n newOffs[0] += result[0].length;\n }\n }\n\n // strip leading and trailing white space if offsets have changed\n if (newOffs != oldOffs){\n newOffs = getOffsetsAfterStrippingWhiteSpace(allText,newOffs[0],newOffs[1]);\n oldOffs = newOffs;\n }\n\n // account for special list case: selecting the first item in a list\n // can select the opening <ol> or <ul> as well. Strip it.\n newOffs = getOffsetsAfterListCheck(allText,newOffs[0],newOffs[1]);\n\n // strip leading and trailing white space if offsets have changed\n if (newOffs != oldOffs){\n newOffs = getOffsetsAfterStrippingWhiteSpace(allText,newOffs[0],newOffs[1]);\n }\n \n return newOffs;\n\n}", "function calcSplices(current, currentStart, currentEnd, old, oldStart, oldEnd) {\n let prefixCount = 0;\n let suffixCount = 0;\n const minLength = Math.min(currentEnd - currentStart, oldEnd - oldStart);\n\n if (currentStart === 0 && oldStart === 0) {\n prefixCount = sharedPrefix(current, old, minLength);\n }\n\n if (currentEnd === current.length && oldEnd === old.length) {\n suffixCount = sharedSuffix(current, old, minLength - prefixCount);\n }\n\n currentStart += prefixCount;\n oldStart += prefixCount;\n currentEnd -= suffixCount;\n oldEnd -= suffixCount;\n\n if (currentEnd - currentStart === 0 && oldEnd - oldStart === 0) {\n return emptyArray;\n }\n\n if (currentStart === currentEnd) {\n const splice = newSplice(currentStart, [], 0);\n\n while (oldStart < oldEnd) {\n splice.removed.push(old[oldStart++]);\n }\n\n return [splice];\n } else if (oldStart === oldEnd) {\n return [newSplice(currentStart, [], currentEnd - currentStart)];\n }\n\n const ops = spliceOperationsFromEditDistances(calcEditDistances(current, currentStart, currentEnd, old, oldStart, oldEnd));\n const splices = [];\n let splice = void 0;\n let index = currentStart;\n let oldIndex = oldStart;\n\n for (let i = 0; i < ops.length; ++i) {\n switch (ops[i]) {\n case EDIT_LEAVE:\n if (splice !== void 0) {\n splices.push(splice);\n splice = void 0;\n }\n\n index++;\n oldIndex++;\n break;\n\n case EDIT_UPDATE:\n if (splice === void 0) {\n splice = newSplice(index, [], 0);\n }\n\n splice.addedCount++;\n index++;\n splice.removed.push(old[oldIndex]);\n oldIndex++;\n break;\n\n case EDIT_ADD:\n if (splice === void 0) {\n splice = newSplice(index, [], 0);\n }\n\n splice.addedCount++;\n index++;\n break;\n\n case EDIT_DELETE:\n if (splice === void 0) {\n splice = newSplice(index, [], 0);\n }\n\n splice.removed.push(old[oldIndex]);\n oldIndex++;\n break;\n // no default\n }\n }\n\n if (splice !== void 0) {\n splices.push(splice);\n }\n\n return splices;\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i) } }\n else if (out) { out.push(spans[i]) }\n }\n return !out ? spans : out.length ? out : null\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i) } }\n else if (out) { out.push(spans[i]) }\n }\n return !out ? spans : out.length ? out : null\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) return null;\n for (var i = 0, out; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }\n else if (out) out.push(spans[i]);\n }\n return !out ? spans : out.length ? out : null;\n }", "function removeClearedSpans(spans) {\n if (!spans) return null;\n for (var i = 0, out; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }\n else if (out) out.push(spans[i]);\n }\n return !out ? spans : out.length ? out : null;\n }", "function removeClearedSpans(spans) {\n if (!spans) return null;\n for (var i = 0, out; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }\n else if (out) out.push(spans[i]);\n }\n return !out ? spans : out.length ? out : null;\n }", "function removeClearedSpans(spans) {\n if (!spans) return null;\n for (var i = 0, out; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }\n else if (out) out.push(spans[i]);\n }\n return !out ? spans : out.length ? out : null;\n }", "function removeClearedSpans(spans) {\n if (!spans) return null;\n for (var i = 0, out; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }\n else if (out) out.push(spans[i]);\n }\n return !out ? spans : out.length ? out : null;\n }", "function removeClearedSpans(spans) {\n if (!spans) return null;\n for (var i = 0, out; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }\n else if (out) out.push(spans[i]);\n }\n return !out ? spans : out.length ? out : null;\n }", "function removeClearedSpans(spans) {\n if (!spans) return null;\n for (var i = 0, out; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }\n else if (out) out.push(spans[i]);\n }\n return !out ? spans : out.length ? out : null;\n }", "function removeClearedSpans(spans) {\r\n if (!spans) return null;\r\n for (var i = 0, out; i < spans.length; ++i) {\r\n if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }\r\n else if (out) out.push(spans[i]);\r\n }\r\n return !out ? spans : out.length ? out : null;\r\n }", "function cutFirstLastChars() {\n function readCheckValues() {\n let enteredText = document.getElementById('textToCut').value;\n let removePos = document.getElementById('cutSelect').options[select.selectedIndex].value;\n let noChars = document.getElementById('noChars').value;\n\n checkInput();\n\n function checkInput() {\n // ensuring that text was entered\n try {\n if (enteredText.length == 0) {\n msg = \"Text cutter: You have to enter a text\";\n alert(msg);\n console.error(msg);\n throw msg;\n }\n } catch (error) {}\n\n // checking for too low number of characters entered\n try {\n if (enteredText.length < noChars) {\n msg = \"Text cutter: The text entered cannot be shortened because it is shorter than the entered number of characters\";\n alert(msg);\n console.error(msg);\n throw msg;\n }\n } catch (error) {}\n\n // checking if entered number of characters equals text length\n try {\n if (enteredText.length == noChars) {\n msg = \"Text cutter: The result of the shortening would be nothing because the text length equals the entered number of characters\";\n alert(msg);\n console.error(msg);\n throw msg;\n }\n } catch (error) {}\n\n //checking for unselected option\n try {\n if (removePos == \"choose\") {\n msg = \"Text cutter: You have to choose an option\";\n alert(msg);\n console.error(msg);\n throw msg;\n }\n } catch (error) {}\n }\n\n return [enteredText, select, removePos, noChars];\n }\n\n let enteredText = readCheckValues()[0];\n let removePos = readCheckValues()[2];\n let noChars = readCheckValues()[3];\n let output = document.getElementById('cutOutput');\n\n let numberOfLineBreaks = (enteredText.match(/\\n/g) || []).length; // matches all newlines in the global scope\n if (numberOfLineBreaks > 0) { // entered text contains multiple lines\n let outputLines = [];\n let enteredTextArray = enteredText.split(\"\\n\"); // split lines into array\n for (let i = 0; i < enteredTextArray.length; i++) {\n outputLines[i] = RemoveText(enteredTextArray[i], noChars);\n }\n // format output to be properly displayed in textarea\n for (let i = 0; i < outputLines.length; i++) {\n let pElem = document.createElement('p');\n pElem.appendChild(document.createTextNode(outputLines[i]));\n output.appendChild(pElem);\n }\n } else { // entered text contains only one line\n let outputText = RemoveText(enteredText, noChars);\n let pElem = document.createElement('p');\n pElem.appendChild(document.createTextNode(outputText));\n output.appendChild(pElem);\n }\n\n /**\n * Remove specified number of character from line\n * @param {String} line - entered line\n * @param {Number} noChars - number of characters to cut from line\n * @returns line - cut line\n */\n function RemoveText(line, noChars) {\n let line1 = line;\n if (removePos == \"start\") { // remove from start\n line1 = line.substring(noChars, line.length);\n } else { // remove from end\n line1 = line.substring(0, line.length - noChars);\n }\n return line1;\n }\n\n}", "function removeClearedSpans(spans) {\r\n if (!spans) { return null }\r\n var out;\r\n for (var i = 0; i < spans.length; ++i) {\r\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\r\n else if (out) { out.push(spans[i]); }\r\n }\r\n return !out ? spans : out.length ? out : null\r\n}", "function removeClearedSpans(spans) {\n\t\t if (!spans) return null;\n\t\t for (var i = 0, out; i < spans.length; ++i) {\n\t\t if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }\n\t\t else if (out) out.push(spans[i]);\n\t\t }\n\t\t return !out ? spans : out.length ? out : null;\n\t\t }", "function stretchSpansOverChange(doc, change) {\n if (change.full) {\n return null;\n }\n\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n\n if (!oldFirst && !oldLast) {\n return null;\n }\n\n var startCh = change.from.ch,\n endCh = change.to.ch,\n isInsert = cmp(change.from, change.to) == 0; // Get the spans that 'stick out' on both sides\n\n var first = markedSpansBefore(oldFirst, startCh, isInsert);\n var last = markedSpansAfter(oldLast, endCh, isInsert); // Next, merge those two ends\n\n var sameLine = change.text.length == 1,\n offset = lst(change.text).length + (sameLine ? startCh : 0);\n\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i];\n\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker);\n\n if (!found) {\n span.to = startCh;\n } else if (sameLine) {\n span.to = found.to == null ? null : found.to + offset;\n }\n }\n }\n }\n\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i$1 = 0; i$1 < last.length; ++i$1) {\n var span$1 = last[i$1];\n\n if (span$1.to != null) {\n span$1.to += offset;\n }\n\n if (span$1.from == null) {\n var found$1 = getMarkedSpanFor(first, span$1.marker);\n\n if (!found$1) {\n span$1.from = offset;\n\n if (sameLine) {\n (first || (first = [])).push(span$1);\n }\n }\n } else {\n span$1.from += offset;\n\n if (sameLine) {\n (first || (first = [])).push(span$1);\n }\n }\n }\n } // Make sure we didn't create any zero-length spans\n\n\n if (first) {\n first = clearEmptySpans(first);\n }\n\n if (last && last != first) {\n last = clearEmptySpans(last);\n }\n\n var newMarkers = [first];\n\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2,\n gapMarkers;\n\n if (gap > 0 && first) {\n for (var i$2 = 0; i$2 < first.length; ++i$2) {\n if (first[i$2].to == null) {\n (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null));\n }\n }\n }\n\n for (var i$3 = 0; i$3 < gap; ++i$3) {\n newMarkers.push(gapMarkers);\n }\n\n newMarkers.push(last);\n }\n\n return newMarkers;\n } // Remove spans that are empty and don't have a clearWhenEmpty", "function splitAt_(insertPosition) {\n \n}", "function removeClearedSpans(spans) {\n\t\t if (!spans) { return null }\n\t\t var out;\n\t\t for (var i = 0; i < spans.length; ++i) {\n\t\t if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n\t\t else if (out) { out.push(spans[i]); }\n\t\t }\n\t\t return !out ? spans : out.length ? out : null\n\t\t }", "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 stretchSpansOverChange(doc, change) {\n\t\t if (change.full) return null;\n\t\t var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n\t\t var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n\t\t if (!oldFirst && !oldLast) return null;\n\t\t\n\t\t var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n\t\t // Get the spans that 'stick out' on both sides\n\t\t var first = markedSpansBefore(oldFirst, startCh, isInsert);\n\t\t var last = markedSpansAfter(oldLast, endCh, isInsert);\n\t\t\n\t\t // Next, merge those two ends\n\t\t var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n\t\t if (first) {\n\t\t // Fix up .to properties of first\n\t\t for (var i = 0; i < first.length; ++i) {\n\t\t var span = first[i];\n\t\t if (span.to == null) {\n\t\t var found = getMarkedSpanFor(last, span.marker);\n\t\t if (!found) span.to = startCh;\n\t\t else if (sameLine) span.to = found.to == null ? null : found.to + offset;\n\t\t }\n\t\t }\n\t\t }\n\t\t if (last) {\n\t\t // Fix up .from in last (or move them into first in case of sameLine)\n\t\t for (var i = 0; i < last.length; ++i) {\n\t\t var span = last[i];\n\t\t if (span.to != null) span.to += offset;\n\t\t if (span.from == null) {\n\t\t var found = getMarkedSpanFor(first, span.marker);\n\t\t if (!found) {\n\t\t span.from = offset;\n\t\t if (sameLine) (first || (first = [])).push(span);\n\t\t }\n\t\t } else {\n\t\t span.from += offset;\n\t\t if (sameLine) (first || (first = [])).push(span);\n\t\t }\n\t\t }\n\t\t }\n\t\t // Make sure we didn't create any zero-length spans\n\t\t if (first) first = clearEmptySpans(first);\n\t\t if (last && last != first) last = clearEmptySpans(last);\n\t\t\n\t\t var newMarkers = [first];\n\t\t if (!sameLine) {\n\t\t // Fill gap with whole-line-spans\n\t\t var gap = change.text.length - 2, gapMarkers;\n\t\t if (gap > 0 && first)\n\t\t for (var i = 0; i < first.length; ++i)\n\t\t if (first[i].to == null)\n\t\t (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i].marker, null, null));\n\t\t for (var i = 0; i < gap; ++i)\n\t\t newMarkers.push(gapMarkers);\n\t\t newMarkers.push(last);\n\t\t }\n\t\t return newMarkers;\n\t\t }", "function removeSpans(start, end){\n // spans must be ordered\n // normalize span\n if (start > end) {\n var tmp = start;\n start = end;\n end = tmp;\n }\n start = Math.max(0, start);\n end = Math.min(textLength, end);\n if (start === end) { return; }\n // find insertion point\n var n = spans.length,\n i, span,\n iLeft = 0,\n iRight = n;\n while (iLeft < iRight) {\n i = iLeft + iRight >> 1;\n if (end <= spans[i].start) { iRight = i; }\n else if (start >= spans[i].end) { iLeft = i + 1; }\n else { iRight = i; }\n }\n // exclude spans which intersect\n var toremove_start,\n toremove_end;\n while (iRight < n) {\n span = spans[iRight];\n if (span.start > end) {\n break;\n }\n toremove_start = Math.max(span.start, start);\n toremove_end = Math.min(span.end, end);\n // remove span within span\n if (toremove_start > span.start && toremove_end < span.end) {\n spans.splice(iRight + 1, 0, { start: toremove_end, end: span.end });\n span.end = toremove_start;\n iRight += 2;\n n++;\n }\n // remove span from start\n else if (toremove_start === span.start && toremove_end < span.end) {\n span.start = toremove_end;\n iRight++;\n }\n // remove span from end\n else if (toremove_start > span.start && toremove_end === span.end) {\n span.end = toremove_start;\n iRight++;\n }\n // remove span\n else {\n spans.splice(iRight, 1);\n n--;\n }\n }\n}", "function stretchSpansOverChange(doc, change) {\n if (change.full) return null;\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n if (!oldFirst && !oldLast) return null;\n\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n // Get the spans that 'stick out' on both sides\n var first = markedSpansBefore(oldFirst, startCh, isInsert);\n var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n // Next, merge those two ends\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i];\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker);\n if (!found) span.to = startCh;\n else if (sameLine) span.to = found.to == null ? null : found.to + offset;\n }\n }\n }\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i = 0; i < last.length; ++i) {\n var span = last[i];\n if (span.to != null) span.to += offset;\n if (span.from == null) {\n var found = getMarkedSpanFor(first, span.marker);\n if (!found) {\n span.from = offset;\n if (sameLine) (first || (first = [])).push(span);\n }\n } else {\n span.from += offset;\n if (sameLine) (first || (first = [])).push(span);\n }\n }\n }\n // Make sure we didn't create any zero-length spans\n if (first) first = clearEmptySpans(first);\n if (last && last != first) last = clearEmptySpans(last);\n\n var newMarkers = [first];\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2, gapMarkers;\n if (gap > 0 && first)\n for (var i = 0; i < first.length; ++i)\n if (first[i].to == null)\n (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i].marker, null, null));\n for (var i = 0; i < gap; ++i)\n newMarkers.push(gapMarkers);\n newMarkers.push(last);\n }\n return newMarkers;\n }", "function stretchSpansOverChange(doc, change) {\n if (change.full) return null;\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n if (!oldFirst && !oldLast) return null;\n\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n // Get the spans that 'stick out' on both sides\n var first = markedSpansBefore(oldFirst, startCh, isInsert);\n var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n // Next, merge those two ends\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i];\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker);\n if (!found) span.to = startCh;\n else if (sameLine) span.to = found.to == null ? null : found.to + offset;\n }\n }\n }\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i = 0; i < last.length; ++i) {\n var span = last[i];\n if (span.to != null) span.to += offset;\n if (span.from == null) {\n var found = getMarkedSpanFor(first, span.marker);\n if (!found) {\n span.from = offset;\n if (sameLine) (first || (first = [])).push(span);\n }\n } else {\n span.from += offset;\n if (sameLine) (first || (first = [])).push(span);\n }\n }\n }\n // Make sure we didn't create any zero-length spans\n if (first) first = clearEmptySpans(first);\n if (last && last != first) last = clearEmptySpans(last);\n\n var newMarkers = [first];\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2, gapMarkers;\n if (gap > 0 && first)\n for (var i = 0; i < first.length; ++i)\n if (first[i].to == null)\n (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i].marker, null, null));\n for (var i = 0; i < gap; ++i)\n newMarkers.push(gapMarkers);\n newMarkers.push(last);\n }\n return newMarkers;\n }", "function stretchSpansOverChange(doc, change) {\n if (change.full) return null;\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n if (!oldFirst && !oldLast) return null;\n\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n // Get the spans that 'stick out' on both sides\n var first = markedSpansBefore(oldFirst, startCh, isInsert);\n var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n // Next, merge those two ends\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i];\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker);\n if (!found) span.to = startCh;\n else if (sameLine) span.to = found.to == null ? null : found.to + offset;\n }\n }\n }\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i = 0; i < last.length; ++i) {\n var span = last[i];\n if (span.to != null) span.to += offset;\n if (span.from == null) {\n var found = getMarkedSpanFor(first, span.marker);\n if (!found) {\n span.from = offset;\n if (sameLine) (first || (first = [])).push(span);\n }\n } else {\n span.from += offset;\n if (sameLine) (first || (first = [])).push(span);\n }\n }\n }\n // Make sure we didn't create any zero-length spans\n if (first) first = clearEmptySpans(first);\n if (last && last != first) last = clearEmptySpans(last);\n\n var newMarkers = [first];\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2, gapMarkers;\n if (gap > 0 && first)\n for (var i = 0; i < first.length; ++i)\n if (first[i].to == null)\n (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i].marker, null, null));\n for (var i = 0; i < gap; ++i)\n newMarkers.push(gapMarkers);\n newMarkers.push(last);\n }\n return newMarkers;\n }", "function stretchSpansOverChange(doc, change) {\n if (change.full) return null;\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n if (!oldFirst && !oldLast) return null;\n\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n // Get the spans that 'stick out' on both sides\n var first = markedSpansBefore(oldFirst, startCh, isInsert);\n var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n // Next, merge those two ends\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i];\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker);\n if (!found) span.to = startCh;\n else if (sameLine) span.to = found.to == null ? null : found.to + offset;\n }\n }\n }\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i = 0; i < last.length; ++i) {\n var span = last[i];\n if (span.to != null) span.to += offset;\n if (span.from == null) {\n var found = getMarkedSpanFor(first, span.marker);\n if (!found) {\n span.from = offset;\n if (sameLine) (first || (first = [])).push(span);\n }\n } else {\n span.from += offset;\n if (sameLine) (first || (first = [])).push(span);\n }\n }\n }\n // Make sure we didn't create any zero-length spans\n if (first) first = clearEmptySpans(first);\n if (last && last != first) last = clearEmptySpans(last);\n\n var newMarkers = [first];\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2, gapMarkers;\n if (gap > 0 && first)\n for (var i = 0; i < first.length; ++i)\n if (first[i].to == null)\n (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i].marker, null, null));\n for (var i = 0; i < gap; ++i)\n newMarkers.push(gapMarkers);\n newMarkers.push(last);\n }\n return newMarkers;\n }", "function sliceText(text, offsets) {\n return text.slice(offsets.start, text.length - offsets.end);\n}", "function slice_Method() {\n var Sentence = \"All work and no play makes Jonny a dull boy.\";\n var Section = Sentence.slice(27,33);\n document.getElementById(\"Slice\").innerHTML = Section;\n}", "function stretchSpansOverChange(doc, change) {\n if (change.full) { return null }\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans\n if (!oldFirst && !oldLast) { return null }\n\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0\n // Get the spans that 'stick out' on both sides\n var first = markedSpansBefore(oldFirst, startCh, isInsert)\n var last = markedSpansAfter(oldLast, endCh, isInsert)\n\n // Next, merge those two ends\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0)\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i]\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker)\n if (!found) { span.to = startCh }\n else if (sameLine) { span.to = found.to == null ? null : found.to + offset }\n }\n }\n }\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i$1 = 0; i$1 < last.length; ++i$1) {\n var span$1 = last[i$1]\n if (span$1.to != null) { span$1.to += offset }\n if (span$1.from == null) {\n var found$1 = getMarkedSpanFor(first, span$1.marker)\n if (!found$1) {\n span$1.from = offset\n if (sameLine) { (first || (first = [])).push(span$1) }\n }\n } else {\n span$1.from += offset\n if (sameLine) { (first || (first = [])).push(span$1) }\n }\n }\n }\n // Make sure we didn't create any zero-length spans\n if (first) { first = clearEmptySpans(first) }\n if (last && last != first) { last = clearEmptySpans(last) }\n\n var newMarkers = [first]\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2, gapMarkers\n if (gap > 0 && first)\n { for (var i$2 = 0; i$2 < first.length; ++i$2)\n { if (first[i$2].to == null)\n { (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null)) } } }\n for (var i$3 = 0; i$3 < gap; ++i$3)\n { newMarkers.push(gapMarkers) }\n newMarkers.push(last)\n }\n return newMarkers\n}" ]
[ "0.54900527", "0.54873455", "0.54783535", "0.5464072", "0.5464072", "0.5464072", "0.54564095", "0.54564095", "0.54564095", "0.54564095", "0.54564095", "0.54564095", "0.54564095", "0.5442161", "0.5439783", "0.54207414", "0.54207414", "0.54207414", "0.54207414", "0.54207414", "0.54207414", "0.54207414", "0.54207414", "0.54207414", "0.54207414", "0.54207414", "0.54207414", "0.54207414", "0.54207414", "0.54207414", "0.54207414", "0.54207414", "0.5393398", "0.5393398", "0.5393398", "0.5393398", "0.5393398", "0.5393398", "0.5393398", "0.5393398", "0.5393398", "0.5393398", "0.5393398", "0.5370149", "0.5370149", "0.5368723", "0.5267426", "0.52430874", "0.52430874", "0.51823634", "0.51823634", "0.51823634", "0.51823634", "0.51823634", "0.51823634", "0.51823634", "0.51823634", "0.51823634", "0.51823634", "0.51823634", "0.51807326", "0.51807326", "0.51807326", "0.51807326", "0.51807326", "0.51807326", "0.51807326", "0.51807326", "0.51807326", "0.51807326", "0.51807326", "0.51807326", "0.51807326", "0.51807326", "0.51807326", "0.51807326", "0.51807326", "0.5179028", "0.5179028", "0.5179028", "0.5179028", "0.5179028", "0.5179028", "0.5179028", "0.5174866", "0.51743716", "0.5173642", "0.5157899", "0.5148367", "0.5146984", "0.51353085", "0.5130573", "0.5130256", "0.5122894", "0.511099", "0.511099", "0.511099", "0.511099", "0.50944114", "0.5092461", "0.50878084" ]
0.0
-1
Given a change object, compute the new set of marker spans that cover the line in which the change took place. Removes spans entirely within the change, reconnects spans belonging to the same marker that appear on both sides of the change, and cuts off spans partially within the change. Returns an array of span arrays with one element for each line in (after) the change.
function stretchSpansOverChange(doc, change) { if (change.full) { return null } var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans; var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans; if (!oldFirst && !oldLast) { return null } var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0; // Get the spans that 'stick out' on both sides var first = markedSpansBefore(oldFirst, startCh, isInsert); var last = markedSpansAfter(oldLast, endCh, isInsert); // Next, merge those two ends var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0); if (first) { // Fix up .to properties of first for (var i = 0; i < first.length; ++i) { var span = first[i]; if (span.to == null) { var found = getMarkedSpanFor(last, span.marker); if (!found) { span.to = startCh; } else if (sameLine) { span.to = found.to == null ? null : found.to + offset; } } } } if (last) { // Fix up .from in last (or move them into first in case of sameLine) for (var i$1 = 0; i$1 < last.length; ++i$1) { var span$1 = last[i$1]; if (span$1.to != null) { span$1.to += offset; } if (span$1.from == null) { var found$1 = getMarkedSpanFor(first, span$1.marker); if (!found$1) { span$1.from = offset; if (sameLine) { (first || (first = [])).push(span$1); } } } else { span$1.from += offset; if (sameLine) { (first || (first = [])).push(span$1); } } } } // Make sure we didn't create any zero-length spans if (first) { first = clearEmptySpans(first); } if (last && last != first) { last = clearEmptySpans(last); } var newMarkers = [first]; if (!sameLine) { // Fill gap with whole-line-spans var gap = change.text.length - 2, gapMarkers; if (gap > 0 && first) { for (var i$2 = 0; i$2 < first.length; ++i$2) { if (first[i$2].to == null) { (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null)); } } } for (var i$3 = 0; i$3 < gap; ++i$3) { newMarkers.push(gapMarkers); } newMarkers.push(last); } return newMarkers }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) return null;\n for (var i = 0, nw = []; i < change.text.length; ++i)\n nw.push(removeClearedSpans(found[i]));\n return nw;\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) return null;\n for (var i = 0, nw = []; i < change.text.length; ++i)\n nw.push(removeClearedSpans(found[i]));\n return nw;\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) return null;\n for (var i = 0, nw = []; i < change.text.length; ++i)\n nw.push(removeClearedSpans(found[i]));\n return nw;\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) return null;\n for (var i = 0, nw = []; i < change.text.length; ++i)\n nw.push(removeClearedSpans(found[i]));\n return nw;\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) return null;\n for (var i = 0, nw = []; i < change.text.length; ++i)\n nw.push(removeClearedSpans(found[i]));\n return nw;\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) return null;\n for (var i = 0, nw = []; i < change.text.length; ++i)\n nw.push(removeClearedSpans(found[i]));\n return nw;\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) return null;\n for (var i = 0, nw = []; i < change.text.length; ++i)\n nw.push(removeClearedSpans(found[i]));\n return nw;\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "function stretchSpansOverChange(doc, change) {\n if (change.full) {\n return null;\n }\n\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n\n if (!oldFirst && !oldLast) {\n return null;\n }\n\n var startCh = change.from.ch,\n endCh = change.to.ch,\n isInsert = cmp(change.from, change.to) == 0; // Get the spans that 'stick out' on both sides\n\n var first = markedSpansBefore(oldFirst, startCh, isInsert);\n var last = markedSpansAfter(oldLast, endCh, isInsert); // Next, merge those two ends\n\n var sameLine = change.text.length == 1,\n offset = lst(change.text).length + (sameLine ? startCh : 0);\n\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i];\n\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker);\n\n if (!found) {\n span.to = startCh;\n } else if (sameLine) {\n span.to = found.to == null ? null : found.to + offset;\n }\n }\n }\n }\n\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i$1 = 0; i$1 < last.length; ++i$1) {\n var span$1 = last[i$1];\n\n if (span$1.to != null) {\n span$1.to += offset;\n }\n\n if (span$1.from == null) {\n var found$1 = getMarkedSpanFor(first, span$1.marker);\n\n if (!found$1) {\n span$1.from = offset;\n\n if (sameLine) {\n (first || (first = [])).push(span$1);\n }\n }\n } else {\n span$1.from += offset;\n\n if (sameLine) {\n (first || (first = [])).push(span$1);\n }\n }\n }\n } // Make sure we didn't create any zero-length spans\n\n\n if (first) {\n first = clearEmptySpans(first);\n }\n\n if (last && last != first) {\n last = clearEmptySpans(last);\n }\n\n var newMarkers = [first];\n\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2,\n gapMarkers;\n\n if (gap > 0 && first) {\n for (var i$2 = 0; i$2 < first.length; ++i$2) {\n if (first[i$2].to == null) {\n (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null));\n }\n }\n }\n\n for (var i$3 = 0; i$3 < gap; ++i$3) {\n newMarkers.push(gapMarkers);\n }\n\n newMarkers.push(last);\n }\n\n return newMarkers;\n } // Remove spans that are empty and don't have a clearWhenEmpty", "function getOldSpans(doc, change) {\n\t var found = change[\"spans_\" + doc.id];\n\t if (!found) return null;\n\t for (var i = 0, nw = []; i < change.text.length; ++i)\n\t nw.push(removeClearedSpans(found[i]));\n\t return nw;\n\t }", "function getOldSpans(doc, change) {\n\t var found = change[\"spans_\" + doc.id];\n\t if (!found) return null;\n\t for (var i = 0, nw = []; i < change.text.length; ++i)\n\t nw.push(removeClearedSpans(found[i]));\n\t return nw;\n\t }", "function getOldSpans(doc, change) {\n\t var found = change[\"spans_\" + doc.id];\n\t if (!found) return null;\n\t for (var i = 0, nw = []; i < change.text.length; ++i)\n\t nw.push(removeClearedSpans(found[i]));\n\t return nw;\n\t }", "function getOldSpans(doc, change) {\r\n var found = change[\"spans_\" + doc.id];\r\n if (!found) return null;\r\n for (var i = 0, nw = []; i < change.text.length; ++i)\r\n nw.push(removeClearedSpans(found[i]));\r\n return nw;\r\n }", "function getOldSpans(doc, change) {\r\n var found = change[\"spans_\" + doc.id];\r\n if (!found) { return null }\r\n var nw = [];\r\n for (var i = 0; i < change.text.length; ++i)\r\n { nw.push(removeClearedSpans(found[i])); }\r\n return nw\r\n}", "function getOldSpans(doc, change) {\n\t\t var found = change[\"spans_\" + doc.id];\n\t\t if (!found) { return null }\n\t\t var nw = [];\n\t\t for (var i = 0; i < change.text.length; ++i)\n\t\t { nw.push(removeClearedSpans(found[i])); }\n\t\t return nw\n\t\t }", "function stretchSpansOverChange(doc, change) {\n if (change.full) return null;\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n if (!oldFirst && !oldLast) return null;\n\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n // Get the spans that 'stick out' on both sides\n var first = markedSpansBefore(oldFirst, startCh, isInsert);\n var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n // Next, merge those two ends\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i];\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker);\n if (!found) span.to = startCh;\n else if (sameLine) span.to = found.to == null ? null : found.to + offset;\n }\n }\n }\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i = 0; i < last.length; ++i) {\n var span = last[i];\n if (span.to != null) span.to += offset;\n if (span.from == null) {\n var found = getMarkedSpanFor(first, span.marker);\n if (!found) {\n span.from = offset;\n if (sameLine) (first || (first = [])).push(span);\n }\n } else {\n span.from += offset;\n if (sameLine) (first || (first = [])).push(span);\n }\n }\n }\n // Make sure we didn't create any zero-length spans\n if (first) first = clearEmptySpans(first);\n if (last && last != first) last = clearEmptySpans(last);\n\n var newMarkers = [first];\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2, gapMarkers;\n if (gap > 0 && first)\n for (var i = 0; i < first.length; ++i)\n if (first[i].to == null)\n (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i].marker, null, null));\n for (var i = 0; i < gap; ++i)\n newMarkers.push(gapMarkers);\n newMarkers.push(last);\n }\n return newMarkers;\n }", "function stretchSpansOverChange(doc, change) {\n if (change.full) return null;\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n if (!oldFirst && !oldLast) return null;\n\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n // Get the spans that 'stick out' on both sides\n var first = markedSpansBefore(oldFirst, startCh, isInsert);\n var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n // Next, merge those two ends\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i];\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker);\n if (!found) span.to = startCh;\n else if (sameLine) span.to = found.to == null ? null : found.to + offset;\n }\n }\n }\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i = 0; i < last.length; ++i) {\n var span = last[i];\n if (span.to != null) span.to += offset;\n if (span.from == null) {\n var found = getMarkedSpanFor(first, span.marker);\n if (!found) {\n span.from = offset;\n if (sameLine) (first || (first = [])).push(span);\n }\n } else {\n span.from += offset;\n if (sameLine) (first || (first = [])).push(span);\n }\n }\n }\n // Make sure we didn't create any zero-length spans\n if (first) first = clearEmptySpans(first);\n if (last && last != first) last = clearEmptySpans(last);\n\n var newMarkers = [first];\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2, gapMarkers;\n if (gap > 0 && first)\n for (var i = 0; i < first.length; ++i)\n if (first[i].to == null)\n (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i].marker, null, null));\n for (var i = 0; i < gap; ++i)\n newMarkers.push(gapMarkers);\n newMarkers.push(last);\n }\n return newMarkers;\n }", "function stretchSpansOverChange(doc, change) {\n if (change.full) return null;\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n if (!oldFirst && !oldLast) return null;\n\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n // Get the spans that 'stick out' on both sides\n var first = markedSpansBefore(oldFirst, startCh, isInsert);\n var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n // Next, merge those two ends\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i];\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker);\n if (!found) span.to = startCh;\n else if (sameLine) span.to = found.to == null ? null : found.to + offset;\n }\n }\n }\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i = 0; i < last.length; ++i) {\n var span = last[i];\n if (span.to != null) span.to += offset;\n if (span.from == null) {\n var found = getMarkedSpanFor(first, span.marker);\n if (!found) {\n span.from = offset;\n if (sameLine) (first || (first = [])).push(span);\n }\n } else {\n span.from += offset;\n if (sameLine) (first || (first = [])).push(span);\n }\n }\n }\n // Make sure we didn't create any zero-length spans\n if (first) first = clearEmptySpans(first);\n if (last && last != first) last = clearEmptySpans(last);\n\n var newMarkers = [first];\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2, gapMarkers;\n if (gap > 0 && first)\n for (var i = 0; i < first.length; ++i)\n if (first[i].to == null)\n (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i].marker, null, null));\n for (var i = 0; i < gap; ++i)\n newMarkers.push(gapMarkers);\n newMarkers.push(last);\n }\n return newMarkers;\n }", "function stretchSpansOverChange(doc, change) {\n if (change.full) return null;\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n if (!oldFirst && !oldLast) return null;\n\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n // Get the spans that 'stick out' on both sides\n var first = markedSpansBefore(oldFirst, startCh, isInsert);\n var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n // Next, merge those two ends\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i];\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker);\n if (!found) span.to = startCh;\n else if (sameLine) span.to = found.to == null ? null : found.to + offset;\n }\n }\n }\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i = 0; i < last.length; ++i) {\n var span = last[i];\n if (span.to != null) span.to += offset;\n if (span.from == null) {\n var found = getMarkedSpanFor(first, span.marker);\n if (!found) {\n span.from = offset;\n if (sameLine) (first || (first = [])).push(span);\n }\n } else {\n span.from += offset;\n if (sameLine) (first || (first = [])).push(span);\n }\n }\n }\n // Make sure we didn't create any zero-length spans\n if (first) first = clearEmptySpans(first);\n if (last && last != first) last = clearEmptySpans(last);\n\n var newMarkers = [first];\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2, gapMarkers;\n if (gap > 0 && first)\n for (var i = 0; i < first.length; ++i)\n if (first[i].to == null)\n (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i].marker, null, null));\n for (var i = 0; i < gap; ++i)\n newMarkers.push(gapMarkers);\n newMarkers.push(last);\n }\n return newMarkers;\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n}", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n}", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n}", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n}", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n}", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n}", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n}", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n}", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n}", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n}", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n}", "function stretchSpansOverChange(doc, change) {\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n if (!oldFirst && !oldLast) return null;\n\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n // Get the spans that 'stick out' on both sides\n var first = markedSpansBefore(oldFirst, startCh, isInsert);\n var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n // Next, merge those two ends\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i];\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker);\n if (!found) span.to = startCh;\n else if (sameLine) span.to = found.to == null ? null : found.to + offset;\n }\n }\n }\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i = 0; i < last.length; ++i) {\n var span = last[i];\n if (span.to != null) span.to += offset;\n if (span.from == null) {\n var found = getMarkedSpanFor(first, span.marker);\n if (!found) {\n span.from = offset;\n if (sameLine) (first || (first = [])).push(span);\n }\n } else {\n span.from += offset;\n if (sameLine) (first || (first = [])).push(span);\n }\n }\n }\n // Make sure we didn't create any zero-length spans\n if (first) first = clearEmptySpans(first);\n if (last && last != first) last = clearEmptySpans(last);\n\n var newMarkers = [first];\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2, gapMarkers;\n if (gap > 0 && first)\n for (var i = 0; i < first.length; ++i)\n if (first[i].to == null)\n (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i].marker, null, null));\n for (var i = 0; i < gap; ++i)\n newMarkers.push(gapMarkers);\n newMarkers.push(last);\n }\n return newMarkers;\n }", "function stretchSpansOverChange(doc, change) {\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n if (!oldFirst && !oldLast) return null;\n\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n // Get the spans that 'stick out' on both sides\n var first = markedSpansBefore(oldFirst, startCh, isInsert);\n var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n // Next, merge those two ends\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i];\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker);\n if (!found) span.to = startCh;\n else if (sameLine) span.to = found.to == null ? null : found.to + offset;\n }\n }\n }\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i = 0; i < last.length; ++i) {\n var span = last[i];\n if (span.to != null) span.to += offset;\n if (span.from == null) {\n var found = getMarkedSpanFor(first, span.marker);\n if (!found) {\n span.from = offset;\n if (sameLine) (first || (first = [])).push(span);\n }\n } else {\n span.from += offset;\n if (sameLine) (first || (first = [])).push(span);\n }\n }\n }\n // Make sure we didn't create any zero-length spans\n if (first) first = clearEmptySpans(first);\n if (last && last != first) last = clearEmptySpans(last);\n\n var newMarkers = [first];\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2, gapMarkers;\n if (gap > 0 && first)\n for (var i = 0; i < first.length; ++i)\n if (first[i].to == null)\n (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i].marker, null, null));\n for (var i = 0; i < gap; ++i)\n newMarkers.push(gapMarkers);\n newMarkers.push(last);\n }\n return newMarkers;\n }", "function stretchSpansOverChange(doc, change) {\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n if (!oldFirst && !oldLast) return null;\n\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n // Get the spans that 'stick out' on both sides\n var first = markedSpansBefore(oldFirst, startCh, isInsert);\n var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n // Next, merge those two ends\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i];\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker);\n if (!found) span.to = startCh;\n else if (sameLine) span.to = found.to == null ? null : found.to + offset;\n }\n }\n }\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i = 0; i < last.length; ++i) {\n var span = last[i];\n if (span.to != null) span.to += offset;\n if (span.from == null) {\n var found = getMarkedSpanFor(first, span.marker);\n if (!found) {\n span.from = offset;\n if (sameLine) (first || (first = [])).push(span);\n }\n } else {\n span.from += offset;\n if (sameLine) (first || (first = [])).push(span);\n }\n }\n }\n // Make sure we didn't create any zero-length spans\n if (first) first = clearEmptySpans(first);\n if (last && last != first) last = clearEmptySpans(last);\n\n var newMarkers = [first];\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2, gapMarkers;\n if (gap > 0 && first)\n for (var i = 0; i < first.length; ++i)\n if (first[i].to == null)\n (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i].marker, null, null));\n for (var i = 0; i < gap; ++i)\n newMarkers.push(gapMarkers);\n newMarkers.push(last);\n }\n return newMarkers;\n }", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id]\n if (!found) { return null }\n var nw = []\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])) }\n return nw\n}", "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id]\n if (!found) { return null }\n var nw = []\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])) }\n return nw\n}", "function stretchSpansOverChange(doc, change) {\n\t if (change.full) return null;\n\t var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n\t var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n\t if (!oldFirst && !oldLast) return null;\n\n\t var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n\t // Get the spans that 'stick out' on both sides\n\t var first = markedSpansBefore(oldFirst, startCh, isInsert);\n\t var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n\t // Next, merge those two ends\n\t var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n\t if (first) {\n\t // Fix up .to properties of first\n\t for (var i = 0; i < first.length; ++i) {\n\t var span = first[i];\n\t if (span.to == null) {\n\t var found = getMarkedSpanFor(last, span.marker);\n\t if (!found) span.to = startCh;\n\t else if (sameLine) span.to = found.to == null ? null : found.to + offset;\n\t }\n\t }\n\t }\n\t if (last) {\n\t // Fix up .from in last (or move them into first in case of sameLine)\n\t for (var i = 0; i < last.length; ++i) {\n\t var span = last[i];\n\t if (span.to != null) span.to += offset;\n\t if (span.from == null) {\n\t var found = getMarkedSpanFor(first, span.marker);\n\t if (!found) {\n\t span.from = offset;\n\t if (sameLine) (first || (first = [])).push(span);\n\t }\n\t } else {\n\t span.from += offset;\n\t if (sameLine) (first || (first = [])).push(span);\n\t }\n\t }\n\t }\n\t // Make sure we didn't create any zero-length spans\n\t if (first) first = clearEmptySpans(first);\n\t if (last && last != first) last = clearEmptySpans(last);\n\n\t var newMarkers = [first];\n\t if (!sameLine) {\n\t // Fill gap with whole-line-spans\n\t var gap = change.text.length - 2, gapMarkers;\n\t if (gap > 0 && first)\n\t for (var i = 0; i < first.length; ++i)\n\t if (first[i].to == null)\n\t (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i].marker, null, null));\n\t for (var i = 0; i < gap; ++i)\n\t newMarkers.push(gapMarkers);\n\t newMarkers.push(last);\n\t }\n\t return newMarkers;\n\t }", "function stretchSpansOverChange(doc, change) {\n\t if (change.full) return null;\n\t var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n\t var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n\t if (!oldFirst && !oldLast) return null;\n\n\t var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n\t // Get the spans that 'stick out' on both sides\n\t var first = markedSpansBefore(oldFirst, startCh, isInsert);\n\t var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n\t // Next, merge those two ends\n\t var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n\t if (first) {\n\t // Fix up .to properties of first\n\t for (var i = 0; i < first.length; ++i) {\n\t var span = first[i];\n\t if (span.to == null) {\n\t var found = getMarkedSpanFor(last, span.marker);\n\t if (!found) span.to = startCh;\n\t else if (sameLine) span.to = found.to == null ? null : found.to + offset;\n\t }\n\t }\n\t }\n\t if (last) {\n\t // Fix up .from in last (or move them into first in case of sameLine)\n\t for (var i = 0; i < last.length; ++i) {\n\t var span = last[i];\n\t if (span.to != null) span.to += offset;\n\t if (span.from == null) {\n\t var found = getMarkedSpanFor(first, span.marker);\n\t if (!found) {\n\t span.from = offset;\n\t if (sameLine) (first || (first = [])).push(span);\n\t }\n\t } else {\n\t span.from += offset;\n\t if (sameLine) (first || (first = [])).push(span);\n\t }\n\t }\n\t }\n\t // Make sure we didn't create any zero-length spans\n\t if (first) first = clearEmptySpans(first);\n\t if (last && last != first) last = clearEmptySpans(last);\n\n\t var newMarkers = [first];\n\t if (!sameLine) {\n\t // Fill gap with whole-line-spans\n\t var gap = change.text.length - 2, gapMarkers;\n\t if (gap > 0 && first)\n\t for (var i = 0; i < first.length; ++i)\n\t if (first[i].to == null)\n\t (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i].marker, null, null));\n\t for (var i = 0; i < gap; ++i)\n\t newMarkers.push(gapMarkers);\n\t newMarkers.push(last);\n\t }\n\t return newMarkers;\n\t }", "function getOldSpans(doc, change) {\n\t\t var found = change[\"spans_\" + doc.id];\n\t\t if (!found) return null;\n\t\t for (var i = 0, nw = []; i < change.text.length; ++i)\n\t\t nw.push(removeClearedSpans(found[i]));\n\t\t return nw;\n\t\t }", "function stretchSpansOverChange(doc, change) {\n\t\t if (change.full) return null;\n\t\t var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n\t\t var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n\t\t if (!oldFirst && !oldLast) return null;\n\t\t\n\t\t var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n\t\t // Get the spans that 'stick out' on both sides\n\t\t var first = markedSpansBefore(oldFirst, startCh, isInsert);\n\t\t var last = markedSpansAfter(oldLast, endCh, isInsert);\n\t\t\n\t\t // Next, merge those two ends\n\t\t var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n\t\t if (first) {\n\t\t // Fix up .to properties of first\n\t\t for (var i = 0; i < first.length; ++i) {\n\t\t var span = first[i];\n\t\t if (span.to == null) {\n\t\t var found = getMarkedSpanFor(last, span.marker);\n\t\t if (!found) span.to = startCh;\n\t\t else if (sameLine) span.to = found.to == null ? null : found.to + offset;\n\t\t }\n\t\t }\n\t\t }\n\t\t if (last) {\n\t\t // Fix up .from in last (or move them into first in case of sameLine)\n\t\t for (var i = 0; i < last.length; ++i) {\n\t\t var span = last[i];\n\t\t if (span.to != null) span.to += offset;\n\t\t if (span.from == null) {\n\t\t var found = getMarkedSpanFor(first, span.marker);\n\t\t if (!found) {\n\t\t span.from = offset;\n\t\t if (sameLine) (first || (first = [])).push(span);\n\t\t }\n\t\t } else {\n\t\t span.from += offset;\n\t\t if (sameLine) (first || (first = [])).push(span);\n\t\t }\n\t\t }\n\t\t }\n\t\t // Make sure we didn't create any zero-length spans\n\t\t if (first) first = clearEmptySpans(first);\n\t\t if (last && last != first) last = clearEmptySpans(last);\n\t\t\n\t\t var newMarkers = [first];\n\t\t if (!sameLine) {\n\t\t // Fill gap with whole-line-spans\n\t\t var gap = change.text.length - 2, gapMarkers;\n\t\t if (gap > 0 && first)\n\t\t for (var i = 0; i < first.length; ++i)\n\t\t if (first[i].to == null)\n\t\t (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i].marker, null, null));\n\t\t for (var i = 0; i < gap; ++i)\n\t\t newMarkers.push(gapMarkers);\n\t\t newMarkers.push(last);\n\t\t }\n\t\t return newMarkers;\n\t\t }", "function stretchSpansOverChange(doc, change) {\r\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\r\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\r\n if (!oldFirst && !oldLast) return null;\r\n\r\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\r\n // Get the spans that 'stick out' on both sides\r\n var first = markedSpansBefore(oldFirst, startCh, isInsert);\r\n var last = markedSpansAfter(oldLast, endCh, isInsert);\r\n\r\n // Next, merge those two ends\r\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\r\n if (first) {\r\n // Fix up .to properties of first\r\n for (var i = 0; i < first.length; ++i) {\r\n var span = first[i];\r\n if (span.to == null) {\r\n var found = getMarkedSpanFor(last, span.marker);\r\n if (!found) span.to = startCh;\r\n else if (sameLine) span.to = found.to == null ? null : found.to + offset;\r\n }\r\n }\r\n }\r\n if (last) {\r\n // Fix up .from in last (or move them into first in case of sameLine)\r\n for (var i = 0; i < last.length; ++i) {\r\n var span = last[i];\r\n if (span.to != null) span.to += offset;\r\n if (span.from == null) {\r\n var found = getMarkedSpanFor(first, span.marker);\r\n if (!found) {\r\n span.from = offset;\r\n if (sameLine) (first || (first = [])).push(span);\r\n }\r\n } else {\r\n span.from += offset;\r\n if (sameLine) (first || (first = [])).push(span);\r\n }\r\n }\r\n }\r\n // Make sure we didn't create any zero-length spans\r\n if (first) first = clearEmptySpans(first);\r\n if (last && last != first) last = clearEmptySpans(last);\r\n\r\n var newMarkers = [first];\r\n if (!sameLine) {\r\n // Fill gap with whole-line-spans\r\n var gap = change.text.length - 2, gapMarkers;\r\n if (gap > 0 && first)\r\n for (var i = 0; i < first.length; ++i)\r\n if (first[i].to == null)\r\n (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i].marker, null, null));\r\n for (var i = 0; i < gap; ++i)\r\n newMarkers.push(gapMarkers);\r\n newMarkers.push(last);\r\n }\r\n return newMarkers;\r\n }", "function stretchSpansOverChange(doc, change) {\n\t if (change.full) return null;\n\t var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n\t var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n\t if (!oldFirst && !oldLast) return null;\n\t\n\t var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n\t // Get the spans that 'stick out' on both sides\n\t var first = markedSpansBefore(oldFirst, startCh, isInsert);\n\t var last = markedSpansAfter(oldLast, endCh, isInsert);\n\t\n\t // Next, merge those two ends\n\t var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n\t if (first) {\n\t // Fix up .to properties of first\n\t for (var i = 0; i < first.length; ++i) {\n\t var span = first[i];\n\t if (span.to == null) {\n\t var found = getMarkedSpanFor(last, span.marker);\n\t if (!found) span.to = startCh;\n\t else if (sameLine) span.to = found.to == null ? null : found.to + offset;\n\t }\n\t }\n\t }\n\t if (last) {\n\t // Fix up .from in last (or move them into first in case of sameLine)\n\t for (var i = 0; i < last.length; ++i) {\n\t var span = last[i];\n\t if (span.to != null) span.to += offset;\n\t if (span.from == null) {\n\t var found = getMarkedSpanFor(first, span.marker);\n\t if (!found) {\n\t span.from = offset;\n\t if (sameLine) (first || (first = [])).push(span);\n\t }\n\t } else {\n\t span.from += offset;\n\t if (sameLine) (first || (first = [])).push(span);\n\t }\n\t }\n\t }\n\t // Make sure we didn't create any zero-length spans\n\t if (first) first = clearEmptySpans(first);\n\t if (last && last != first) last = clearEmptySpans(last);\n\t\n\t var newMarkers = [first];\n\t if (!sameLine) {\n\t // Fill gap with whole-line-spans\n\t var gap = change.text.length - 2, gapMarkers;\n\t if (gap > 0 && first)\n\t for (var i = 0; i < first.length; ++i)\n\t if (first[i].to == null)\n\t (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i].marker, null, null));\n\t for (var i = 0; i < gap; ++i)\n\t newMarkers.push(gapMarkers);\n\t newMarkers.push(last);\n\t }\n\t return newMarkers;\n\t }", "function stretchSpansOverChange(doc, change) {\n if (change.full) { return null }\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans\n if (!oldFirst && !oldLast) { return null }\n\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0\n // Get the spans that 'stick out' on both sides\n var first = markedSpansBefore(oldFirst, startCh, isInsert)\n var last = markedSpansAfter(oldLast, endCh, isInsert)\n\n // Next, merge those two ends\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0)\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i]\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker)\n if (!found) { span.to = startCh }\n else if (sameLine) { span.to = found.to == null ? null : found.to + offset }\n }\n }\n }\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i$1 = 0; i$1 < last.length; ++i$1) {\n var span$1 = last[i$1]\n if (span$1.to != null) { span$1.to += offset }\n if (span$1.from == null) {\n var found$1 = getMarkedSpanFor(first, span$1.marker)\n if (!found$1) {\n span$1.from = offset\n if (sameLine) { (first || (first = [])).push(span$1) }\n }\n } else {\n span$1.from += offset\n if (sameLine) { (first || (first = [])).push(span$1) }\n }\n }\n }\n // Make sure we didn't create any zero-length spans\n if (first) { first = clearEmptySpans(first) }\n if (last && last != first) { last = clearEmptySpans(last) }\n\n var newMarkers = [first]\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2, gapMarkers\n if (gap > 0 && first)\n { for (var i$2 = 0; i$2 < first.length; ++i$2)\n { if (first[i$2].to == null)\n { (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null)) } } }\n for (var i$3 = 0; i$3 < gap; ++i$3)\n { newMarkers.push(gapMarkers) }\n newMarkers.push(last)\n }\n return newMarkers\n}", "function stretchSpansOverChange(doc, change) {\n if (change.full) { return null }\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans\n if (!oldFirst && !oldLast) { return null }\n\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0\n // Get the spans that 'stick out' on both sides\n var first = markedSpansBefore(oldFirst, startCh, isInsert)\n var last = markedSpansAfter(oldLast, endCh, isInsert)\n\n // Next, merge those two ends\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0)\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i]\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker)\n if (!found) { span.to = startCh }\n else if (sameLine) { span.to = found.to == null ? null : found.to + offset }\n }\n }\n }\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i$1 = 0; i$1 < last.length; ++i$1) {\n var span$1 = last[i$1]\n if (span$1.to != null) { span$1.to += offset }\n if (span$1.from == null) {\n var found$1 = getMarkedSpanFor(first, span$1.marker)\n if (!found$1) {\n span$1.from = offset\n if (sameLine) { (first || (first = [])).push(span$1) }\n }\n } else {\n span$1.from += offset\n if (sameLine) { (first || (first = [])).push(span$1) }\n }\n }\n }\n // Make sure we didn't create any zero-length spans\n if (first) { first = clearEmptySpans(first) }\n if (last && last != first) { last = clearEmptySpans(last) }\n\n var newMarkers = [first]\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2, gapMarkers\n if (gap > 0 && first)\n { for (var i$2 = 0; i$2 < first.length; ++i$2)\n { if (first[i$2].to == null)\n { (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null)) } } }\n for (var i$3 = 0; i$3 < gap; ++i$3)\n { newMarkers.push(gapMarkers) }\n newMarkers.push(last)\n }\n return newMarkers\n}", "function stretchSpansOverChange(doc, change) {\n if (change.full) { return null }\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n if (!oldFirst && !oldLast) { return null }\n\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n // Get the spans that 'stick out' on both sides\n var first = markedSpansBefore(oldFirst, startCh, isInsert);\n var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n // Next, merge those two ends\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i];\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker);\n if (!found) { span.to = startCh; }\n else if (sameLine) { span.to = found.to == null ? null : found.to + offset; }\n }\n }\n }\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i$1 = 0; i$1 < last.length; ++i$1) {\n var span$1 = last[i$1];\n if (span$1.to != null) { span$1.to += offset; }\n if (span$1.from == null) {\n var found$1 = getMarkedSpanFor(first, span$1.marker);\n if (!found$1) {\n span$1.from = offset;\n if (sameLine) { (first || (first = [])).push(span$1); }\n }\n } else {\n span$1.from += offset;\n if (sameLine) { (first || (first = [])).push(span$1); }\n }\n }\n }\n // Make sure we didn't create any zero-length spans\n if (first) { first = clearEmptySpans(first); }\n if (last && last != first) { last = clearEmptySpans(last); }\n\n var newMarkers = [first];\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2, gapMarkers;\n if (gap > 0 && first)\n { for (var i$2 = 0; i$2 < first.length; ++i$2)\n { if (first[i$2].to == null)\n { (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null)); } } }\n for (var i$3 = 0; i$3 < gap; ++i$3)\n { newMarkers.push(gapMarkers); }\n newMarkers.push(last);\n }\n return newMarkers\n}", "function stretchSpansOverChange(doc, change) {\n if (change.full) { return null }\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n if (!oldFirst && !oldLast) { return null }\n\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n // Get the spans that 'stick out' on both sides\n var first = markedSpansBefore(oldFirst, startCh, isInsert);\n var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n // Next, merge those two ends\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i];\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker);\n if (!found) { span.to = startCh; }\n else if (sameLine) { span.to = found.to == null ? null : found.to + offset; }\n }\n }\n }\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i$1 = 0; i$1 < last.length; ++i$1) {\n var span$1 = last[i$1];\n if (span$1.to != null) { span$1.to += offset; }\n if (span$1.from == null) {\n var found$1 = getMarkedSpanFor(first, span$1.marker);\n if (!found$1) {\n span$1.from = offset;\n if (sameLine) { (first || (first = [])).push(span$1); }\n }\n } else {\n span$1.from += offset;\n if (sameLine) { (first || (first = [])).push(span$1); }\n }\n }\n }\n // Make sure we didn't create any zero-length spans\n if (first) { first = clearEmptySpans(first); }\n if (last && last != first) { last = clearEmptySpans(last); }\n\n var newMarkers = [first];\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2, gapMarkers;\n if (gap > 0 && first)\n { for (var i$2 = 0; i$2 < first.length; ++i$2)\n { if (first[i$2].to == null)\n { (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null)); } } }\n for (var i$3 = 0; i$3 < gap; ++i$3)\n { newMarkers.push(gapMarkers); }\n newMarkers.push(last);\n }\n return newMarkers\n}", "function stretchSpansOverChange(doc, change) {\n if (change.full) { return null }\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n if (!oldFirst && !oldLast) { return null }\n\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n // Get the spans that 'stick out' on both sides\n var first = markedSpansBefore(oldFirst, startCh, isInsert);\n var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n // Next, merge those two ends\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i];\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker);\n if (!found) { span.to = startCh; }\n else if (sameLine) { span.to = found.to == null ? null : found.to + offset; }\n }\n }\n }\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i$1 = 0; i$1 < last.length; ++i$1) {\n var span$1 = last[i$1];\n if (span$1.to != null) { span$1.to += offset; }\n if (span$1.from == null) {\n var found$1 = getMarkedSpanFor(first, span$1.marker);\n if (!found$1) {\n span$1.from = offset;\n if (sameLine) { (first || (first = [])).push(span$1); }\n }\n } else {\n span$1.from += offset;\n if (sameLine) { (first || (first = [])).push(span$1); }\n }\n }\n }\n // Make sure we didn't create any zero-length spans\n if (first) { first = clearEmptySpans(first); }\n if (last && last != first) { last = clearEmptySpans(last); }\n\n var newMarkers = [first];\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2, gapMarkers;\n if (gap > 0 && first)\n { for (var i$2 = 0; i$2 < first.length; ++i$2)\n { if (first[i$2].to == null)\n { (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null)); } } }\n for (var i$3 = 0; i$3 < gap; ++i$3)\n { newMarkers.push(gapMarkers); }\n newMarkers.push(last);\n }\n return newMarkers\n}", "function stretchSpansOverChange(doc, change) {\n if (change.full) { return null }\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n if (!oldFirst && !oldLast) { return null }\n\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n // Get the spans that 'stick out' on both sides\n var first = markedSpansBefore(oldFirst, startCh, isInsert);\n var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n // Next, merge those two ends\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i];\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker);\n if (!found) { span.to = startCh; }\n else if (sameLine) { span.to = found.to == null ? null : found.to + offset; }\n }\n }\n }\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i$1 = 0; i$1 < last.length; ++i$1) {\n var span$1 = last[i$1];\n if (span$1.to != null) { span$1.to += offset; }\n if (span$1.from == null) {\n var found$1 = getMarkedSpanFor(first, span$1.marker);\n if (!found$1) {\n span$1.from = offset;\n if (sameLine) { (first || (first = [])).push(span$1); }\n }\n } else {\n span$1.from += offset;\n if (sameLine) { (first || (first = [])).push(span$1); }\n }\n }\n }\n // Make sure we didn't create any zero-length spans\n if (first) { first = clearEmptySpans(first); }\n if (last && last != first) { last = clearEmptySpans(last); }\n\n var newMarkers = [first];\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2, gapMarkers;\n if (gap > 0 && first)\n { for (var i$2 = 0; i$2 < first.length; ++i$2)\n { if (first[i$2].to == null)\n { (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null)); } } }\n for (var i$3 = 0; i$3 < gap; ++i$3)\n { newMarkers.push(gapMarkers); }\n newMarkers.push(last);\n }\n return newMarkers\n}", "function stretchSpansOverChange(doc, change) {\n if (change.full) { return null }\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n if (!oldFirst && !oldLast) { return null }\n\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n // Get the spans that 'stick out' on both sides\n var first = markedSpansBefore(oldFirst, startCh, isInsert);\n var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n // Next, merge those two ends\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i];\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker);\n if (!found) { span.to = startCh; }\n else if (sameLine) { span.to = found.to == null ? null : found.to + offset; }\n }\n }\n }\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i$1 = 0; i$1 < last.length; ++i$1) {\n var span$1 = last[i$1];\n if (span$1.to != null) { span$1.to += offset; }\n if (span$1.from == null) {\n var found$1 = getMarkedSpanFor(first, span$1.marker);\n if (!found$1) {\n span$1.from = offset;\n if (sameLine) { (first || (first = [])).push(span$1); }\n }\n } else {\n span$1.from += offset;\n if (sameLine) { (first || (first = [])).push(span$1); }\n }\n }\n }\n // Make sure we didn't create any zero-length spans\n if (first) { first = clearEmptySpans(first); }\n if (last && last != first) { last = clearEmptySpans(last); }\n\n var newMarkers = [first];\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2, gapMarkers;\n if (gap > 0 && first)\n { for (var i$2 = 0; i$2 < first.length; ++i$2)\n { if (first[i$2].to == null)\n { (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null)); } } }\n for (var i$3 = 0; i$3 < gap; ++i$3)\n { newMarkers.push(gapMarkers); }\n newMarkers.push(last);\n }\n return newMarkers\n}", "function stretchSpansOverChange(doc, change) {\n if (change.full) { return null }\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n if (!oldFirst && !oldLast) { return null }\n\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n // Get the spans that 'stick out' on both sides\n var first = markedSpansBefore(oldFirst, startCh, isInsert);\n var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n // Next, merge those two ends\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i];\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker);\n if (!found) { span.to = startCh; }\n else if (sameLine) { span.to = found.to == null ? null : found.to + offset; }\n }\n }\n }\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i$1 = 0; i$1 < last.length; ++i$1) {\n var span$1 = last[i$1];\n if (span$1.to != null) { span$1.to += offset; }\n if (span$1.from == null) {\n var found$1 = getMarkedSpanFor(first, span$1.marker);\n if (!found$1) {\n span$1.from = offset;\n if (sameLine) { (first || (first = [])).push(span$1); }\n }\n } else {\n span$1.from += offset;\n if (sameLine) { (first || (first = [])).push(span$1); }\n }\n }\n }\n // Make sure we didn't create any zero-length spans\n if (first) { first = clearEmptySpans(first); }\n if (last && last != first) { last = clearEmptySpans(last); }\n\n var newMarkers = [first];\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2, gapMarkers;\n if (gap > 0 && first)\n { for (var i$2 = 0; i$2 < first.length; ++i$2)\n { if (first[i$2].to == null)\n { (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null)); } } }\n for (var i$3 = 0; i$3 < gap; ++i$3)\n { newMarkers.push(gapMarkers); }\n newMarkers.push(last);\n }\n return newMarkers\n}", "function stretchSpansOverChange(doc, change) {\n if (change.full) { return null }\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n if (!oldFirst && !oldLast) { return null }\n\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n // Get the spans that 'stick out' on both sides\n var first = markedSpansBefore(oldFirst, startCh, isInsert);\n var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n // Next, merge those two ends\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i];\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker);\n if (!found) { span.to = startCh; }\n else if (sameLine) { span.to = found.to == null ? null : found.to + offset; }\n }\n }\n }\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i$1 = 0; i$1 < last.length; ++i$1) {\n var span$1 = last[i$1];\n if (span$1.to != null) { span$1.to += offset; }\n if (span$1.from == null) {\n var found$1 = getMarkedSpanFor(first, span$1.marker);\n if (!found$1) {\n span$1.from = offset;\n if (sameLine) { (first || (first = [])).push(span$1); }\n }\n } else {\n span$1.from += offset;\n if (sameLine) { (first || (first = [])).push(span$1); }\n }\n }\n }\n // Make sure we didn't create any zero-length spans\n if (first) { first = clearEmptySpans(first); }\n if (last && last != first) { last = clearEmptySpans(last); }\n\n var newMarkers = [first];\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2, gapMarkers;\n if (gap > 0 && first)\n { for (var i$2 = 0; i$2 < first.length; ++i$2)\n { if (first[i$2].to == null)\n { (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null)); } } }\n for (var i$3 = 0; i$3 < gap; ++i$3)\n { newMarkers.push(gapMarkers); }\n newMarkers.push(last);\n }\n return newMarkers\n}", "function stretchSpansOverChange(doc, change) {\n if (change.full) { return null }\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n if (!oldFirst && !oldLast) { return null }\n\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n // Get the spans that 'stick out' on both sides\n var first = markedSpansBefore(oldFirst, startCh, isInsert);\n var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n // Next, merge those two ends\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i];\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker);\n if (!found) { span.to = startCh; }\n else if (sameLine) { span.to = found.to == null ? null : found.to + offset; }\n }\n }\n }\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i$1 = 0; i$1 < last.length; ++i$1) {\n var span$1 = last[i$1];\n if (span$1.to != null) { span$1.to += offset; }\n if (span$1.from == null) {\n var found$1 = getMarkedSpanFor(first, span$1.marker);\n if (!found$1) {\n span$1.from = offset;\n if (sameLine) { (first || (first = [])).push(span$1); }\n }\n } else {\n span$1.from += offset;\n if (sameLine) { (first || (first = [])).push(span$1); }\n }\n }\n }\n // Make sure we didn't create any zero-length spans\n if (first) { first = clearEmptySpans(first); }\n if (last && last != first) { last = clearEmptySpans(last); }\n\n var newMarkers = [first];\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2, gapMarkers;\n if (gap > 0 && first)\n { for (var i$2 = 0; i$2 < first.length; ++i$2)\n { if (first[i$2].to == null)\n { (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null)); } } }\n for (var i$3 = 0; i$3 < gap; ++i$3)\n { newMarkers.push(gapMarkers); }\n newMarkers.push(last);\n }\n return newMarkers\n}", "function stretchSpansOverChange(doc, change) {\n if (change.full) { return null }\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n if (!oldFirst && !oldLast) { return null }\n\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n // Get the spans that 'stick out' on both sides\n var first = markedSpansBefore(oldFirst, startCh, isInsert);\n var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n // Next, merge those two ends\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i];\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker);\n if (!found) { span.to = startCh; }\n else if (sameLine) { span.to = found.to == null ? null : found.to + offset; }\n }\n }\n }\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i$1 = 0; i$1 < last.length; ++i$1) {\n var span$1 = last[i$1];\n if (span$1.to != null) { span$1.to += offset; }\n if (span$1.from == null) {\n var found$1 = getMarkedSpanFor(first, span$1.marker);\n if (!found$1) {\n span$1.from = offset;\n if (sameLine) { (first || (first = [])).push(span$1); }\n }\n } else {\n span$1.from += offset;\n if (sameLine) { (first || (first = [])).push(span$1); }\n }\n }\n }\n // Make sure we didn't create any zero-length spans\n if (first) { first = clearEmptySpans(first); }\n if (last && last != first) { last = clearEmptySpans(last); }\n\n var newMarkers = [first];\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2, gapMarkers;\n if (gap > 0 && first)\n { for (var i$2 = 0; i$2 < first.length; ++i$2)\n { if (first[i$2].to == null)\n { (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null)); } } }\n for (var i$3 = 0; i$3 < gap; ++i$3)\n { newMarkers.push(gapMarkers); }\n newMarkers.push(last);\n }\n return newMarkers\n}", "function stretchSpansOverChange(doc, change) {\n if (change.full) { return null }\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n if (!oldFirst && !oldLast) { return null }\n\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n // Get the spans that 'stick out' on both sides\n var first = markedSpansBefore(oldFirst, startCh, isInsert);\n var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n // Next, merge those two ends\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i];\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker);\n if (!found) { span.to = startCh; }\n else if (sameLine) { span.to = found.to == null ? null : found.to + offset; }\n }\n }\n }\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i$1 = 0; i$1 < last.length; ++i$1) {\n var span$1 = last[i$1];\n if (span$1.to != null) { span$1.to += offset; }\n if (span$1.from == null) {\n var found$1 = getMarkedSpanFor(first, span$1.marker);\n if (!found$1) {\n span$1.from = offset;\n if (sameLine) { (first || (first = [])).push(span$1); }\n }\n } else {\n span$1.from += offset;\n if (sameLine) { (first || (first = [])).push(span$1); }\n }\n }\n }\n // Make sure we didn't create any zero-length spans\n if (first) { first = clearEmptySpans(first); }\n if (last && last != first) { last = clearEmptySpans(last); }\n\n var newMarkers = [first];\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2, gapMarkers;\n if (gap > 0 && first)\n { for (var i$2 = 0; i$2 < first.length; ++i$2)\n { if (first[i$2].to == null)\n { (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null)); } } }\n for (var i$3 = 0; i$3 < gap; ++i$3)\n { newMarkers.push(gapMarkers); }\n newMarkers.push(last);\n }\n return newMarkers\n}", "function stretchSpansOverChange(doc, change) {\n if (change.full) { return null }\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n if (!oldFirst && !oldLast) { return null }\n\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n // Get the spans that 'stick out' on both sides\n var first = markedSpansBefore(oldFirst, startCh, isInsert);\n var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n // Next, merge those two ends\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i];\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker);\n if (!found) { span.to = startCh; }\n else if (sameLine) { span.to = found.to == null ? null : found.to + offset; }\n }\n }\n }\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i$1 = 0; i$1 < last.length; ++i$1) {\n var span$1 = last[i$1];\n if (span$1.to != null) { span$1.to += offset; }\n if (span$1.from == null) {\n var found$1 = getMarkedSpanFor(first, span$1.marker);\n if (!found$1) {\n span$1.from = offset;\n if (sameLine) { (first || (first = [])).push(span$1); }\n }\n } else {\n span$1.from += offset;\n if (sameLine) { (first || (first = [])).push(span$1); }\n }\n }\n }\n // Make sure we didn't create any zero-length spans\n if (first) { first = clearEmptySpans(first); }\n if (last && last != first) { last = clearEmptySpans(last); }\n\n var newMarkers = [first];\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2, gapMarkers;\n if (gap > 0 && first)\n { for (var i$2 = 0; i$2 < first.length; ++i$2)\n { if (first[i$2].to == null)\n { (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null)); } } }\n for (var i$3 = 0; i$3 < gap; ++i$3)\n { newMarkers.push(gapMarkers); }\n newMarkers.push(last);\n }\n return newMarkers\n}", "function mergeOldSpans(doc, change) {\n var old = getOldSpans(doc, change);\n var stretched = stretchSpansOverChange(doc, change);\n\n if (!old) {\n return stretched;\n }\n\n if (!stretched) {\n return old;\n }\n\n for (var i = 0; i < old.length; ++i) {\n var oldCur = old[i],\n stretchCur = stretched[i];\n\n if (oldCur && stretchCur) {\n spans: for (var j = 0; j < stretchCur.length; ++j) {\n var span = stretchCur[j];\n\n for (var k = 0; k < oldCur.length; ++k) {\n if (oldCur[k].marker == span.marker) {\n continue spans;\n }\n }\n\n oldCur.push(span);\n }\n } else if (stretchCur) {\n old[i] = stretchCur;\n }\n }\n\n return old;\n } // Used both to provide a JSON-safe object in .getHistory, and, when", "function stretchSpansOverChange(doc, change) {\r\n if (change.full) { return null }\r\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\r\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\r\n if (!oldFirst && !oldLast) { return null }\r\n\r\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\r\n // Get the spans that 'stick out' on both sides\r\n var first = markedSpansBefore(oldFirst, startCh, isInsert);\r\n var last = markedSpansAfter(oldLast, endCh, isInsert);\r\n\r\n // Next, merge those two ends\r\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\r\n if (first) {\r\n // Fix up .to properties of first\r\n for (var i = 0; i < first.length; ++i) {\r\n var span = first[i];\r\n if (span.to == null) {\r\n var found = getMarkedSpanFor(last, span.marker);\r\n if (!found) { span.to = startCh; }\r\n else if (sameLine) { span.to = found.to == null ? null : found.to + offset; }\r\n }\r\n }\r\n }\r\n if (last) {\r\n // Fix up .from in last (or move them into first in case of sameLine)\r\n for (var i$1 = 0; i$1 < last.length; ++i$1) {\r\n var span$1 = last[i$1];\r\n if (span$1.to != null) { span$1.to += offset; }\r\n if (span$1.from == null) {\r\n var found$1 = getMarkedSpanFor(first, span$1.marker);\r\n if (!found$1) {\r\n span$1.from = offset;\r\n if (sameLine) { (first || (first = [])).push(span$1); }\r\n }\r\n } else {\r\n span$1.from += offset;\r\n if (sameLine) { (first || (first = [])).push(span$1); }\r\n }\r\n }\r\n }\r\n // Make sure we didn't create any zero-length spans\r\n if (first) { first = clearEmptySpans(first); }\r\n if (last && last != first) { last = clearEmptySpans(last); }\r\n\r\n var newMarkers = [first];\r\n if (!sameLine) {\r\n // Fill gap with whole-line-spans\r\n var gap = change.text.length - 2, gapMarkers;\r\n if (gap > 0 && first)\r\n { for (var i$2 = 0; i$2 < first.length; ++i$2)\r\n { if (first[i$2].to == null)\r\n { (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null)); } } }\r\n for (var i$3 = 0; i$3 < gap; ++i$3)\r\n { newMarkers.push(gapMarkers); }\r\n newMarkers.push(last);\r\n }\r\n return newMarkers\r\n}", "function stretchSpansOverChange(doc, change) {\n\t\t if (change.full) { return null }\n\t\t var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n\t\t var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n\t\t if (!oldFirst && !oldLast) { return null }\n\n\t\t var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n\t\t // Get the spans that 'stick out' on both sides\n\t\t var first = markedSpansBefore(oldFirst, startCh, isInsert);\n\t\t var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n\t\t // Next, merge those two ends\n\t\t var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n\t\t if (first) {\n\t\t // Fix up .to properties of first\n\t\t for (var i = 0; i < first.length; ++i) {\n\t\t var span = first[i];\n\t\t if (span.to == null) {\n\t\t var found = getMarkedSpanFor(last, span.marker);\n\t\t if (!found) { span.to = startCh; }\n\t\t else if (sameLine) { span.to = found.to == null ? null : found.to + offset; }\n\t\t }\n\t\t }\n\t\t }\n\t\t if (last) {\n\t\t // Fix up .from in last (or move them into first in case of sameLine)\n\t\t for (var i$1 = 0; i$1 < last.length; ++i$1) {\n\t\t var span$1 = last[i$1];\n\t\t if (span$1.to != null) { span$1.to += offset; }\n\t\t if (span$1.from == null) {\n\t\t var found$1 = getMarkedSpanFor(first, span$1.marker);\n\t\t if (!found$1) {\n\t\t span$1.from = offset;\n\t\t if (sameLine) { (first || (first = [])).push(span$1); }\n\t\t }\n\t\t } else {\n\t\t span$1.from += offset;\n\t\t if (sameLine) { (first || (first = [])).push(span$1); }\n\t\t }\n\t\t }\n\t\t }\n\t\t // Make sure we didn't create any zero-length spans\n\t\t if (first) { first = clearEmptySpans(first); }\n\t\t if (last && last != first) { last = clearEmptySpans(last); }\n\n\t\t var newMarkers = [first];\n\t\t if (!sameLine) {\n\t\t // Fill gap with whole-line-spans\n\t\t var gap = change.text.length - 2, gapMarkers;\n\t\t if (gap > 0 && first)\n\t\t { for (var i$2 = 0; i$2 < first.length; ++i$2)\n\t\t { if (first[i$2].to == null)\n\t\t { (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null)); } } }\n\t\t for (var i$3 = 0; i$3 < gap; ++i$3)\n\t\t { newMarkers.push(gapMarkers); }\n\t\t newMarkers.push(last);\n\t\t }\n\t\t return newMarkers\n\t\t }", "function mergeOldSpans(doc, change) {\n var old = getOldSpans(doc, change);\n var stretched = stretchSpansOverChange(doc, change);\n if (!old) return stretched;\n if (!stretched) return old;\n\n for (var i = 0; i < old.length; ++i) {\n var oldCur = old[i], stretchCur = stretched[i];\n if (oldCur && stretchCur) {\n spans: for (var j = 0; j < stretchCur.length; ++j) {\n var span = stretchCur[j];\n for (var k = 0; k < oldCur.length; ++k)\n if (oldCur[k].marker == span.marker) continue spans;\n oldCur.push(span);\n }\n } else if (stretchCur) {\n old[i] = stretchCur;\n }\n }\n return old;\n }", "function mergeOldSpans(doc, change) {\n var old = getOldSpans(doc, change);\n var stretched = stretchSpansOverChange(doc, change);\n if (!old) return stretched;\n if (!stretched) return old;\n\n for (var i = 0; i < old.length; ++i) {\n var oldCur = old[i], stretchCur = stretched[i];\n if (oldCur && stretchCur) {\n spans: for (var j = 0; j < stretchCur.length; ++j) {\n var span = stretchCur[j];\n for (var k = 0; k < oldCur.length; ++k)\n if (oldCur[k].marker == span.marker) continue spans;\n oldCur.push(span);\n }\n } else if (stretchCur) {\n old[i] = stretchCur;\n }\n }\n return old;\n }", "function mergeOldSpans(doc, change) {\n var old = getOldSpans(doc, change);\n var stretched = stretchSpansOverChange(doc, change);\n if (!old) return stretched;\n if (!stretched) return old;\n\n for (var i = 0; i < old.length; ++i) {\n var oldCur = old[i], stretchCur = stretched[i];\n if (oldCur && stretchCur) {\n spans: for (var j = 0; j < stretchCur.length; ++j) {\n var span = stretchCur[j];\n for (var k = 0; k < oldCur.length; ++k)\n if (oldCur[k].marker == span.marker) continue spans;\n oldCur.push(span);\n }\n } else if (stretchCur) {\n old[i] = stretchCur;\n }\n }\n return old;\n }", "function mergeOldSpans(doc, change) {\n var old = getOldSpans(doc, change);\n var stretched = stretchSpansOverChange(doc, change);\n if (!old) return stretched;\n if (!stretched) return old;\n\n for (var i = 0; i < old.length; ++i) {\n var oldCur = old[i], stretchCur = stretched[i];\n if (oldCur && stretchCur) {\n spans: for (var j = 0; j < stretchCur.length; ++j) {\n var span = stretchCur[j];\n for (var k = 0; k < oldCur.length; ++k)\n if (oldCur[k].marker == span.marker) continue spans;\n oldCur.push(span);\n }\n } else if (stretchCur) {\n old[i] = stretchCur;\n }\n }\n return old;\n }", "function mergeOldSpans(doc, change) {\n var old = getOldSpans(doc, change);\n var stretched = stretchSpansOverChange(doc, change);\n if (!old) return stretched;\n if (!stretched) return old;\n\n for (var i = 0; i < old.length; ++i) {\n var oldCur = old[i], stretchCur = stretched[i];\n if (oldCur && stretchCur) {\n spans: for (var j = 0; j < stretchCur.length; ++j) {\n var span = stretchCur[j];\n for (var k = 0; k < oldCur.length; ++k)\n if (oldCur[k].marker == span.marker) continue spans;\n oldCur.push(span);\n }\n } else if (stretchCur) {\n old[i] = stretchCur;\n }\n }\n return old;\n }", "function mergeOldSpans(doc, change) {\n var old = getOldSpans(doc, change);\n var stretched = stretchSpansOverChange(doc, change);\n if (!old) return stretched;\n if (!stretched) return old;\n\n for (var i = 0; i < old.length; ++i) {\n var oldCur = old[i], stretchCur = stretched[i];\n if (oldCur && stretchCur) {\n spans: for (var j = 0; j < stretchCur.length; ++j) {\n var span = stretchCur[j];\n for (var k = 0; k < oldCur.length; ++k)\n if (oldCur[k].marker == span.marker) continue spans;\n oldCur.push(span);\n }\n } else if (stretchCur) {\n old[i] = stretchCur;\n }\n }\n return old;\n }", "function mergeOldSpans(doc, change) {\n var old = getOldSpans(doc, change);\n var stretched = stretchSpansOverChange(doc, change);\n if (!old) return stretched;\n if (!stretched) return old;\n\n for (var i = 0; i < old.length; ++i) {\n var oldCur = old[i], stretchCur = stretched[i];\n if (oldCur && stretchCur) {\n spans: for (var j = 0; j < stretchCur.length; ++j) {\n var span = stretchCur[j];\n for (var k = 0; k < oldCur.length; ++k)\n if (oldCur[k].marker == span.marker) continue spans;\n oldCur.push(span);\n }\n } else if (stretchCur) {\n old[i] = stretchCur;\n }\n }\n return old;\n }", "function mergeOldSpans(doc, change) {\n var old = getOldSpans(doc, change);\n var stretched = stretchSpansOverChange(doc, change);\n if (!old) { return stretched }\n if (!stretched) { return old }\n\n for (var i = 0; i < old.length; ++i) {\n var oldCur = old[i], stretchCur = stretched[i];\n if (oldCur && stretchCur) {\n spans: for (var j = 0; j < stretchCur.length; ++j) {\n var span = stretchCur[j];\n for (var k = 0; k < oldCur.length; ++k)\n { if (oldCur[k].marker == span.marker) { continue spans } }\n oldCur.push(span);\n }\n } else if (stretchCur) {\n old[i] = stretchCur;\n }\n }\n return old\n }", "function mergeOldSpans(doc, change) {\n var old = getOldSpans(doc, change);\n var stretched = stretchSpansOverChange(doc, change);\n if (!old) { return stretched }\n if (!stretched) { return old }\n\n for (var i = 0; i < old.length; ++i) {\n var oldCur = old[i], stretchCur = stretched[i];\n if (oldCur && stretchCur) {\n spans: for (var j = 0; j < stretchCur.length; ++j) {\n var span = stretchCur[j];\n for (var k = 0; k < oldCur.length; ++k)\n { if (oldCur[k].marker == span.marker) { continue spans } }\n oldCur.push(span);\n }\n } else if (stretchCur) {\n old[i] = stretchCur;\n }\n }\n return old\n }", "function mergeOldSpans(doc, change) {\n var old = getOldSpans(doc, change);\n var stretched = stretchSpansOverChange(doc, change);\n if (!old) { return stretched }\n if (!stretched) { return old }\n\n for (var i = 0; i < old.length; ++i) {\n var oldCur = old[i], stretchCur = stretched[i];\n if (oldCur && stretchCur) {\n spans: for (var j = 0; j < stretchCur.length; ++j) {\n var span = stretchCur[j];\n for (var k = 0; k < oldCur.length; ++k)\n { if (oldCur[k].marker == span.marker) { continue spans } }\n oldCur.push(span);\n }\n } else if (stretchCur) {\n old[i] = stretchCur;\n }\n }\n return old\n }", "function mergeOldSpans(doc, change) {\n var old = getOldSpans(doc, change);\n var stretched = stretchSpansOverChange(doc, change);\n if (!old) { return stretched }\n if (!stretched) { return old }\n\n for (var i = 0; i < old.length; ++i) {\n var oldCur = old[i], stretchCur = stretched[i];\n if (oldCur && stretchCur) {\n spans: for (var j = 0; j < stretchCur.length; ++j) {\n var span = stretchCur[j];\n for (var k = 0; k < oldCur.length; ++k)\n { if (oldCur[k].marker == span.marker) { continue spans } }\n oldCur.push(span);\n }\n } else if (stretchCur) {\n old[i] = stretchCur;\n }\n }\n return old\n }" ]
[ "0.6803287", "0.6803287", "0.6803287", "0.6803287", "0.6803287", "0.6803287", "0.6803287", "0.679656", "0.679656", "0.679656", "0.679656", "0.679656", "0.679656", "0.679656", "0.679656", "0.679656", "0.679656", "0.679656", "0.679656", "0.679656", "0.679656", "0.679656", "0.679656", "0.679656", "0.6772105", "0.67682636", "0.67682636", "0.67682636", "0.6767594", "0.6764184", "0.675603", "0.6755538", "0.6755538", "0.6755538", "0.6755538", "0.67508227", "0.67508227", "0.67508227", "0.67508227", "0.67508227", "0.67508227", "0.67508227", "0.67508227", "0.67508227", "0.67508227", "0.67508227", "0.67498636", "0.67498636", "0.67498636", "0.67399555", "0.67399555", "0.67380273", "0.67380273", "0.6731201", "0.6726692", "0.66981584", "0.6689055", "0.6647635", "0.6647635", "0.6606263", "0.6606263", "0.6606263", "0.6606263", "0.6606263", "0.6606263", "0.6606263", "0.6606263", "0.6606263", "0.6606263", "0.6606263", "0.65908456", "0.6589531", "0.6549876", "0.64307773", "0.64307773", "0.64307773", "0.64307773", "0.64307773", "0.64307773", "0.64307773", "0.6419988", "0.6419988", "0.6419988", "0.6419988" ]
0.66396093
75
Remove spans that are empty and don't have a clearWhenEmpty option of false.
function clearEmptySpans(spans) { for (var i = 0; i < spans.length; ++i) { var span = spans[i]; if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false) { spans.splice(i--, 1); } } if (!spans.length) { return null } return spans }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearEmptySpans(spans) {\n\t\t for (var i = 0; i < spans.length; ++i) {\n\t\t var span = spans[i];\n\t\t if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n\t\t spans.splice(i--, 1);\n\t\t }\n\t\t if (!spans.length) return null;\n\t\t return spans;\n\t\t }", "function clearEmptySpans(spans) {\n for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n spans.splice(i--, 1);\n }\n if (!spans.length) return null;\n return spans;\n }", "function clearEmptySpans(spans) {\n for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n spans.splice(i--, 1);\n }\n if (!spans.length) return null;\n return spans;\n }", "function clearEmptySpans(spans) {\n for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n spans.splice(i--, 1);\n }\n if (!spans.length) return null;\n return spans;\n }", "function clearEmptySpans(spans) {\n for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n spans.splice(i--, 1);\n }\n if (!spans.length) return null;\n return spans;\n }", "function clearEmptySpans(spans) {\n for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n spans.splice(i--, 1);\n }\n if (!spans.length) return null;\n return spans;\n }", "function clearEmptySpans(spans) {\n for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n spans.splice(i--, 1);\n }\n if (!spans.length) return null;\n return spans;\n }", "function clearEmptySpans(spans) {\n for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n spans.splice(i--, 1);\n }\n if (!spans.length) return null;\n return spans;\n }", "function clearEmptySpans(spans) {\n\t\t for (var i = 0; i < spans.length; ++i) {\n\t\t var span = spans[i];\n\t\t if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n\t\t { spans.splice(i--, 1); }\n\t\t }\n\t\t if (!spans.length) { return null }\n\t\t return spans\n\t\t }", "function clearEmptySpans(spans) {\r\n for (var i = 0; i < spans.length; ++i) {\r\n var span = spans[i];\r\n if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\r\n spans.splice(i--, 1);\r\n }\r\n if (!spans.length) return null;\r\n return spans;\r\n }", "function clearEmptySpans(spans) {\n\t for (var i = 0; i < spans.length; ++i) {\n\t var span = spans[i];\n\t if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n\t spans.splice(i--, 1);\n\t }\n\t if (!spans.length) return null;\n\t return spans;\n\t }", "function clearEmptySpans(spans) {\n\t for (var i = 0; i < spans.length; ++i) {\n\t var span = spans[i];\n\t if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n\t spans.splice(i--, 1);\n\t }\n\t if (!spans.length) return null;\n\t return spans;\n\t }", "function clearEmptySpans(spans) {\n\t for (var i = 0; i < spans.length; ++i) {\n\t var span = spans[i];\n\t if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n\t spans.splice(i--, 1);\n\t }\n\t if (!spans.length) return null;\n\t return spans;\n\t }", "function clearEmptySpans(spans) {\r\n for (var i = 0; i < spans.length; ++i) {\r\n var span = spans[i];\r\n if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\r\n { spans.splice(i--, 1); }\r\n }\r\n if (!spans.length) { return null }\r\n return spans\r\n}", "function clearEmptySpans(spans) {\n for (var i = 0; i < spans.length; ++i) {\n var span = spans[i]\n if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n { spans.splice(i--, 1) }\n }\n if (!spans.length) { return null }\n return spans\n}", "function clearEmptySpans(spans) {\n for (var i = 0; i < spans.length; ++i) {\n var span = spans[i]\n if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n { spans.splice(i--, 1) }\n }\n if (!spans.length) { return null }\n return spans\n}", "function clearEmptySpans(spans) {\n for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n { spans.splice(i--, 1); }\n }\n if (!spans.length) { return null }\n return spans\n}", "function clearEmptySpans(spans) {\n for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n { spans.splice(i--, 1); }\n }\n if (!spans.length) { return null }\n return spans\n}", "function clearEmptySpans(spans) {\n for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n { spans.splice(i--, 1); }\n }\n if (!spans.length) { return null }\n return spans\n}", "function clearEmptySpans(spans) {\n for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n { spans.splice(i--, 1); }\n }\n if (!spans.length) { return null }\n return spans\n}", "function clearEmptySpans(spans) {\n for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n { spans.splice(i--, 1); }\n }\n if (!spans.length) { return null }\n return spans\n}", "function clearEmptySpans(spans) {\n for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n { spans.splice(i--, 1); }\n }\n if (!spans.length) { return null }\n return spans\n}", "function clearEmptySpans(spans) {\n for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n { spans.splice(i--, 1); }\n }\n if (!spans.length) { return null }\n return spans\n}", "function clearEmptySpans(spans) {\n for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n { spans.splice(i--, 1); }\n }\n if (!spans.length) { return null }\n return spans\n}", "function clearEmptySpans(spans) {\n for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n { spans.splice(i--, 1); }\n }\n if (!spans.length) { return null }\n return spans\n}", "function clearEmptySpans(spans) {\n for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n { spans.splice(i--, 1); }\n }\n if (!spans.length) { return null }\n return spans\n}", "function clearEmptySpans(spans) {\n for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n { spans.splice(i--, 1); }\n }\n if (!spans.length) { return null }\n return spans\n}", "function emptySpans() {\n let spans = document.getElementsByTagName(\"SPAN\");\n if (spans.length > 0) {\n for (let i = 0; i < spans.length; i++) {\n spans[i].innerHTML=\"\";\n \n }\n }\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }", "function removeClearedSpans(spans) {\n if (!spans) return null;\n for (var i = 0, out; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }\n else if (out) out.push(spans[i]);\n }\n return !out ? spans : out.length ? out : null;\n }", "function removeClearedSpans(spans) {\n if (!spans) return null;\n for (var i = 0, out; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }\n else if (out) out.push(spans[i]);\n }\n return !out ? spans : out.length ? out : null;\n }", "function removeClearedSpans(spans) {\n if (!spans) return null;\n for (var i = 0, out; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }\n else if (out) out.push(spans[i]);\n }\n return !out ? spans : out.length ? out : null;\n }", "function removeClearedSpans(spans) {\n if (!spans) return null;\n for (var i = 0, out; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }\n else if (out) out.push(spans[i]);\n }\n return !out ? spans : out.length ? out : null;\n }", "function removeClearedSpans(spans) {\n if (!spans) return null;\n for (var i = 0, out; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }\n else if (out) out.push(spans[i]);\n }\n return !out ? spans : out.length ? out : null;\n }", "function removeClearedSpans(spans) {\n if (!spans) return null;\n for (var i = 0, out; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }\n else if (out) out.push(spans[i]);\n }\n return !out ? spans : out.length ? out : null;\n }", "function removeClearedSpans(spans) {\n if (!spans) return null;\n for (var i = 0, out; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }\n else if (out) out.push(spans[i]);\n }\n return !out ? spans : out.length ? out : null;\n }", "function removeClearedSpans(spans) {\r\n if (!spans) return null;\r\n for (var i = 0, out; i < spans.length; ++i) {\r\n if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }\r\n else if (out) out.push(spans[i]);\r\n }\r\n return !out ? spans : out.length ? out : null;\r\n }", "function removeClearedSpans(spans) {\r\n if (!spans) { return null }\r\n var out;\r\n for (var i = 0; i < spans.length; ++i) {\r\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\r\n else if (out) { out.push(spans[i]); }\r\n }\r\n return !out ? spans : out.length ? out : null\r\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i) } }\n else if (out) { out.push(spans[i]) }\n }\n return !out ? spans : out.length ? out : null\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i) } }\n else if (out) { out.push(spans[i]) }\n }\n return !out ? spans : out.length ? out : null\n}", "function removeClearedSpans(spans) {\n\t\t if (!spans) return null;\n\t\t for (var i = 0, out; i < spans.length; ++i) {\n\t\t if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }\n\t\t else if (out) out.push(spans[i]);\n\t\t }\n\t\t return !out ? spans : out.length ? out : null;\n\t\t }", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n}", "function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n}", "function removeClearedSpans(spans) {\n\t\t if (!spans) { return null }\n\t\t var out;\n\t\t for (var i = 0; i < spans.length; ++i) {\n\t\t if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n\t\t else if (out) { out.push(spans[i]); }\n\t\t }\n\t\t return !out ? spans : out.length ? out : null\n\t\t }", "function removeClearedSpans(spans) {\n\t if (!spans) return null;\n\t for (var i = 0, out; i < spans.length; ++i) {\n\t if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }\n\t else if (out) out.push(spans[i]);\n\t }\n\t return !out ? spans : out.length ? out : null;\n\t }", "function removeClearedSpans(spans) {\n\t if (!spans) return null;\n\t for (var i = 0, out; i < spans.length; ++i) {\n\t if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }\n\t else if (out) out.push(spans[i]);\n\t }\n\t return !out ? spans : out.length ? out : null;\n\t }", "function removeClearedSpans(spans) {\n\t if (!spans) return null;\n\t for (var i = 0, out; i < spans.length; ++i) {\n\t if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }\n\t else if (out) out.push(spans[i]);\n\t }\n\t return !out ? spans : out.length ? out : null;\n\t }", "function removeClearedSpans(spans) {\n if (!spans) {\n return null;\n }\n\n var out;\n\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) {\n if (!out) {\n out = spans.slice(0, i);\n }\n } else if (out) {\n out.push(spans[i]);\n }\n }\n\n return !out ? spans : out.length ? out : null;\n } // Retrieve and filter the old marked spans stored in a change event.", "function hideEmptyEle() {\n\t\tjQuery( '.frm-hide-empty' ).each( function() {\n\t\t if ( jQuery( this ).text().trim().length == 0 ) {\n\t\t jQuery( this ).remove();\n\t\t }\n\t\t});\n\t}", "function clearAllSpans(arr){\n arr.forEach(ar => {\n ar.name = clearSpan(ar.name);\n ar.summary = clearSpan(ar.summary);\n })\n}", "function removeEmpty(){\n $j('dt').filter(function(){\n var t = ($j(this).next().is('dd'));\n if (t){\n var a =$j(this).next().text();\n if (a === '' || a === ' ' || a === '\\xa0'){ //&nbsp;\n $j(this).next().remove();\n return true;\n }\n return false;\n }\n }).remove();\n}", "function clear(){\n for (var i=0;i<grid.length;i++){\n grid[i].textContent === '';\n }\n}", "function removeEmptyNodes() {\r\n const HTML_Content = document.querySelector(\"#HTML-Content\");\r\n var treeWalker = document.createTreeWalker(HTML_Content, NodeFilter.SHOW_ELEMENT);\r\n var currentNode = treeWalker.currentNode\r\n var emptyNodes = []\r\n\r\n // test if a node has no text, regardless of whitespaces\r\n var isNodeEmpty = node => !node.textContent.trim()\r\n\r\n // find all empty nodes\r\n while(currentNode) {\r\n isNodeEmpty(currentNode) && emptyNodes.push(currentNode)\r\n currentNode = treeWalker.nextNode()\r\n }\r\n\r\n // remove found empty nodes\r\n emptyNodes.forEach(node => node.parentNode.removeChild(node))\r\n return;\r\n}", "function removeEmptySongs(){\r\n $(\".EMPTY_SONG\").remove();\r\n}", "_removeEmptyHiddenDivs(ast) {\n for (const div of dom5.queryAll(ast, matchers.hiddenDiv)) {\n if (parse5_1.serialize(div).trim() === '') {\n dom5.remove(div);\n }\n }\n }", "removeEmptyElements() {\n this.elements = this.elements.filter(({quantity}) => quantity > 0);\n }", "toggleEmptyText() {\n const me = this;\n\n if (me.bodyContainer) {\n DomHelper.toggleClasses(me.bodyContainer, 'b-grid-empty', !(me.rowManager.rowCount || me.project.isLoadingOrSyncing));\n }\n }", "function clearSpan(str){\n if (str != null){\n let tempStr = str;\n \n if (tempStr.includes(\"span\")){\n tempStr = tempStr.replace(\"<span>\",\"\");\n tempStr = tempStr.replace(\"</span>\", \"\");\n }\n return tempStr;\n }\n}", "empty() {\n return this.forEach((el => el.innerHTML = \"\")), this;\n }" ]
[ "0.7583394", "0.75742966", "0.75742966", "0.75742966", "0.75742966", "0.75742966", "0.75742966", "0.75742966", "0.7569507", "0.7569052", "0.7549425", "0.7549425", "0.7549425", "0.7535491", "0.7530014", "0.7530014", "0.75171536", "0.75171536", "0.75171536", "0.75171536", "0.75171536", "0.75171536", "0.75171536", "0.75171536", "0.75171536", "0.75171536", "0.75171536", "0.73798865", "0.69649637", "0.69649637", "0.69649637", "0.69649637", "0.69649637", "0.69649637", "0.69649637", "0.69649637", "0.69649637", "0.69649637", "0.69649637", "0.69649637", "0.69649637", "0.69649637", "0.69649637", "0.69649637", "0.69649637", "0.6939903", "0.6939903", "0.6939903", "0.6939903", "0.6939903", "0.6939903", "0.6939903", "0.6914844", "0.6904702", "0.69044214", "0.69044214", "0.68938136", "0.6887742", "0.6887742", "0.6887742", "0.6887742", "0.6887742", "0.6887742", "0.6887742", "0.6887742", "0.6887742", "0.6887742", "0.6887742", "0.68853", "0.685587", "0.685587", "0.685587", "0.6760065", "0.6466615", "0.61780363", "0.61621505", "0.61562777", "0.61233276", "0.6050763", "0.5975518", "0.59491605", "0.5929331", "0.59241045", "0.5865747" ]
0.758082
16
Used to 'clip' out readOnly ranges when making a change.
function removeReadOnlyRanges(doc, from, to) { var markers = null; doc.iter(from.line, to.line + 1, function (line) { if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) { var mark = line.markedSpans[i].marker; if (mark.readOnly && (!markers || indexOf(markers, mark) == -1)) { (markers || (markers = [])).push(mark); } } } }); if (!markers) { return null } var parts = [{from: from, to: to}]; for (var i = 0; i < markers.length; ++i) { var mk = markers[i], m = mk.find(0); for (var j = 0; j < parts.length; ++j) { var p = parts[j]; if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) { continue } var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to); if (dfrom < 0 || !mk.inclusiveLeft && !dfrom) { newParts.push({from: p.from, to: m.from}); } if (dto > 0 || !mk.inclusiveRight && !dto) { newParts.push({from: m.to, to: p.to}); } parts.splice.apply(parts, newParts); j += newParts.length - 3; } } return parts }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clipRange(range, min, max) {\n return range\n .filter(segment => segment[1] >= min && segment[0] <= max)\n .map(segment => [Math.max(segment[0], min), Math.min(segment[1], max)]);\n}", "function removeReadOnlyRanges(doc, from, to) {\n\t\t var markers = null;\n\t\t doc.iter(from.line, to.line + 1, function(line) {\n\t\t if (line.markedSpans) for (var i = 0; i < line.markedSpans.length; ++i) {\n\t\t var mark = line.markedSpans[i].marker;\n\t\t if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\n\t\t (markers || (markers = [])).push(mark);\n\t\t }\n\t\t });\n\t\t if (!markers) return null;\n\t\t var parts = [{from: from, to: to}];\n\t\t for (var i = 0; i < markers.length; ++i) {\n\t\t var mk = markers[i], m = mk.find(0);\n\t\t for (var j = 0; j < parts.length; ++j) {\n\t\t var p = parts[j];\n\t\t if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) continue;\n\t\t var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);\n\t\t if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\n\t\t newParts.push({from: p.from, to: m.from});\n\t\t if (dto > 0 || !mk.inclusiveRight && !dto)\n\t\t newParts.push({from: m.to, to: p.to});\n\t\t parts.splice.apply(parts, newParts);\n\t\t j += newParts.length - 1;\n\t\t }\n\t\t }\n\t\t return parts;\n\t\t }", "function removeReadOnlyRanges(doc, from, to) {\n\t\t var markers = null;\n\t\t doc.iter(from.line, to.line + 1, function (line) {\n\t\t if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {\n\t\t var mark = line.markedSpans[i].marker;\n\t\t if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\n\t\t { (markers || (markers = [])).push(mark); }\n\t\t } }\n\t\t });\n\t\t if (!markers) { return null }\n\t\t var parts = [{from: from, to: to}];\n\t\t for (var i = 0; i < markers.length; ++i) {\n\t\t var mk = markers[i], m = mk.find(0);\n\t\t for (var j = 0; j < parts.length; ++j) {\n\t\t var p = parts[j];\n\t\t if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) { continue }\n\t\t var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);\n\t\t if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\n\t\t { newParts.push({from: p.from, to: m.from}); }\n\t\t if (dto > 0 || !mk.inclusiveRight && !dto)\n\t\t { newParts.push({from: m.to, to: p.to}); }\n\t\t parts.splice.apply(parts, newParts);\n\t\t j += newParts.length - 3;\n\t\t }\n\t\t }\n\t\t return parts\n\t\t }", "function removeReadOnlyRanges(doc, from, to) {\n\t var markers = null;\n\t doc.iter(from.line, to.line + 1, function(line) {\n\t if (line.markedSpans) for (var i = 0; i < line.markedSpans.length; ++i) {\n\t var mark = line.markedSpans[i].marker;\n\t if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\n\t (markers || (markers = [])).push(mark);\n\t }\n\t });\n\t if (!markers) return null;\n\t var parts = [{from: from, to: to}];\n\t for (var i = 0; i < markers.length; ++i) {\n\t var mk = markers[i], m = mk.find(0);\n\t for (var j = 0; j < parts.length; ++j) {\n\t var p = parts[j];\n\t if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) continue;\n\t var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);\n\t if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\n\t newParts.push({from: p.from, to: m.from});\n\t if (dto > 0 || !mk.inclusiveRight && !dto)\n\t newParts.push({from: m.to, to: p.to});\n\t parts.splice.apply(parts, newParts);\n\t j += newParts.length - 1;\n\t }\n\t }\n\t return parts;\n\t }", "function removeReadOnlyRanges(doc, from, to) {\n\t var markers = null;\n\t doc.iter(from.line, to.line + 1, function(line) {\n\t if (line.markedSpans) for (var i = 0; i < line.markedSpans.length; ++i) {\n\t var mark = line.markedSpans[i].marker;\n\t if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\n\t (markers || (markers = [])).push(mark);\n\t }\n\t });\n\t if (!markers) return null;\n\t var parts = [{from: from, to: to}];\n\t for (var i = 0; i < markers.length; ++i) {\n\t var mk = markers[i], m = mk.find(0);\n\t for (var j = 0; j < parts.length; ++j) {\n\t var p = parts[j];\n\t if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) continue;\n\t var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);\n\t if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\n\t newParts.push({from: p.from, to: m.from});\n\t if (dto > 0 || !mk.inclusiveRight && !dto)\n\t newParts.push({from: m.to, to: p.to});\n\t parts.splice.apply(parts, newParts);\n\t j += newParts.length - 1;\n\t }\n\t }\n\t return parts;\n\t }", "function removeReadOnlyRanges(doc, from, to) {\n\t var markers = null;\n\t doc.iter(from.line, to.line + 1, function(line) {\n\t if (line.markedSpans) for (var i = 0; i < line.markedSpans.length; ++i) {\n\t var mark = line.markedSpans[i].marker;\n\t if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\n\t (markers || (markers = [])).push(mark);\n\t }\n\t });\n\t if (!markers) return null;\n\t var parts = [{from: from, to: to}];\n\t for (var i = 0; i < markers.length; ++i) {\n\t var mk = markers[i], m = mk.find(0);\n\t for (var j = 0; j < parts.length; ++j) {\n\t var p = parts[j];\n\t if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) continue;\n\t var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);\n\t if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\n\t newParts.push({from: p.from, to: m.from});\n\t if (dto > 0 || !mk.inclusiveRight && !dto)\n\t newParts.push({from: m.to, to: p.to});\n\t parts.splice.apply(parts, newParts);\n\t j += newParts.length - 1;\n\t }\n\t }\n\t return parts;\n\t }", "function removeReadOnlyRanges(doc, from, to) {\n var markers = null;\n doc.iter(from.line, to.line + 1, function(line) {\n if (line.markedSpans) for (var i = 0; i < line.markedSpans.length; ++i) {\n var mark = line.markedSpans[i].marker;\n if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\n (markers || (markers = [])).push(mark);\n }\n });\n if (!markers) return null;\n var parts = [{from: from, to: to}];\n for (var i = 0; i < markers.length; ++i) {\n var mk = markers[i], m = mk.find(0);\n for (var j = 0; j < parts.length; ++j) {\n var p = parts[j];\n if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) continue;\n var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);\n if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\n newParts.push({from: p.from, to: m.from});\n if (dto > 0 || !mk.inclusiveRight && !dto)\n newParts.push({from: m.to, to: p.to});\n parts.splice.apply(parts, newParts);\n j += newParts.length - 1;\n }\n }\n return parts;\n }", "function removeReadOnlyRanges(doc, from, to) {\n var markers = null;\n doc.iter(from.line, to.line + 1, function(line) {\n if (line.markedSpans) for (var i = 0; i < line.markedSpans.length; ++i) {\n var mark = line.markedSpans[i].marker;\n if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\n (markers || (markers = [])).push(mark);\n }\n });\n if (!markers) return null;\n var parts = [{from: from, to: to}];\n for (var i = 0; i < markers.length; ++i) {\n var mk = markers[i], m = mk.find(0);\n for (var j = 0; j < parts.length; ++j) {\n var p = parts[j];\n if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) continue;\n var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);\n if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\n newParts.push({from: p.from, to: m.from});\n if (dto > 0 || !mk.inclusiveRight && !dto)\n newParts.push({from: m.to, to: p.to});\n parts.splice.apply(parts, newParts);\n j += newParts.length - 1;\n }\n }\n return parts;\n }", "function removeReadOnlyRanges(doc, from, to) {\n var markers = null;\n doc.iter(from.line, to.line + 1, function(line) {\n if (line.markedSpans) for (var i = 0; i < line.markedSpans.length; ++i) {\n var mark = line.markedSpans[i].marker;\n if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\n (markers || (markers = [])).push(mark);\n }\n });\n if (!markers) return null;\n var parts = [{from: from, to: to}];\n for (var i = 0; i < markers.length; ++i) {\n var mk = markers[i], m = mk.find(0);\n for (var j = 0; j < parts.length; ++j) {\n var p = parts[j];\n if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) continue;\n var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);\n if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\n newParts.push({from: p.from, to: m.from});\n if (dto > 0 || !mk.inclusiveRight && !dto)\n newParts.push({from: m.to, to: p.to});\n parts.splice.apply(parts, newParts);\n j += newParts.length - 1;\n }\n }\n return parts;\n }", "function removeReadOnlyRanges(doc, from, to) {\n var markers = null;\n doc.iter(from.line, to.line + 1, function(line) {\n if (line.markedSpans) for (var i = 0; i < line.markedSpans.length; ++i) {\n var mark = line.markedSpans[i].marker;\n if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\n (markers || (markers = [])).push(mark);\n }\n });\n if (!markers) return null;\n var parts = [{from: from, to: to}];\n for (var i = 0; i < markers.length; ++i) {\n var mk = markers[i], m = mk.find(0);\n for (var j = 0; j < parts.length; ++j) {\n var p = parts[j];\n if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) continue;\n var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);\n if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\n newParts.push({from: p.from, to: m.from});\n if (dto > 0 || !mk.inclusiveRight && !dto)\n newParts.push({from: m.to, to: p.to});\n parts.splice.apply(parts, newParts);\n j += newParts.length - 1;\n }\n }\n return parts;\n }", "function removeReadOnlyRanges(doc, from, to) {\n var markers = null;\n doc.iter(from.line, to.line + 1, function(line) {\n if (line.markedSpans) for (var i = 0; i < line.markedSpans.length; ++i) {\n var mark = line.markedSpans[i].marker;\n if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\n (markers || (markers = [])).push(mark);\n }\n });\n if (!markers) return null;\n var parts = [{from: from, to: to}];\n for (var i = 0; i < markers.length; ++i) {\n var mk = markers[i], m = mk.find(0);\n for (var j = 0; j < parts.length; ++j) {\n var p = parts[j];\n if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) continue;\n var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);\n if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\n newParts.push({from: p.from, to: m.from});\n if (dto > 0 || !mk.inclusiveRight && !dto)\n newParts.push({from: m.to, to: p.to});\n parts.splice.apply(parts, newParts);\n j += newParts.length - 1;\n }\n }\n return parts;\n }", "function removeReadOnlyRanges(doc, from, to) {\n var markers = null;\n doc.iter(from.line, to.line + 1, function(line) {\n if (line.markedSpans) for (var i = 0; i < line.markedSpans.length; ++i) {\n var mark = line.markedSpans[i].marker;\n if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\n (markers || (markers = [])).push(mark);\n }\n });\n if (!markers) return null;\n var parts = [{from: from, to: to}];\n for (var i = 0; i < markers.length; ++i) {\n var mk = markers[i], m = mk.find(0);\n for (var j = 0; j < parts.length; ++j) {\n var p = parts[j];\n if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) continue;\n var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);\n if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\n newParts.push({from: p.from, to: m.from});\n if (dto > 0 || !mk.inclusiveRight && !dto)\n newParts.push({from: m.to, to: p.to});\n parts.splice.apply(parts, newParts);\n j += newParts.length - 1;\n }\n }\n return parts;\n }", "function removeReadOnlyRanges(doc, from, to) {\n var markers = null;\n doc.iter(from.line, to.line + 1, function(line) {\n if (line.markedSpans) for (var i = 0; i < line.markedSpans.length; ++i) {\n var mark = line.markedSpans[i].marker;\n if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\n (markers || (markers = [])).push(mark);\n }\n });\n if (!markers) return null;\n var parts = [{from: from, to: to}];\n for (var i = 0; i < markers.length; ++i) {\n var mk = markers[i], m = mk.find(0);\n for (var j = 0; j < parts.length; ++j) {\n var p = parts[j];\n if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) continue;\n var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);\n if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\n newParts.push({from: p.from, to: m.from});\n if (dto > 0 || !mk.inclusiveRight && !dto)\n newParts.push({from: m.to, to: p.to});\n parts.splice.apply(parts, newParts);\n j += newParts.length - 1;\n }\n }\n return parts;\n }", "function removeReadOnlyRanges(doc, from, to) {\r\n var markers = null;\r\n doc.iter(from.line, to.line + 1, function(line) {\r\n if (line.markedSpans) for (var i = 0; i < line.markedSpans.length; ++i) {\r\n var mark = line.markedSpans[i].marker;\r\n if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\r\n (markers || (markers = [])).push(mark);\r\n }\r\n });\r\n if (!markers) return null;\r\n var parts = [{from: from, to: to}];\r\n for (var i = 0; i < markers.length; ++i) {\r\n var mk = markers[i], m = mk.find(0);\r\n for (var j = 0; j < parts.length; ++j) {\r\n var p = parts[j];\r\n if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) continue;\r\n var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);\r\n if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\r\n newParts.push({from: p.from, to: m.from});\r\n if (dto > 0 || !mk.inclusiveRight && !dto)\r\n newParts.push({from: m.to, to: p.to});\r\n parts.splice.apply(parts, newParts);\r\n j += newParts.length - 1;\r\n }\r\n }\r\n return parts;\r\n }", "function removeReadOnlyRanges(doc, from, to) {\n var markers = null\n doc.iter(from.line, to.line + 1, function (line) {\n if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {\n var mark = line.markedSpans[i].marker\n if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\n { (markers || (markers = [])).push(mark) }\n } }\n })\n if (!markers) { return null }\n var parts = [{from: from, to: to}]\n for (var i = 0; i < markers.length; ++i) {\n var mk = markers[i], m = mk.find(0)\n for (var j = 0; j < parts.length; ++j) {\n var p = parts[j]\n if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) { continue }\n var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to)\n if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\n { newParts.push({from: p.from, to: m.from}) }\n if (dto > 0 || !mk.inclusiveRight && !dto)\n { newParts.push({from: m.to, to: p.to}) }\n parts.splice.apply(parts, newParts)\n j += newParts.length - 1\n }\n }\n return parts\n}", "function removeReadOnlyRanges(doc, from, to) {\r\n var markers = null;\r\n doc.iter(from.line, to.line + 1, function (line) {\r\n if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {\r\n var mark = line.markedSpans[i].marker;\r\n if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\r\n { (markers || (markers = [])).push(mark); }\r\n } }\r\n });\r\n if (!markers) { return null }\r\n var parts = [{from: from, to: to}];\r\n for (var i = 0; i < markers.length; ++i) {\r\n var mk = markers[i], m = mk.find(0);\r\n for (var j = 0; j < parts.length; ++j) {\r\n var p = parts[j];\r\n if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) { continue }\r\n var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);\r\n if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\r\n { newParts.push({from: p.from, to: m.from}); }\r\n if (dto > 0 || !mk.inclusiveRight && !dto)\r\n { newParts.push({from: m.to, to: p.to}); }\r\n parts.splice.apply(parts, newParts);\r\n j += newParts.length - 3;\r\n }\r\n }\r\n return parts\r\n}", "function removeReadOnlyRanges(doc, from, to) {\n var markers = null;\n doc.iter(from.line, to.line + 1, function (line) {\n if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {\n var mark = line.markedSpans[i].marker;\n if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\n { (markers || (markers = [])).push(mark); }\n } }\n });\n if (!markers) { return null }\n var parts = [{from: from, to: to}];\n for (var i = 0; i < markers.length; ++i) {\n var mk = markers[i], m = mk.find(0);\n for (var j = 0; j < parts.length; ++j) {\n var p = parts[j];\n if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) { continue }\n var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);\n if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\n { newParts.push({from: p.from, to: m.from}); }\n if (dto > 0 || !mk.inclusiveRight && !dto)\n { newParts.push({from: m.to, to: p.to}); }\n parts.splice.apply(parts, newParts);\n j += newParts.length - 3;\n }\n }\n return parts\n}", "function removeReadOnlyRanges(doc, from, to) {\n var markers = null;\n doc.iter(from.line, to.line + 1, function (line) {\n if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {\n var mark = line.markedSpans[i].marker;\n if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\n { (markers || (markers = [])).push(mark); }\n } }\n });\n if (!markers) { return null }\n var parts = [{from: from, to: to}];\n for (var i = 0; i < markers.length; ++i) {\n var mk = markers[i], m = mk.find(0);\n for (var j = 0; j < parts.length; ++j) {\n var p = parts[j];\n if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) { continue }\n var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);\n if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\n { newParts.push({from: p.from, to: m.from}); }\n if (dto > 0 || !mk.inclusiveRight && !dto)\n { newParts.push({from: m.to, to: p.to}); }\n parts.splice.apply(parts, newParts);\n j += newParts.length - 3;\n }\n }\n return parts\n}", "function removeReadOnlyRanges(doc, from, to) {\n var markers = null;\n doc.iter(from.line, to.line + 1, function (line) {\n if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {\n var mark = line.markedSpans[i].marker;\n if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\n { (markers || (markers = [])).push(mark); }\n } }\n });\n if (!markers) { return null }\n var parts = [{from: from, to: to}];\n for (var i = 0; i < markers.length; ++i) {\n var mk = markers[i], m = mk.find(0);\n for (var j = 0; j < parts.length; ++j) {\n var p = parts[j];\n if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) { continue }\n var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);\n if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\n { newParts.push({from: p.from, to: m.from}); }\n if (dto > 0 || !mk.inclusiveRight && !dto)\n { newParts.push({from: m.to, to: p.to}); }\n parts.splice.apply(parts, newParts);\n j += newParts.length - 3;\n }\n }\n return parts\n}", "function removeReadOnlyRanges(doc, from, to) {\n var markers = null;\n doc.iter(from.line, to.line + 1, function (line) {\n if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {\n var mark = line.markedSpans[i].marker;\n if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\n { (markers || (markers = [])).push(mark); }\n } }\n });\n if (!markers) { return null }\n var parts = [{from: from, to: to}];\n for (var i = 0; i < markers.length; ++i) {\n var mk = markers[i], m = mk.find(0);\n for (var j = 0; j < parts.length; ++j) {\n var p = parts[j];\n if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) { continue }\n var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);\n if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\n { newParts.push({from: p.from, to: m.from}); }\n if (dto > 0 || !mk.inclusiveRight && !dto)\n { newParts.push({from: m.to, to: p.to}); }\n parts.splice.apply(parts, newParts);\n j += newParts.length - 3;\n }\n }\n return parts\n}", "function removeReadOnlyRanges(doc, from, to) {\n var markers = null;\n doc.iter(from.line, to.line + 1, function (line) {\n if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {\n var mark = line.markedSpans[i].marker;\n if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\n { (markers || (markers = [])).push(mark); }\n } }\n });\n if (!markers) { return null }\n var parts = [{from: from, to: to}];\n for (var i = 0; i < markers.length; ++i) {\n var mk = markers[i], m = mk.find(0);\n for (var j = 0; j < parts.length; ++j) {\n var p = parts[j];\n if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) { continue }\n var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);\n if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\n { newParts.push({from: p.from, to: m.from}); }\n if (dto > 0 || !mk.inclusiveRight && !dto)\n { newParts.push({from: m.to, to: p.to}); }\n parts.splice.apply(parts, newParts);\n j += newParts.length - 3;\n }\n }\n return parts\n}", "function removeReadOnlyRanges(doc, from, to) {\n var markers = null;\n doc.iter(from.line, to.line + 1, function (line) {\n if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {\n var mark = line.markedSpans[i].marker;\n if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\n { (markers || (markers = [])).push(mark); }\n } }\n });\n if (!markers) { return null }\n var parts = [{from: from, to: to}];\n for (var i = 0; i < markers.length; ++i) {\n var mk = markers[i], m = mk.find(0);\n for (var j = 0; j < parts.length; ++j) {\n var p = parts[j];\n if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) { continue }\n var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);\n if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\n { newParts.push({from: p.from, to: m.from}); }\n if (dto > 0 || !mk.inclusiveRight && !dto)\n { newParts.push({from: m.to, to: p.to}); }\n parts.splice.apply(parts, newParts);\n j += newParts.length - 3;\n }\n }\n return parts\n}", "function removeReadOnlyRanges(doc, from, to) {\n var markers = null;\n doc.iter(from.line, to.line + 1, function (line) {\n if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {\n var mark = line.markedSpans[i].marker;\n if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\n { (markers || (markers = [])).push(mark); }\n } }\n });\n if (!markers) { return null }\n var parts = [{from: from, to: to}];\n for (var i = 0; i < markers.length; ++i) {\n var mk = markers[i], m = mk.find(0);\n for (var j = 0; j < parts.length; ++j) {\n var p = parts[j];\n if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) { continue }\n var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);\n if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\n { newParts.push({from: p.from, to: m.from}); }\n if (dto > 0 || !mk.inclusiveRight && !dto)\n { newParts.push({from: m.to, to: p.to}); }\n parts.splice.apply(parts, newParts);\n j += newParts.length - 3;\n }\n }\n return parts\n}", "function removeReadOnlyRanges(doc, from, to) {\n var markers = null;\n doc.iter(from.line, to.line + 1, function (line) {\n if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {\n var mark = line.markedSpans[i].marker;\n if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\n { (markers || (markers = [])).push(mark); }\n } }\n });\n if (!markers) { return null }\n var parts = [{from: from, to: to}];\n for (var i = 0; i < markers.length; ++i) {\n var mk = markers[i], m = mk.find(0);\n for (var j = 0; j < parts.length; ++j) {\n var p = parts[j];\n if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) { continue }\n var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);\n if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\n { newParts.push({from: p.from, to: m.from}); }\n if (dto > 0 || !mk.inclusiveRight && !dto)\n { newParts.push({from: m.to, to: p.to}); }\n parts.splice.apply(parts, newParts);\n j += newParts.length - 3;\n }\n }\n return parts\n}", "function removeReadOnlyRanges(doc, from, to) {\n var markers = null;\n doc.iter(from.line, to.line + 1, function (line) {\n if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {\n var mark = line.markedSpans[i].marker;\n if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\n { (markers || (markers = [])).push(mark); }\n } }\n });\n if (!markers) { return null }\n var parts = [{from: from, to: to}];\n for (var i = 0; i < markers.length; ++i) {\n var mk = markers[i], m = mk.find(0);\n for (var j = 0; j < parts.length; ++j) {\n var p = parts[j];\n if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) { continue }\n var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);\n if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\n { newParts.push({from: p.from, to: m.from}); }\n if (dto > 0 || !mk.inclusiveRight && !dto)\n { newParts.push({from: m.to, to: p.to}); }\n parts.splice.apply(parts, newParts);\n j += newParts.length - 3;\n }\n }\n return parts\n}", "function removeReadOnlyRanges(doc, from, to) {\n var markers = null;\n doc.iter(from.line, to.line + 1, function (line) {\n if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {\n var mark = line.markedSpans[i].marker;\n if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\n { (markers || (markers = [])).push(mark); }\n } }\n });\n if (!markers) { return null }\n var parts = [{from: from, to: to}];\n for (var i = 0; i < markers.length; ++i) {\n var mk = markers[i], m = mk.find(0);\n for (var j = 0; j < parts.length; ++j) {\n var p = parts[j];\n if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) { continue }\n var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);\n if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\n { newParts.push({from: p.from, to: m.from}); }\n if (dto > 0 || !mk.inclusiveRight && !dto)\n { newParts.push({from: m.to, to: p.to}); }\n parts.splice.apply(parts, newParts);\n j += newParts.length - 3;\n }\n }\n return parts\n}", "function removeReadOnlyRanges(doc, from, to) {\n var markers = null;\n doc.iter(from.line, to.line + 1, function (line) {\n if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {\n var mark = line.markedSpans[i].marker;\n if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\n { (markers || (markers = [])).push(mark); }\n } }\n });\n if (!markers) { return null }\n var parts = [{from: from, to: to}];\n for (var i = 0; i < markers.length; ++i) {\n var mk = markers[i], m = mk.find(0);\n for (var j = 0; j < parts.length; ++j) {\n var p = parts[j];\n if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) { continue }\n var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);\n if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\n { newParts.push({from: p.from, to: m.from}); }\n if (dto > 0 || !mk.inclusiveRight && !dto)\n { newParts.push({from: m.to, to: p.to}); }\n parts.splice.apply(parts, newParts);\n j += newParts.length - 3;\n }\n }\n return parts\n}", "function removeReadOnlyRanges(doc, from, to) {\n var markers = null\n doc.iter(from.line, to.line + 1, function (line) {\n if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {\n var mark = line.markedSpans[i].marker\n if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\n { (markers || (markers = [])).push(mark) }\n } }\n })\n if (!markers) { return null }\n var parts = [{from: from, to: to}]\n for (var i = 0; i < markers.length; ++i) {\n var mk = markers[i], m = mk.find(0)\n for (var j = 0; j < parts.length; ++j) {\n var p = parts[j]\n if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) { continue }\n var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to)\n if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\n { newParts.push({from: p.from, to: m.from}) }\n if (dto > 0 || !mk.inclusiveRight && !dto)\n { newParts.push({from: m.to, to: p.to}) }\n parts.splice.apply(parts, newParts)\n j += newParts.length - 3\n }\n }\n return parts\n}", "set clip(value) {}", "_clipPeriod()\n {\n let dist = (this._periodEnd-this._periodStart);\n let periodStart = Math.max(this._periodStart, this._minYear);\n let periodEnd = Math.min(this._periodEnd, this._maxYear);\n\n // Maintain period length\n while ((periodEnd-periodStart) < dist)\n {\n if (periodEnd < this._maxYear)\n periodEnd++;\n else if (periodStart > this._minYear)\n periodStart--;\n else // There is no space to extend the period any more => keep it\n break\n }\n\n this.setPeriod((periodEnd-periodStart), periodEnd)\n }", "clone() {\n const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));\n if (this.range)\n copy.range = this.range.slice();\n return copy;\n }", "set originalClip(value) {}", "function removeRange(ranges, range) {\n const newRange = ranges.filter(r => !_.isEqual(r, range));\n if (newRange.length === 0) {\n return [{\n from: null,\n to: null,\n }];\n }\n return newRange;\n }", "RemoveRange() {\n\n }", "clone() {\n const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));\n if (this.range)\n copy.range = this.range.slice();\n return copy;\n }", "clone() {\n const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));\n if (this.range)\n copy.range = this.range.slice();\n return copy;\n }", "function prepareRanges($scope) {\n if (!$scope.hideCustomRange && $scope.ranges[$scope.ranges.length - 1].range !== CUSTOM)\n $scope.ranges.push({ label: 'Custom Range', range: CUSTOM });\n\n $scope.resetRangeClass();\n\n if (!$scope.hideCustomRange && $scope.ranges[$scope.ranges.length - 1].active)\n $scope.showCalendars = true;\n }", "set overrideClip(value) {}", "getMemento() {\n return this._hiddenRanges.map(r => ({ startLineNumber: r.startLineNumber - 1, endLineNumber: r.endLineNumber }));\n }", "_setRangeDebouced() {\n var range;\n if(this.orientation === 'vertical') {\n var h = Math.max(this._height, 0);\n range = [h, 0];\n\n } else {\n var w = Math.max(this._width, 0);\n range = [0, w];\n }\n\n this._scale.range(range);\n\n // force a recalc\n this._scaleChanged = !this._scaleChanged;\n }", "function filterRange(arr, min, max) {\n for (var i = 0; i < arr.length - 1; i++) {\n if (arr[i] < min || arr[i] > max) {\n for (var j = i + 1; j<arr.length; j++) {\n arr[j - 1] = arr[j]\n }\n arr.length--;\n i--;\n }\n }\n console.log(arr)\n}", "exclude(r) {\n r = cobalt.range(r); // make sure r has only nonconsecutive, nonoverlapping singlerange subranges, ordered\n var ri = 0;\n var si = 0;\n var result = this.ranges.slice().filter(function(CobaltSingleRange) {\n return CobaltSingleRange.start!=CobaltSingleRange.end;\n });\n while (ri<r.ranges.length && si<result.length) {\n if (r.ranges[ri].leftOf(result[si]) || r.ranges[ri].end==result[si].start) {\n ri++;\n } else if (r.ranges[ri].rightOf(result[si]) || r.ranges[ri].start==result[si].end) {\n si++;\n } else {\n var t1 = result[si].exclude(r.ranges[ri]);\n if (t1.length) {\n result = result.slice(0,si).concat(t1).concat(result.slice(si+1));\n //if (t1.size>1) {\n si++;\n //}\n } else {\n result.splice(si,1);\n }\n }\n }\n return new CobaltRange(result);\n }", "function clip(value, low_limit, high_limit)\r {\r \tif(value < low_limit)\r \t\treturn low_limit;\r \telse if(value > high_limit)\r \t\treturn high_limit;\r \telse\r \t\treturn value;\r }", "function invertRanges(ranges, constraintRange) {\n var invertedRanges = [];\n var start = constraintRange.start; // the end of the previous range. the start of the new range\n var i;\n var dateRange;\n // ranges need to be in order. required for our date-walking algorithm\n ranges.sort(compareRanges);\n for (i = 0; i < ranges.length; i++) {\n dateRange = ranges[i];\n // add the span of time before the event (if there is any)\n if (dateRange.start > start) { // compare millisecond time (skip any ambig logic)\n invertedRanges.push({ start: start, end: dateRange.start });\n }\n if (dateRange.end > start) {\n start = dateRange.end;\n }\n }\n // add the span of time after the last event (if there is any)\n if (start < constraintRange.end) { // compare millisecond time (skip any ambig logic)\n invertedRanges.push({ start: start, end: constraintRange.end });\n }\n return invertedRanges;\n }", "function invertRanges(ranges, constraintRange) {\n var invertedRanges = [];\n var start = constraintRange.start; // the end of the previous range. the start of the new range\n var i;\n var dateRange;\n // ranges need to be in order. required for our date-walking algorithm\n ranges.sort(compareRanges);\n for (i = 0; i < ranges.length; i++) {\n dateRange = ranges[i];\n // add the span of time before the event (if there is any)\n if (dateRange.start > start) { // compare millisecond time (skip any ambig logic)\n invertedRanges.push({ start: start, end: dateRange.start });\n }\n if (dateRange.end > start) {\n start = dateRange.end;\n }\n }\n // add the span of time after the last event (if there is any)\n if (start < constraintRange.end) { // compare millisecond time (skip any ambig logic)\n invertedRanges.push({ start: start, end: constraintRange.end });\n }\n return invertedRanges;\n }", "function invertRanges(ranges, constraintRange) {\n var invertedRanges = [];\n var start = constraintRange.start; // the end of the previous range. the start of the new range\n var i;\n var dateRange;\n // ranges need to be in order. required for our date-walking algorithm\n ranges.sort(compareRanges);\n for (i = 0; i < ranges.length; i++) {\n dateRange = ranges[i];\n // add the span of time before the event (if there is any)\n if (dateRange.start > start) { // compare millisecond time (skip any ambig logic)\n invertedRanges.push({ start: start, end: dateRange.start });\n }\n if (dateRange.end > start) {\n start = dateRange.end;\n }\n }\n // add the span of time after the last event (if there is any)\n if (start < constraintRange.end) { // compare millisecond time (skip any ambig logic)\n invertedRanges.push({ start: start, end: constraintRange.end });\n }\n return invertedRanges;\n }", "function invertRanges(ranges, constraintRange) {\n var invertedRanges = [];\n var start = constraintRange.start; // the end of the previous range. the start of the new range\n\n var i;\n var dateRange; // ranges need to be in order. required for our date-walking algorithm\n\n ranges.sort(compareRanges);\n\n for (i = 0; i < ranges.length; i++) {\n dateRange = ranges[i]; // add the span of time before the event (if there is any)\n\n if (dateRange.start > start) {\n // compare millisecond time (skip any ambig logic)\n invertedRanges.push({\n start: start,\n end: dateRange.start\n });\n }\n\n if (dateRange.end > start) {\n start = dateRange.end;\n }\n } // add the span of time after the last event (if there is any)\n\n\n if (start < constraintRange.end) {\n // compare millisecond time (skip any ambig logic)\n invertedRanges.push({\n start: start,\n end: constraintRange.end\n });\n }\n\n return invertedRanges;\n }", "function invertRanges(ranges, constraintRange) {\n var invertedRanges = [];\n var start = constraintRange.start; // the end of the previous range. the start of the new range\n var i;\n var dateRange;\n // ranges need to be in order. required for our date-walking algorithm\n ranges.sort(compareRanges);\n for (i = 0; i < ranges.length; i += 1) {\n dateRange = ranges[i];\n // add the span of time before the event (if there is any)\n if (dateRange.start > start) { // compare millisecond time (skip any ambig logic)\n invertedRanges.push({ start: start, end: dateRange.start });\n }\n if (dateRange.end > start) {\n start = dateRange.end;\n }\n }\n // add the span of time after the last event (if there is any)\n if (start < constraintRange.end) { // compare millisecond time (skip any ambig logic)\n invertedRanges.push({ start: start, end: constraintRange.end });\n }\n return invertedRanges;\n }", "updateRange(start, end) {\n this.range.start = start\n this.range.end = end\n this.range.paddingTop = this.getPaddingTop()\n this.range.paddingBottom = this.getPaddingBottom()\n this.callUpdate(this.getRange())\n }", "function filterRangeInPlace(array, from, to) {\r\n for (var i = 0; i < array.length; i++) {\r\n if ((from > array[i]) || (array[i] > to)) {\r\n var index = array.indexOf(array[i]);\r\n array.splice(index, 1);\r\n }\r\n }\r\n return array;\r\n}", "function clampRange(range, min, max) {\n var lo = range[0],\n hi = range[1],\n span;\n\n if (hi < lo) {\n span = hi;\n hi = lo;\n lo = span;\n }\n span = hi - lo;\n\n return span >= (max - min)\n ? [min, max]\n : [\n (lo = Math.min(Math.max(lo, min), max - span)),\n lo + span\n ];\n }", "function invertRanges(ranges, constraintRange) {\n var invertedRanges = [];\n var start = constraintRange.start; // the end of the previous range. the start of the new range\n var i;\n var dateRange;\n // ranges need to be in order. required for our date-walking algorithm\n ranges.sort(compareRanges);\n for (i = 0; i < ranges.length; i++) {\n dateRange = ranges[i];\n // add the span of time before the event (if there is any)\n if (dateRange.start > start) { // compare millisecond time (skip any ambig logic)\n invertedRanges.push({ start: start, end: dateRange.start });\n }\n if (dateRange.end > start) {\n start = dateRange.end;\n }\n }\n // add the span of time after the last event (if there is any)\n if (start < constraintRange.end) { // compare millisecond time (skip any ambig logic)\n invertedRanges.push({ start: start, end: constraintRange.end });\n }\n return invertedRanges;\n}", "function invertRanges(ranges, constraintRange) {\n var invertedRanges = [];\n var start = constraintRange.start; // the end of the previous range. the start of the new range\n\n var i;\n var dateRange; // ranges need to be in order. required for our date-walking algorithm\n\n ranges.sort(compareRanges);\n\n for (i = 0; i < ranges.length; i++) {\n dateRange = ranges[i]; // add the span of time before the event (if there is any)\n\n if (dateRange.start > start) {\n // compare millisecond time (skip any ambig logic)\n invertedRanges.push({\n start: start,\n end: dateRange.start\n });\n }\n\n if (dateRange.end > start) {\n start = dateRange.end;\n }\n } // add the span of time after the last event (if there is any)\n\n\n if (start < constraintRange.end) {\n // compare millisecond time (skip any ambig logic)\n invertedRanges.push({\n start: start,\n end: constraintRange.end\n });\n }\n\n return invertedRanges;\n }", "function disableClipping(clip) {\n if (clip.clipping) {\n context.restore();\n clip.clipping = false;\n }\n }", "extendToCover(min, max) {\r\n let x = this.min;\r\n while (min < x) {\r\n x = DateTimeSequence.ADD_INTERVAL(x, -this.interval, this.unit);\r\n this.sequence.splice(0, 0, x);\r\n }\r\n this.min = x;\r\n x = this.max;\r\n while (x < max) {\r\n x = DateTimeSequence.ADD_INTERVAL(x, this.interval, this.unit);\r\n this.sequence.push(x);\r\n }\r\n this.max = x;\r\n }", "function invertRanges$1(ranges, constraintRange) {\n var invertedRanges = [];\n var start = constraintRange.start; // the end of the previous range. the start of the new range\n var i;\n var dateRange;\n // ranges need to be in order. required for our date-walking algorithm\n ranges.sort(compareRanges$1);\n for (i = 0; i < ranges.length; i++) {\n dateRange = ranges[i];\n // add the span of time before the event (if there is any)\n if (dateRange.start > start) { // compare millisecond time (skip any ambig logic)\n invertedRanges.push({ start: start, end: dateRange.start });\n }\n if (dateRange.end > start) {\n start = dateRange.end;\n }\n }\n // add the span of time after the last event (if there is any)\n if (start < constraintRange.end) { // compare millisecond time (skip any ambig logic)\n invertedRanges.push({ start: start, end: constraintRange.end });\n }\n return invertedRanges;\n }", "restoreRange() {\n if (this.lastRange) {\n this.lastRange.select();\n this.focus();\n }\n }", "SetRange() {\n\n }", "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text, origin: change.origin}); }\n } else {\n makeChangeInner(doc, change);\n }\n }", "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text, origin: change.origin}); }\n } else {\n makeChangeInner(doc, change);\n }\n }", "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text, origin: change.origin}); }\n } else {\n makeChangeInner(doc, change);\n }\n }", "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text, origin: change.origin}); }\n } else {\n makeChangeInner(doc, change);\n }\n }", "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text, origin: change.origin}); }\n } else {\n makeChangeInner(doc, change);\n }\n }", "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text, origin: change.origin}); }\n } else {\n makeChangeInner(doc, change);\n }\n }", "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text, origin: change.origin}); }\n } else {\n makeChangeInner(doc, change);\n }\n }", "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text, origin: change.origin}); }\n } else {\n makeChangeInner(doc, change);\n }\n }", "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text, origin: change.origin}); }\n } else {\n makeChangeInner(doc, change);\n }\n }", "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text, origin: change.origin}); }\n } else {\n makeChangeInner(doc, change);\n }\n }", "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text, origin: change.origin}); }\n } else {\n makeChangeInner(doc, change);\n }\n }", "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text, origin: change.origin}); }\n } else {\n makeChangeInner(doc, change);\n }\n }", "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text, origin: change.origin}); }\n } else {\n makeChangeInner(doc, change);\n }\n }", "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text, origin: change.origin}); }\n } else {\n makeChangeInner(doc, change);\n }\n }", "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text, origin: change.origin}); }\n } else {\n makeChangeInner(doc, change);\n }\n }", "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text, origin: change.origin}); }\n } else {\n makeChangeInner(doc, change);\n }\n }", "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text, origin: change.origin}); }\n } else {\n makeChangeInner(doc, change);\n }\n }", "function filterSelectionChange(doc, sel) {\n var obj = {\n ranges: sel.ranges,\n update: function(ranges) {\n this.ranges = [];\n for (var i = 0; i < ranges.length; i++)\n this.ranges[i] = new Range(clipPos(doc, ranges[i].anchor),\n clipPos(doc, ranges[i].head));\n }\n };\n signal(doc, \"beforeSelectionChange\", doc, obj);\n if (doc.cm) signal(doc.cm, \"beforeSelectionChange\", doc.cm, obj);\n if (obj.ranges != sel.ranges) return normalizeSelection(obj.ranges, obj.ranges.length - 1);\n else return sel;\n }", "function filterSelectionChange(doc, sel) {\n var obj = {\n ranges: sel.ranges,\n update: function(ranges) {\n this.ranges = [];\n for (var i = 0; i < ranges.length; i++)\n this.ranges[i] = new Range(clipPos(doc, ranges[i].anchor),\n clipPos(doc, ranges[i].head));\n }\n };\n signal(doc, \"beforeSelectionChange\", doc, obj);\n if (doc.cm) signal(doc.cm, \"beforeSelectionChange\", doc.cm, obj);\n if (obj.ranges != sel.ranges) return normalizeSelection(obj.ranges, obj.ranges.length - 1);\n else return sel;\n }", "function filterSelectionChange(doc, sel) {\n var obj = {\n ranges: sel.ranges,\n update: function(ranges) {\n this.ranges = [];\n for (var i = 0; i < ranges.length; i++)\n this.ranges[i] = new Range(clipPos(doc, ranges[i].anchor),\n clipPos(doc, ranges[i].head));\n }\n };\n signal(doc, \"beforeSelectionChange\", doc, obj);\n if (doc.cm) signal(doc.cm, \"beforeSelectionChange\", doc.cm, obj);\n if (obj.ranges != sel.ranges) return normalizeSelection(obj.ranges, obj.ranges.length - 1);\n else return sel;\n }", "function filterSelectionChange(doc, sel) {\n var obj = {\n ranges: sel.ranges,\n update: function(ranges) {\n this.ranges = [];\n for (var i = 0; i < ranges.length; i++)\n this.ranges[i] = new Range(clipPos(doc, ranges[i].anchor),\n clipPos(doc, ranges[i].head));\n }\n };\n signal(doc, \"beforeSelectionChange\", doc, obj);\n if (doc.cm) signal(doc.cm, \"beforeSelectionChange\", doc.cm, obj);\n if (obj.ranges != sel.ranges) return normalizeSelection(obj.ranges, obj.ranges.length - 1);\n else return sel;\n }", "function filterSelectionChange(doc, sel) {\n var obj = {\n ranges: sel.ranges,\n update: function(ranges) {\n this.ranges = [];\n for (var i = 0; i < ranges.length; i++)\n this.ranges[i] = new Range(clipPos(doc, ranges[i].anchor),\n clipPos(doc, ranges[i].head));\n }\n };\n signal(doc, \"beforeSelectionChange\", doc, obj);\n if (doc.cm) signal(doc.cm, \"beforeSelectionChange\", doc.cm, obj);\n if (obj.ranges != sel.ranges) return normalizeSelection(obj.ranges, obj.ranges.length - 1);\n else return sel;\n }", "function filterSelectionChange(doc, sel) {\n var obj = {\n ranges: sel.ranges,\n update: function(ranges) {\n this.ranges = [];\n for (var i = 0; i < ranges.length; i++)\n this.ranges[i] = new Range(clipPos(doc, ranges[i].anchor),\n clipPos(doc, ranges[i].head));\n }\n };\n signal(doc, \"beforeSelectionChange\", doc, obj);\n if (doc.cm) signal(doc.cm, \"beforeSelectionChange\", doc.cm, obj);\n if (obj.ranges != sel.ranges) return normalizeSelection(obj.ranges, obj.ranges.length - 1);\n else return sel;\n }", "function filterSelectionChange(doc, sel) {\n var obj = {\n ranges: sel.ranges,\n update: function(ranges) {\n this.ranges = [];\n for (var i = 0; i < ranges.length; i++)\n this.ranges[i] = new Range(clipPos(doc, ranges[i].anchor),\n clipPos(doc, ranges[i].head));\n }\n };\n signal(doc, \"beforeSelectionChange\", doc, obj);\n if (doc.cm) signal(doc.cm, \"beforeSelectionChange\", doc.cm, obj);\n if (obj.ranges != sel.ranges) return normalizeSelection(obj.ranges, obj.ranges.length - 1);\n else return sel;\n }", "function makeChange(doc, change, ignoreReadOnly) {\n\t\t if (doc.cm) {\n\t\t if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n\t\t if (doc.cm.state.suppressEdits) { return }\n\t\t }\n\n\t\t if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n\t\t change = filterChange(doc, change, true);\n\t\t if (!change) { return }\n\t\t }\n\n\t\t // Possibly split or suppress the update based on the presence\n\t\t // of read-only spans in its range.\n\t\t var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n\t\t if (split) {\n\t\t for (var i = split.length - 1; i >= 0; --i)\n\t\t { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text, origin: change.origin}); }\n\t\t } else {\n\t\t makeChangeInner(doc, change);\n\t\t }\n\t\t }", "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) {\n return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly);\n }\n\n if (doc.cm.state.suppressEdits) {\n return;\n }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n\n if (!change) {\n return;\n }\n } // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n\n\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n\n if (split) {\n for (var i = split.length - 1; i >= 0; --i) {\n makeChangeInner(doc, {\n from: split[i].from,\n to: split[i].to,\n text: i ? [\"\"] : change.text,\n origin: change.origin\n });\n }\n } else {\n makeChangeInner(doc, change);\n }\n }" ]
[ "0.65469515", "0.64165866", "0.64008033", "0.6282006", "0.6282006", "0.6282006", "0.61560845", "0.61560845", "0.61560845", "0.61560845", "0.61560845", "0.61560845", "0.61560845", "0.6142585", "0.6129644", "0.6123883", "0.6104581", "0.6104581", "0.6104581", "0.6104581", "0.6104581", "0.6104581", "0.6104581", "0.6104581", "0.6104581", "0.6104581", "0.6104581", "0.6103883", "0.59506553", "0.5786834", "0.5749807", "0.5679844", "0.56622684", "0.56520647", "0.5630659", "0.5630659", "0.5581671", "0.5524801", "0.55083704", "0.55064833", "0.5481602", "0.5448456", "0.5435837", "0.5404071", "0.5404071", "0.5404071", "0.53942597", "0.538952", "0.5385029", "0.5381481", "0.5367098", "0.5357815", "0.5356089", "0.53520197", "0.5349155", "0.5348407", "0.53366864", "0.5315911", "0.53143644", "0.53143644", "0.53143644", "0.53143644", "0.53143644", "0.53143644", "0.53143644", "0.53143644", "0.53143644", "0.53143644", "0.53143644", "0.53143644", "0.53143644", "0.53143644", "0.53143644", "0.53143644", "0.53143644", "0.53042966", "0.53042966", "0.53042966", "0.53042966", "0.53042966", "0.53042966", "0.53042966", "0.5303319", "0.52944314" ]
0.615654
19
Connect or disconnect spans from a line.
function detachMarkedSpans(line) { var spans = line.markedSpans; if (!spans) { return } for (var i = 0; i < spans.length; ++i) { spans[i].marker.detachLine(line); } line.markedSpans = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "function visualLine(line) {\n var merged\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line }\n return line\n}", "function visualLine(line) {\n var merged\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line }\n return line\n}", "function addMarkedSpan(line, span) {\r\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\r\n span.marker.attachLine(line);\r\n }", "function addMarkedSpan(line, span, op) {\n var inThisOp = op && window.WeakSet && (op.markedSpans || (op.markedSpans = new WeakSet));\n if (inThisOp && inThisOp.has(line.markedSpans)) {\n line.markedSpans.push(span);\n } else {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n if (inThisOp) { inThisOp.add(line.markedSpans); }\n }\n span.marker.attachLine(line);\n }", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span]\n span.marker.attachLine(line)\n}", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span]\n span.marker.attachLine(line)\n}", "function addMarkedSpan(line, span, op) {\n var inThisOp = op && window.WeakSet && (op.markedSpans || (op.markedSpans = new WeakSet));\n if (inThisOp && line.markedSpans && inThisOp.has(line.markedSpans)) {\n line.markedSpans.push(span);\n } else {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n if (inThisOp) { inThisOp.add(line.markedSpans); }\n }\n span.marker.attachLine(line);\n }", "function addMarkedSpan(line, span, op) {\n var inThisOp = op && window.WeakSet && (op.markedSpans || (op.markedSpans = new WeakSet));\n if (inThisOp && line.markedSpans && inThisOp.has(line.markedSpans)) {\n line.markedSpans.push(span);\n } else {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n if (inThisOp) { inThisOp.add(line.markedSpans); }\n }\n span.marker.attachLine(line);\n }", "function addMarkedSpan(line, span) {\n\t\t line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n\t\t span.marker.attachLine(line);\n\t\t }", "function addMarkedSpan(line, span) {\r\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\r\n span.marker.attachLine(line);\r\n}", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n}", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n}", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n}", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n}", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n}", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n}", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n}", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n}", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n}", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n}", "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n}", "function addMarkedSpan(line, span) {\n\t line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n\t span.marker.attachLine(line);\n\t }", "function addMarkedSpan(line, span) {\n\t line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n\t span.marker.attachLine(line);\n\t }", "function addMarkedSpan(line, span) {\n\t line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n\t span.marker.attachLine(line);\n\t }", "setLineCoordinates() {\n if (this.shown) {\n //if not self link && not linker modified pep\n if (!this.crosslink.isSelfLink() && this.crosslink.toProtein) {\n let x, y;\n const source = this.renderedFromProtein.getRenderedInteractor();\n const target = this.renderedToProtein.getRenderedInteractor();\n if (!source.ix || !source.iy) {\n console.log(\"NOT\");\n }\n // from end\n if (source.type === \"group\" || !source.expanded) {\n x = source.ix;\n y = source.iy;\n } else {\n const coord = this.getResidueCoordinates(this.crosslink.fromResidue, this.renderedFromProtein);\n x = coord[0];\n y = coord[1];\n }\n this.line.setAttribute(\"x1\", x);\n this.line.setAttribute(\"y1\", y);\n this.highlightLine.setAttribute(\"x1\", x);\n this.highlightLine.setAttribute(\"y1\", y);\n\n // to end\n if (target.type === \"group\" || !target.expanded) {\n x = target.ix;\n y = target.iy;\n } else {\n const coord = this.getResidueCoordinates(this.crosslink.toResidue, this.renderedToProtein);\n x = coord[0];\n y = coord[1];\n }\n this.line.setAttribute(\"x2\", x);\n this.line.setAttribute(\"y2\", y);\n this.highlightLine.setAttribute(\"x2\", x);\n this.highlightLine.setAttribute(\"y2\", y);\n\n }\n }\n }", "function addLine () {\n\tconst linksCoords = this.getBoundingClientRect();\n\tline.style.width = `${linksCoords.width}px`;\n\tline.style.transform = `translate(${linksCoords.left}px, ${linksCoords.top}px)`;\n\tline.style.opacity = 1;\n}", "function addMarkedSpan(line, span, op) {\n\t\t var inThisOp = op && window.WeakSet && (op.markedSpans || (op.markedSpans = new WeakSet));\n\t\t if (inThisOp && line.markedSpans && inThisOp.has(line.markedSpans)) {\n\t\t line.markedSpans.push(span);\n\t\t } else {\n\t\t line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n\t\t if (inThisOp) { inThisOp.add(line.markedSpans); }\n\t\t }\n\t\t span.marker.attachLine(line);\n\t\t }", "function visualLine(line) {\n\t\t var merged;\n\t\t while (merged = collapsedSpanAtStart(line))\n\t\t line = merged.find(-1, true).line;\n\t\t return line;\n\t\t }", "function visualLine(line) {\n\t\t var merged;\n\t\t while (merged = collapsedSpanAtStart(line))\n\t\t { line = merged.find(-1, true).line; }\n\t\t return line\n\t\t }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\r\n var merged;\r\n while (merged = collapsedSpanAtStart(line))\r\n { line = merged.find(-1, true).line; }\r\n return line\r\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\n var merged;\n\n while (merged = collapsedSpanAtStart(line)) {\n line = merged.find(-1, true).line;\n }\n\n return line;\n }", "function visualLine(line) {\r\n var merged;\r\n while (merged = collapsedSpanAtStart(line))\r\n line = merged.find(-1, true).line;\r\n return line;\r\n }", "function visualLine(line) {\n\t var merged;\n\t while (merged = collapsedSpanAtStart(line))\n\t line = merged.find(-1, true).line;\n\t return line;\n\t }", "function visualLine(line) {\n\t var merged;\n\t while (merged = collapsedSpanAtStart(line))\n\t line = merged.find(-1, true).line;\n\t return line;\n\t }", "function visualLine(line) {\n\t var merged;\n\t while (merged = collapsedSpanAtStart(line))\n\t line = merged.find(-1, true).line;\n\t return line;\n\t }", "function drawLine(start, end) {\n var points = [];\n points.push(start);\n points.push(end);\n var line = new google.maps.Polyline({\n map: map,\n icons: [{\n icon: lineSymbol,\n offset: '0',\n repeat: '4px'\n }],\n strokeOpacity: 0.0,\n strokeWeight: 50,\n editable: false,\n zIndex: 1\n });\n line.setPath(points);\n\n //listeners\n google.maps.event.addListener(line, 'mousemove', function(event) {\n circle.setPosition(event.latLng);\n var projection = overlay.getProjection();\n var pixel = projection.fromLatLngToContainerPixel(event.latLng);\n $(\"#tooltip\").css(\"display\",\"block\");\n $(\"#tooltip\").css(\"left\",pixel.x+15+\"px\").css(\"top\",pixel.y+125+\"px\");\n hoverLine = line;\n });\n\n google.maps.event.addListener(line, 'mouseout', function(event) {\n circle.setPosition(null);\n $(\"#tooltip\").css(\"display\",\"none\");\n });\n google.maps.event.addListener(line, 'mouseup', function(event) {\n circle.setMap(map);\n dragStart = false;\n if(dragging){\n dragging = false;\n for(var i = 0; i < lines.length; i++){\n if(lines[i] == hovertemp){\n lines.splice(i,1);\n hovertemp.setMap(null);\n break;\n }\n }\n lines.push(lineone);\n lines.push(linetwo);\n var pointcompare = linetwo.getPath().getAt(1);\n for(var i = 0; i < points.length; i++){\n if(points[i] == pointcompare){\n points.splice(i,0,event.latLng);\n break;\n }\n }\n createVertex(event.latLng);\n }\n else{\n lineone.setMap(null);\n linetwo.setMap(null);\n }\n });\n return line;\n}", "function updateMouseHoverLine() {\r\n for (var i=0; i<lineSegments.length; ++i) {\r\n ls = lineSegments[i];\r\n //determine if cursor position is on or very near a line\r\n var TOLERANCE = CELL_SIZE/2;\r\n var mousePos = {x:mouseX,y:mouseY};\r\n var closestPoint = Geometry.getClosestPointOnLineSegment(ls.p1, ls.p2, mousePos, TOLERANCE)\r\n if (closestPoint != false) {\r\n ls.hover = true;\r\n if (debug && currentTool == \"select-line\" || currentTool == \"delete-line\") {\r\n //draw dot for p2\r\n ctx.beginPath();\r\n ctx.arc(closestPoint.x, closestPoint.y, 2, 0, Math.PI*2, true); \r\n ctx.closePath();\r\n ctx.fillStyle = \"purple\";\r\n ctx.fill();\r\n }\r\n } else {\r\n ls.hover = false;\r\n }\r\n }\r\n}", "function setConnectLine(){\r\n\tmap.getSource('connectLine').setData({\r\n\t\t\"type\": \"FeatureCollection\",\r\n\t\t \"features\": [{\r\n\t\t\t \"type\": \"Feature\",\r\n\t\t\t \"properties\": { \"name\": \"Connecting Line\"},\r\n\t\t\t \"geometry\": {\r\n\t\t\t\t \"type\": \"LineString\",\r\n\t\t\t\t \"coordinates\": [[nearStopLng, nearStopLat],[clickLng, clickLat]]\r\n\t\t\t }\r\n\t\t }]\r\n\t});\r\n}", "function Line() {}", "function Line() {}", "function Line() {}", "function Line() {}", "function Line() {}", "function Line(){}", "function getRemovableLine(start, end, label, color) {\n var line = new LeaderLine(start, end, {\n size: 5,\n middleLabel: LeaderLine.pathLabel({\n text: label\n }),\n startSocket: 'top',\n endSocket: 'top',\n startPlug: 'disc',\n endPlug: 'disc',\n color: color,\n path: 'arc',\n });\n document.querySelector('.leader-line:last-of-type').addEventListener('dblclick', function () {\n let start = parseInt(line.start.id.replace(\"mark-\", \"\"), 10);\n let end = parseInt(line.end.id.replace(\"mark-\", \"\"), 10);\n delete relationRecord[[start, end]];\n line.remove();\n }, false);\n return line;\n}" ]
[ "0.5948326", "0.5948326", "0.5948326", "0.5948326", "0.5948326", "0.5948326", "0.5948326", "0.5948326", "0.5948326", "0.5948326", "0.5948326", "0.5948326", "0.5948326", "0.5948326", "0.5948326", "0.5948326", "0.5948326", "0.5948326", "0.5948326", "0.5948326", "0.5948326", "0.59336156", "0.59336156", "0.59308994", "0.5930223", "0.5928825", "0.5928825", "0.5921592", "0.5921592", "0.59159845", "0.5913909", "0.5907481", "0.5907481", "0.5907481", "0.5907481", "0.5907481", "0.5907481", "0.5907481", "0.5907481", "0.5907481", "0.5907481", "0.5907481", "0.5900341", "0.5900341", "0.5900341", "0.5846832", "0.5843166", "0.5836052", "0.582395", "0.58233064", "0.582191", "0.582191", "0.582191", "0.582191", "0.582191", "0.582191", "0.582191", "0.582191", "0.582191", "0.582191", "0.582191", "0.582191", "0.582191", "0.582191", "0.582191", "0.582191", "0.582191", "0.5788244", "0.5788244", "0.5788244", "0.5788244", "0.5788244", "0.5788244", "0.5788244", "0.5788244", "0.5788244", "0.5788244", "0.5788244", "0.5786953", "0.57402104", "0.57402104", "0.57402104", "0.57402104", "0.57402104", "0.57402104", "0.57402104", "0.573448", "0.57234037", "0.5704114", "0.5704114", "0.5704114", "0.56628865", "0.5656277", "0.5653172", "0.56236756", "0.56236756", "0.56236756", "0.56236756", "0.56236756", "0.5613455", "0.5596786" ]
0.0
-1
Helpers used when computing which overlapping collapsed span counts as the larger one.
function extraLeft(marker) { return marker.inclusiveLeft ? -1 : 0 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n\n if (lenDiff != 0) {\n return lenDiff;\n }\n\n var aPos = a.find(),\n bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n\n if (fromCmp) {\n return -fromCmp;\n }\n\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n\n if (toCmp) {\n return toCmp;\n }\n\n return b.id - a.id;\n } // Find out whether a line ends or starts in a collapsed span. If", "function compareCollapsedMarkers(a, b) {\n\t\t var lenDiff = a.lines.length - b.lines.length;\n\t\t if (lenDiff != 0) return lenDiff;\n\t\t var aPos = a.find(), bPos = b.find();\n\t\t var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n\t\t if (fromCmp) return -fromCmp;\n\t\t var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n\t\t if (toCmp) return toCmp;\n\t\t return b.id - a.id;\n\t\t }", "function compareCollapsedMarkers(a, b) {\n\t var lenDiff = a.lines.length - b.lines.length;\n\t if (lenDiff != 0) return lenDiff;\n\t var aPos = a.find(), bPos = b.find();\n\t var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n\t if (fromCmp) return -fromCmp;\n\t var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n\t if (toCmp) return toCmp;\n\t return b.id - a.id;\n\t }", "function compareCollapsedMarkers(a, b) {\n\t var lenDiff = a.lines.length - b.lines.length;\n\t if (lenDiff != 0) return lenDiff;\n\t var aPos = a.find(), bPos = b.find();\n\t var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n\t if (fromCmp) return -fromCmp;\n\t var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n\t if (toCmp) return toCmp;\n\t return b.id - a.id;\n\t }", "function compareCollapsedMarkers(a, b) {\n\t var lenDiff = a.lines.length - b.lines.length;\n\t if (lenDiff != 0) return lenDiff;\n\t var aPos = a.find(), bPos = b.find();\n\t var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n\t if (fromCmp) return -fromCmp;\n\t var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n\t if (toCmp) return toCmp;\n\t return b.id - a.id;\n\t }", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) return lenDiff;\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) return -fromCmp;\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) return toCmp;\n return b.id - a.id;\n }", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) return lenDiff;\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) return -fromCmp;\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) return toCmp;\n return b.id - a.id;\n }", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) return lenDiff;\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) return -fromCmp;\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) return toCmp;\n return b.id - a.id;\n }", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) return lenDiff;\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) return -fromCmp;\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) return toCmp;\n return b.id - a.id;\n }", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) return lenDiff;\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) return -fromCmp;\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) return toCmp;\n return b.id - a.id;\n }", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) return lenDiff;\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) return -fromCmp;\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) return toCmp;\n return b.id - a.id;\n }", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) return lenDiff;\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) return -fromCmp;\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) return toCmp;\n return b.id - a.id;\n }", "function compareCollapsedMarkers(a, b) {\r\n var lenDiff = a.lines.length - b.lines.length;\r\n if (lenDiff != 0) return lenDiff;\r\n var aPos = a.find(), bPos = b.find();\r\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\r\n if (fromCmp) return -fromCmp;\r\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\r\n if (toCmp) return toCmp;\r\n return b.id - a.id;\r\n }", "function compareCollapsedMarkers(a, b) {\n\t\t var lenDiff = a.lines.length - b.lines.length;\n\t\t if (lenDiff != 0) { return lenDiff }\n\t\t var aPos = a.find(), bPos = b.find();\n\t\t var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n\t\t if (fromCmp) { return -fromCmp }\n\t\t var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n\t\t if (toCmp) { return toCmp }\n\t\t return b.id - a.id\n\t\t }", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n }", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n }", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n }", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n }", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n }", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n }", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n }", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n }", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n }", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n }", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n }", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n }", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n }", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n }", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n }", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n }", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n }", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find()\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b)\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b)\n if (toCmp) { return toCmp }\n return b.id - a.id\n}", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find()\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b)\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b)\n if (toCmp) { return toCmp }\n return b.id - a.id\n}", "function compareCollapsedMarkers(a, b) {\r\n var lenDiff = a.lines.length - b.lines.length;\r\n if (lenDiff != 0) { return lenDiff }\r\n var aPos = a.find(), bPos = b.find();\r\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\r\n if (fromCmp) { return -fromCmp }\r\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\r\n if (toCmp) { return toCmp }\r\n return b.id - a.id\r\n}", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n}", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n}", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n}", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n}", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n}", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n}", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n}", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n}", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n}", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n}", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n}", "function size_spans(){\n if(jQuery(window).width() > 767){\n jQuery('.repeated-stories').each(function(){\n\tvar span_height = 0;\n\tvar thisid = jQuery(this).attr('id');\n\tjQuery('#'+thisid).find('.span4').each(function(){\n\t\tvar new_height = jQuery(this).height();\n\t\tif(new_height > span_height){span_height = new_height};\n\t});\n\n\tjQuery('#'+thisid).find('.span4').height(span_height);\n });\n\n \n\n /*jQuery('.repeated-stories').each(function(){\n var thisid = jQuery(this).attr('id');\n var span_height = 0;\n jQuery('#'+thisid).children('span4').each(function(){\n var new_height = jQuery(this).height();\n if(new_height > span_height){span_height = new_height;}\n \n });\n console.log(thisid);\n console.log(span_height);\n jQuery('#'+thisid).find('.span').height(span_height);\n //jQuery(thisid).children('.span4').height(span_height);\n var span_height = 0;\n });*/\n }\n \n}", "function countOverlap(grid) {\n let overlap = 0;\n for (let elem of grid.values()) {\n if (elem.length > 1) overlap++;\n }\n return overlap;\n}", "get width() {\n const noOverlap = this._width\n const overlap = Math.min(100, this._width * 1.7)\n\n // Containers can always grow.\n if (this.rows) {\n return overlap\n }\n\n // Rows can grow if they have leaves.\n if (this.leaves) {\n return this.leaves.length > 0 ? overlap : noOverlap\n }\n\n // Leaves can grow unless they're the last item in a row.\n const { leaves } = this.row\n const index = leaves.indexOf(this)\n return index === leaves.length - 1 ? noOverlap : overlap\n }", "calcMaxLength () {\n let maxima = [0.0, 0.0, 0.0]\n let minima = [0.0, 0.0, 0.0]\n let spans = [0.0, 0.0, 0.0]\n\n function comp (v, i) {\n if (i === 0) return v.x\n if (i === 1) return v.y\n if (i === 2) return v.z\n }\n\n let atom = this.getAtomProxy()\n for (let iDim = 0; iDim < 3; iDim++) {\n for (let iAtom = 0; iAtom < this.getAtomCount(); iAtom += 1) {\n let pos = atom.load(iAtom).pos\n if (minima[iDim] > comp(pos, iDim)) {\n minima[iDim] = comp(pos, iDim)\n }\n if (maxima[iDim] < comp(pos, iDim)) {\n maxima[iDim] = comp(pos, iDim)\n }\n }\n spans[iDim] = maxima[iDim] - minima[iDim]\n }\n this.maxLength = Math.max(spans[0], spans[1], spans[2])\n }", "function he(e,t){var a=Jo&&t.markedSpans;if(a)for(var n=void 0,r=0;r<a.length;++r)if(n=a[r],n.marker.collapsed){if(null==n.from)return!0;if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&be(e,t,n))return!0}}", "function checkOverlap (shifts) {\n var width = 0;\n _.each(shifts, function (shift, i) {\n width += (shift.end-shift.start)\n });\n if (width > 1440) {\n return true;\n } else {\n return false;\n }\n }", "function check_collapse(sector, incr) {\n var sectors = PLANET.heights.length,\n s = (sector + sectors + incr) % sectors,\n dh = PLANET.heights[s] - PLANET.heights[sector];\n if (dh > PLANET_AMPLITUDE * MAX_DIFF) {\n if (mine_sector(s, Math.random() * 2 * dh)) {\n check_collapse(s, incr);\n }\n }\n }", "function G(a){a.collapsed=a.startContainer===a.endContainer&&a.startOffset===a.endOffset,a.commonAncestorContainer=a.collapsed?a.startContainer:J.getCommonAncestor(a.startContainer,a.endContainer)}", "_getPartOfCount() {\n\n // 8-neighborhood around\n const n = [\n Point.val(this.x - 1, this.y - 1),\n Point.val(this.x - 1, this.y),\n Point.val(this.x - 1, this.y + 1),\n Point.val(this.x, this.y - 1),\n Point.val(this.x, this.y + 1),\n Point.val(this.x + 1, this.y - 1),\n Point.val(this.x + 1, this.y),\n Point.val(this.x + 1, this.y + 1),\n ];\n\n const edges = n.filter(p => p === '-' || p === '|').length;\n const ind = [];\n for (let i = 0; i < 8; i++) {\n if (n[i] === '-' || n[i] === '|') ind.push(i);\n }\n\n switch (edges) {\n\n case 2:\n switch (ind[0]) {\n case 1: \n return ind[1] === 3 ? (n[0] === n[7] ? 2 : 1) : (n[2] === n[5] ? 2 : 1);\n case 3: \n return n[2] === n[5] ? 2 : 1;\n case 4: \n return n[0] === n[7] ? 2 : 1;\n }\n\n case 3: \n return n.filter(p => p === ' ').length === 5 ? 3 : 2;\n\n case 4:\n return n.filter(p => p === ' ').length;\n }\n }", "function calcSegmentIntersectionStripeCount_old(arcs) {\n var yrange = arcs.getBounds().height(),\n segLen = getAvgSegment2(arcs)[1], // slow\n count = 1;\n if (segLen > 0 && yrange > 0) {\n count = Math.ceil(yrange / segLen / 20);\n }\n return count || 1;\n }", "function maximumCrossoverSubarrayHelper(arr, low, middle, high) {\n console.log(`low: ${low} middle: ${middle} high: ${high}`);\n var lowSum = -100000;\n var lowIndex = 0;\n var sum = 0;\n\n for (var i = middle; i >= low; i--) {\n sum += arr[i];\n\n if (sum > lowSum) {\n lowSum = sum;\n lowIndex = i;\n }\n }\n\n var highSum = -100000;\n var highIndex = 0;\n sum = 0;\n\n for (var i = middle+1; i <= high; i++) {\n sum += arr[i];\n\n if (sum > highSum) {\n highSum = sum;\n highIndex = i;\n }\n }\n\n return [lowIndex, highIndex, lowSum+highSum];\n}", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) continue;\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\n if (fromCmp <= 0 && (cmp(found.to, from) > 0 || (sp.marker.inclusiveRight && marker.inclusiveLeft)) ||\n fromCmp >= 0 && (cmp(found.from, to) < 0 || (sp.marker.inclusiveLeft && marker.inclusiveRight)))\n return true;\n }\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) continue;\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\n if (fromCmp <= 0 && (cmp(found.to, from) > 0 || (sp.marker.inclusiveRight && marker.inclusiveLeft)) ||\n fromCmp >= 0 && (cmp(found.from, to) < 0 || (sp.marker.inclusiveLeft && marker.inclusiveRight)))\n return true;\n }\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) continue;\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\n if (fromCmp <= 0 && (cmp(found.to, from) > 0 || (sp.marker.inclusiveRight && marker.inclusiveLeft)) ||\n fromCmp >= 0 && (cmp(found.from, to) < 0 || (sp.marker.inclusiveLeft && marker.inclusiveRight)))\n return true;\n }\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) continue;\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\n if (fromCmp <= 0 && (cmp(found.to, from) > 0 || (sp.marker.inclusiveRight && marker.inclusiveLeft)) ||\n fromCmp >= 0 && (cmp(found.from, to) < 0 || (sp.marker.inclusiveLeft && marker.inclusiveRight)))\n return true;\n }\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) continue;\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\n if (fromCmp <= 0 && (cmp(found.to, from) > 0 || (sp.marker.inclusiveRight && marker.inclusiveLeft)) ||\n fromCmp >= 0 && (cmp(found.from, to) < 0 || (sp.marker.inclusiveLeft && marker.inclusiveRight)))\n return true;\n }\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) continue;\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\n if (fromCmp <= 0 && (cmp(found.to, from) > 0 || (sp.marker.inclusiveRight && marker.inclusiveLeft)) ||\n fromCmp >= 0 && (cmp(found.from, to) < 0 || (sp.marker.inclusiveLeft && marker.inclusiveRight)))\n return true;\n }\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) continue;\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n return true;\n }\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n\t var line = getLine(doc, lineNo);\n\t var sps = sawCollapsedSpans && line.markedSpans;\n\t if (sps) for (var i = 0; i < sps.length; ++i) {\n\t var sp = sps[i];\n\t if (!sp.marker.collapsed) continue;\n\t var found = sp.marker.find(0);\n\t var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n\t var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n\t if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\n\t if (fromCmp <= 0 && (cmp(found.to, from) > 0 || (sp.marker.inclusiveRight && marker.inclusiveLeft)) ||\n\t fromCmp >= 0 && (cmp(found.from, to) < 0 || (sp.marker.inclusiveLeft && marker.inclusiveRight)))\n\t return true;\n\t }\n\t }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n\t var line = getLine(doc, lineNo);\n\t var sps = sawCollapsedSpans && line.markedSpans;\n\t if (sps) for (var i = 0; i < sps.length; ++i) {\n\t var sp = sps[i];\n\t if (!sp.marker.collapsed) continue;\n\t var found = sp.marker.find(0);\n\t var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n\t var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n\t if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\n\t if (fromCmp <= 0 && (cmp(found.to, from) > 0 || (sp.marker.inclusiveRight && marker.inclusiveLeft)) ||\n\t fromCmp >= 0 && (cmp(found.from, to) < 0 || (sp.marker.inclusiveLeft && marker.inclusiveRight)))\n\t return true;\n\t }\n\t }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n\t\t var line = getLine(doc, lineNo);\n\t\t var sps = sawCollapsedSpans && line.markedSpans;\n\t\t if (sps) for (var i = 0; i < sps.length; ++i) {\n\t\t var sp = sps[i];\n\t\t if (!sp.marker.collapsed) continue;\n\t\t var found = sp.marker.find(0);\n\t\t var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n\t\t var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n\t\t if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\n\t\t if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n\t\t fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n\t\t return true;\n\t\t }\n\t\t }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n\t\t var line = getLine(doc, lineNo);\n\t\t var sps = sawCollapsedSpans && line.markedSpans;\n\t\t if (sps) { for (var i = 0; i < sps.length; ++i) {\n\t\t var sp = sps[i];\n\t\t if (!sp.marker.collapsed) { continue }\n\t\t var found = sp.marker.find(0);\n\t\t var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n\t\t var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n\t\t if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n\t\t if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n\t\t fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n\t\t { return true }\n\t\t } }\n\t\t }", "onSubGridCollapse(subGrid) {\n const splitterEl = this.resolveSplitter(subGrid);\n\n splitterEl.classList.add('b-grid-splitter-collapsed');\n // 5 in next 2 lines is the default splitter width as defined in SASS.\n splitterEl.style.width = `${subGrid.collapsedStateWidth + subGrid.splitterWidth}px`;\n splitterEl.style.left = `${Math.max(subGrid.element.offsetLeft - subGrid.splitterWidth, 0)}px`;\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n\t var line = getLine(doc, lineNo);\n\t var sps = sawCollapsedSpans && line.markedSpans;\n\t if (sps) for (var i = 0; i < sps.length; ++i) {\n\t var sp = sps[i];\n\t if (!sp.marker.collapsed) continue;\n\t var found = sp.marker.find(0);\n\t var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n\t var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n\t if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\n\t if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n\t fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n\t return true;\n\t }\n\t }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\r\n var line = getLine(doc, lineNo);\r\n var sps = sawCollapsedSpans && line.markedSpans;\r\n if (sps) for (var i = 0; i < sps.length; ++i) {\r\n var sp = sps[i];\r\n if (!sp.marker.collapsed) continue;\r\n var found = sp.marker.find(0);\r\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\r\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\r\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\r\n if (fromCmp <= 0 && (cmp(found.to, from) > 0 || (sp.marker.inclusiveRight && marker.inclusiveLeft)) ||\r\n fromCmp >= 0 && (cmp(found.from, to) < 0 || (sp.marker.inclusiveLeft && marker.inclusiveRight)))\r\n return true;\r\n }\r\n }", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function getNumberOfSurroundingMines(small, large) {\n // Find how many of the small items are in the large array. I think this can be\n // heavily optimized since it does a lot of calculations each time it's called.\n let numberOfMines = 0;\n large.forEach(function(pos) {\n small.forEach(function(pos2) {\n if (pos[0] === pos2[0] && pos[1] === pos2[1]) {\n numberOfMines++;\n }\n });\n });\n\n return numberOfMines;\n}", "function ie(e,t){var a,n=Jo&&e.markedSpans;if(n)for(var r=void 0,f=0;f<n.length;++f)r=n[f],r.marker.collapsed&&null==(t?r.from:r.to)&&(!a||oe(a,r.marker)<0)&&(a=r.marker);return a}", "topColPositions(callback){\n var colSpan = arguments[0]\n var rowIdx = arguments[1] - 1//get offset so not looking at hall\n var board = arguments[2]\n //get top and bottom\n var l = colSpan[0]\n var r = colSpan[1]\n //create copies to check reduction bounds\n var originalL = l\n //counter for a quit if the room cannot be created with the max amount of tries\n var counter = 0\n\n var span = Math.abs(l-r)\n //reduce by more than a half because of offsets\n l = l - Math.floor((span/3))\n r = r - Math.floor(span/3)\n //update the span\n span = Math.abs(l - r)\n try{\n if(board[rowIdx + 1][l].type == 'H' || board[rowIdx + 1][r].type == 'H'){\n return null\n }\n else if(board[rowIdx][l].filled == false && board[rowIdx][r].filled == false &&\n board[rowIdx+1][l].type != 'H' && board[rowIdx+1][r].filled != 'H'){//checks the bounds to make sure hall is not in the empty spaces\n // console.log('returning original')\n return [l,r]\n }\n else{\n while(((board[l][rowIdx].filled == true || board[r][rowIdx].filled == true) ||\n (board[rowIdx+1][l].type !== 'H' || board[rowIdx+1][r].type !== 'H')) && \n counter < 3 && span > 3){\n // console.log('reducing')\n //top is occupied, reduce by a quarter of current span, usually just 1 because rooms are small right now\n if(board[rowIdx][l].filled == true){\n l = l + 1\n }\n //bot is occupied, reduce by a quarter of current span, usually just 1 because rooms are small right now\n if(board[rowIdx][r].filled == true){\n r = r - 1\n }\n //return the updated positions if the positions are not filled\n if(board[rowIdx][l].filled == false && board[rowIdx][r].filled == false && originalL >= l && l < r && span > 3 &&\n board[rowIdx+1][l].type != 'H' && board[rowIdx+1][r].filled != 'H'){\n return [l,r]\n }\n //update the span\n span = Math.abs(l-r)\n //update counter\n counter += 1\n }\n }\n\n }\n catch(e){\n console.log('row position is null with top:${t} and bottom: ${b}')\n return null\n }\n return null\n }", "function matchCellWidths(els) {\n\tvar maxInnerWidth = 0;\n\n\tels.find('> span').each(function(i, innerEl) {\n\t\tvar innerWidth = $(innerEl).outerWidth();\n\t\tif (innerWidth > maxInnerWidth) {\n\t\t\tmaxInnerWidth = innerWidth;\n\t\t}\n\t});\n\n\tmaxInnerWidth++; // sometimes not accurate of width the text needs to stay on one line. insurance\n\n\tels.width(maxInnerWidth);\n\n\treturn maxInnerWidth;\n}", "function matchCellWidths(els) {\n\tvar maxInnerWidth = 0;\n\n\tels.find('> span').each(function(i, innerEl) {\n\t\tvar innerWidth = $(innerEl).outerWidth();\n\t\tif (innerWidth > maxInnerWidth) {\n\t\t\tmaxInnerWidth = innerWidth;\n\t\t}\n\t});\n\n\tmaxInnerWidth++; // sometimes not accurate of width the text needs to stay on one line. insurance\n\n\tels.width(maxInnerWidth);\n\n\treturn maxInnerWidth;\n}", "function OverlappingRanges(arr) { \n\t\n\tvar array1 = createSequence(arr[0], arr[1]);\n\tvar array2 = createSequence(arr[2], arr[3]);\n\tvar counterAnswer = compareArrays(array1, array2); \n\t\n\t\n\tfunction createSequence(x,y) {\n\t\tvar newArray = [];\n\t\tfor (var i = x; i <= y; i++) {\n\t\t\tnewArray.push(i);\n\t\t}\n\t\treturn newArray;\n\t}\n\n\tfunction compareArrays(arr1, arr2) {\n\t\tvar counter = 0;\n\t\tfor (var i = 0; i < arr1.length; i++) {\n\t\t\tif (arr2.indexOf(arr1[i]) > -1) {\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t}\n\t\treturn counter\n\t}\n\t\n\treturn (counterAnswer >= arr[4]); \n\n}", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo)\n var sps = sawCollapsedSpans && line.markedSpans\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i]\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0)\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker)\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker)\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n}", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo)\n var sps = sawCollapsedSpans && line.markedSpans\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i]\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0)\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker)\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker)\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n}", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\r\n var line = getLine(doc, lineNo$$1);\r\n var sps = sawCollapsedSpans && line.markedSpans;\r\n if (sps) { for (var i = 0; i < sps.length; ++i) {\r\n var sp = sps[i];\r\n if (!sp.marker.collapsed) { continue }\r\n var found = sp.marker.find(0);\r\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\r\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\r\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\r\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\r\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\r\n { return true }\r\n } }\r\n}", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n\n if (sps) {\n for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n\n if (!sp.marker.collapsed) {\n continue;\n }\n\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) {\n continue;\n }\n\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) || fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0)) {\n return true;\n }\n }\n }\n } // A visual line is a line as drawn on the screen. Folding, for", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n}", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n}", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n}", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n}" ]
[ "0.61587644", "0.5893051", "0.58752155", "0.58752155", "0.58752155", "0.5844405", "0.5844405", "0.5844405", "0.5844405", "0.5844405", "0.5844405", "0.5844405", "0.5819931", "0.58143693", "0.57663435", "0.57663435", "0.57663435", "0.57663435", "0.57663435", "0.57663435", "0.57663435", "0.57663435", "0.57663435", "0.57663435", "0.57663435", "0.57663435", "0.57663435", "0.57663435", "0.57663435", "0.57663435", "0.57663435", "0.5691071", "0.5691071", "0.5684892", "0.5680915", "0.5680915", "0.5680915", "0.5680915", "0.5680915", "0.5680915", "0.5680915", "0.5680915", "0.5680915", "0.5680915", "0.5680915", "0.54224116", "0.5414228", "0.5358831", "0.53473496", "0.5290874", "0.52450114", "0.5233331", "0.52251893", "0.5184357", "0.5149682", "0.5123655", "0.50884527", "0.50884527", "0.50884527", "0.50884527", "0.50884527", "0.50884527", "0.50869817", "0.50869817", "0.50869817", "0.50869817", "0.50869817", "0.50869817", "0.50869817", "0.50869817", "0.50829095", "0.508148", "0.508148", "0.50749665", "0.5073958", "0.50722694", "0.50697523", "0.5064144", "0.50437874", "0.50437874", "0.50437874", "0.50437874", "0.50437874", "0.50437874", "0.50437874", "0.50437874", "0.50437874", "0.5043455", "0.5031527", "0.50255275", "0.50164944", "0.50164944", "0.5010217", "0.4968713", "0.4968713", "0.49653453", "0.49600372", "0.4944578", "0.4944578", "0.4944578", "0.4944578" ]
0.0
-1
Returns a number indicating which of two overlapping collapsed spans is larger (and thus includes the other). Falls back to comparing ids when the spans cover exactly the same range.
function compareCollapsedMarkers(a, b) { var lenDiff = a.lines.length - b.lines.length; if (lenDiff != 0) { return lenDiff } var aPos = a.find(), bPos = b.find(); var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b); if (fromCmp) { return -fromCmp } var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b); if (toCmp) { return toCmp } return b.id - a.id }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n\n if (lenDiff != 0) {\n return lenDiff;\n }\n\n var aPos = a.find(),\n bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n\n if (fromCmp) {\n return -fromCmp;\n }\n\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n\n if (toCmp) {\n return toCmp;\n }\n\n return b.id - a.id;\n } // Find out whether a line ends or starts in a collapsed span. If", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) return lenDiff;\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) return -fromCmp;\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) return toCmp;\n return b.id - a.id;\n }", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) return lenDiff;\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) return -fromCmp;\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) return toCmp;\n return b.id - a.id;\n }", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) return lenDiff;\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) return -fromCmp;\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) return toCmp;\n return b.id - a.id;\n }", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) return lenDiff;\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) return -fromCmp;\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) return toCmp;\n return b.id - a.id;\n }", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) return lenDiff;\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) return -fromCmp;\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) return toCmp;\n return b.id - a.id;\n }", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) return lenDiff;\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) return -fromCmp;\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) return toCmp;\n return b.id - a.id;\n }", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) return lenDiff;\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) return -fromCmp;\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) return toCmp;\n return b.id - a.id;\n }", "function compareCollapsedMarkers(a, b) {\n\t var lenDiff = a.lines.length - b.lines.length;\n\t if (lenDiff != 0) return lenDiff;\n\t var aPos = a.find(), bPos = b.find();\n\t var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n\t if (fromCmp) return -fromCmp;\n\t var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n\t if (toCmp) return toCmp;\n\t return b.id - a.id;\n\t }", "function compareCollapsedMarkers(a, b) {\n\t var lenDiff = a.lines.length - b.lines.length;\n\t if (lenDiff != 0) return lenDiff;\n\t var aPos = a.find(), bPos = b.find();\n\t var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n\t if (fromCmp) return -fromCmp;\n\t var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n\t if (toCmp) return toCmp;\n\t return b.id - a.id;\n\t }", "function compareCollapsedMarkers(a, b) {\n\t var lenDiff = a.lines.length - b.lines.length;\n\t if (lenDiff != 0) return lenDiff;\n\t var aPos = a.find(), bPos = b.find();\n\t var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n\t if (fromCmp) return -fromCmp;\n\t var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n\t if (toCmp) return toCmp;\n\t return b.id - a.id;\n\t }", "function compareCollapsedMarkers(a, b) {\n\t\t var lenDiff = a.lines.length - b.lines.length;\n\t\t if (lenDiff != 0) return lenDiff;\n\t\t var aPos = a.find(), bPos = b.find();\n\t\t var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n\t\t if (fromCmp) return -fromCmp;\n\t\t var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n\t\t if (toCmp) return toCmp;\n\t\t return b.id - a.id;\n\t\t }", "function compareCollapsedMarkers(a, b) {\r\n var lenDiff = a.lines.length - b.lines.length;\r\n if (lenDiff != 0) return lenDiff;\r\n var aPos = a.find(), bPos = b.find();\r\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\r\n if (fromCmp) return -fromCmp;\r\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\r\n if (toCmp) return toCmp;\r\n return b.id - a.id;\r\n }", "function compareCollapsedMarkers(a, b) {\n\t\t var lenDiff = a.lines.length - b.lines.length;\n\t\t if (lenDiff != 0) { return lenDiff }\n\t\t var aPos = a.find(), bPos = b.find();\n\t\t var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n\t\t if (fromCmp) { return -fromCmp }\n\t\t var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n\t\t if (toCmp) { return toCmp }\n\t\t return b.id - a.id\n\t\t }", "function compareCollapsedMarkers(a, b) {\r\n var lenDiff = a.lines.length - b.lines.length;\r\n if (lenDiff != 0) { return lenDiff }\r\n var aPos = a.find(), bPos = b.find();\r\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\r\n if (fromCmp) { return -fromCmp }\r\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\r\n if (toCmp) { return toCmp }\r\n return b.id - a.id\r\n}", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find()\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b)\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b)\n if (toCmp) { return toCmp }\n return b.id - a.id\n}", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find()\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b)\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b)\n if (toCmp) { return toCmp }\n return b.id - a.id\n}", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n}", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n}", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n}", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n}", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n}", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n}", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n}", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n}", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n}", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n}", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n}", "overlaps(other) {\n return (this.low <= other.high && other.low <= this.high)\n }", "function compareScoreArray(a, b) {\n let i = 0;\n while (i < a.length && i < b.length) {\n const diff = b[i] - a[i];\n // only keep going if diff === 0\n if (diff)\n return diff;\n i++;\n }\n // if the last subsegment was Static, the shorter segments should be sorted first\n // otherwise sort the longest segment first\n if (a.length < b.length) {\n return a.length === 1 && a[0] === 40 /* Static */ + 40 /* Segment */\n ? -1\n : 1;\n }\n else if (a.length > b.length) {\n return b.length === 1 && b[0] === 40 /* Static */ + 40 /* Segment */\n ? 1\n : -1;\n }\n return 0;\n}", "function compareScoreArray(a, b) {\r\n let i = 0;\r\n while (i < a.length && i < b.length) {\r\n const diff = b[i] - a[i];\r\n // only keep going if diff === 0\r\n if (diff)\r\n return diff;\r\n i++;\r\n }\r\n // if the last subsegment was Static, the shorter segments should be sorted first\r\n // otherwise sort the longest segment first\r\n if (a.length < b.length) {\r\n return a.length === 1 && a[0] === 40 /* Static */ + 40 /* Segment */\r\n ? -1\r\n : 1;\r\n }\r\n else if (a.length > b.length) {\r\n return b.length === 1 && b[0] === 40 /* Static */ + 40 /* Segment */\r\n ? 1\r\n : -1;\r\n }\r\n return 0;\r\n}", "function compareScoreArray(a, b) {\r\n let i = 0;\r\n while (i < a.length && i < b.length) {\r\n const diff = b[i] - a[i];\r\n // only keep going if diff === 0\r\n if (diff)\r\n return diff;\r\n i++;\r\n }\r\n // if the last subsegment was Static, the shorter segments should be sorted first\r\n // otherwise sort the longest segment first\r\n if (a.length < b.length) {\r\n return a.length === 1 && a[0] === 40 /* Static */ + 40 /* Segment */\r\n ? -1\r\n : 1;\r\n }\r\n else if (a.length > b.length) {\r\n return b.length === 1 && b[0] === 40 /* Static */ + 40 /* Segment */\r\n ? 1\r\n : -1;\r\n }\r\n return 0;\r\n}", "function compareUnzonedRanges(range1,range2){return range1.startMs-range2.startMs;// earlier ranges go first\n}", "function compareCells(a, b) {\n\t var n = a.length\n\t , t = a.length - b.length\n\t , min = Math.min\n\t if(t) {\n\t return t\n\t }\n\t switch(n) {\n\t case 0:\n\t return 0;\n\t case 1:\n\t return a[0] - b[0];\n\t case 2:\n\t var d = a[0]+a[1]-b[0]-b[1]\n\t if(d) {\n\t return d\n\t }\n\t return min(a[0],a[1]) - min(b[0],b[1])\n\t case 3:\n\t var l1 = a[0]+a[1]\n\t , m1 = b[0]+b[1]\n\t d = l1+a[2] - (m1+b[2])\n\t if(d) {\n\t return d\n\t }\n\t var l0 = min(a[0], a[1])\n\t , m0 = min(b[0], b[1])\n\t , d = min(l0, a[2]) - min(m0, b[2])\n\t if(d) {\n\t return d\n\t }\n\t return min(l0+a[2], l1) - min(m0+b[2], m1)\n\t \n\t //TODO: Maybe optimize n=4 as well?\n\t \n\t default:\n\t var as = a.slice(0)\n\t as.sort()\n\t var bs = b.slice(0)\n\t bs.sort()\n\t for(var i=0; i<n; ++i) {\n\t t = as[i] - bs[i]\n\t if(t) {\n\t return t\n\t }\n\t }\n\t return 0\n\t }\n\t}", "function compareCells(a, b) {\n\t var n = a.length\n\t , t = a.length - b.length\n\t , min = Math.min\n\t if(t) {\n\t return t\n\t }\n\t switch(n) {\n\t case 0:\n\t return 0;\n\t case 1:\n\t return a[0] - b[0];\n\t case 2:\n\t var d = a[0]+a[1]-b[0]-b[1]\n\t if(d) {\n\t return d\n\t }\n\t return min(a[0],a[1]) - min(b[0],b[1])\n\t case 3:\n\t var l1 = a[0]+a[1]\n\t , m1 = b[0]+b[1]\n\t d = l1+a[2] - (m1+b[2])\n\t if(d) {\n\t return d\n\t }\n\t var l0 = min(a[0], a[1])\n\t , m0 = min(b[0], b[1])\n\t , d = min(l0, a[2]) - min(m0, b[2])\n\t if(d) {\n\t return d\n\t }\n\t return min(l0+a[2], l1) - min(m0+b[2], m1)\n\t \n\t //TODO: Maybe optimize n=4 as well?\n\t \n\t default:\n\t var as = a.slice(0)\n\t as.sort()\n\t var bs = b.slice(0)\n\t bs.sort()\n\t for(var i=0; i<n; ++i) {\n\t t = as[i] - bs[i]\n\t if(t) {\n\t return t\n\t }\n\t }\n\t return 0\n\t }\n\t}", "function compareCells(a, b) {\n\t var n = a.length\n\t , t = a.length - b.length\n\t , min = Math.min\n\t if(t) {\n\t return t\n\t }\n\t switch(n) {\n\t case 0:\n\t return 0;\n\t case 1:\n\t return a[0] - b[0];\n\t case 2:\n\t var d = a[0]+a[1]-b[0]-b[1]\n\t if(d) {\n\t return d\n\t }\n\t return min(a[0],a[1]) - min(b[0],b[1])\n\t case 3:\n\t var l1 = a[0]+a[1]\n\t , m1 = b[0]+b[1]\n\t d = l1+a[2] - (m1+b[2])\n\t if(d) {\n\t return d\n\t }\n\t var l0 = min(a[0], a[1])\n\t , m0 = min(b[0], b[1])\n\t , d = min(l0, a[2]) - min(m0, b[2])\n\t if(d) {\n\t return d\n\t }\n\t return min(l0+a[2], l1) - min(m0+b[2], m1)\n\t \n\t //TODO: Maybe optimize n=4 as well?\n\t \n\t default:\n\t var as = a.slice(0)\n\t as.sort()\n\t var bs = b.slice(0)\n\t bs.sort()\n\t for(var i=0; i<n; ++i) {\n\t t = as[i] - bs[i]\n\t if(t) {\n\t return t\n\t }\n\t }\n\t return 0\n\t }\n\t}", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) continue;\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n return true;\n }\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) continue;\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\n if (fromCmp <= 0 && (cmp(found.to, from) > 0 || (sp.marker.inclusiveRight && marker.inclusiveLeft)) ||\n fromCmp >= 0 && (cmp(found.from, to) < 0 || (sp.marker.inclusiveLeft && marker.inclusiveRight)))\n return true;\n }\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) continue;\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\n if (fromCmp <= 0 && (cmp(found.to, from) > 0 || (sp.marker.inclusiveRight && marker.inclusiveLeft)) ||\n fromCmp >= 0 && (cmp(found.from, to) < 0 || (sp.marker.inclusiveLeft && marker.inclusiveRight)))\n return true;\n }\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) continue;\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\n if (fromCmp <= 0 && (cmp(found.to, from) > 0 || (sp.marker.inclusiveRight && marker.inclusiveLeft)) ||\n fromCmp >= 0 && (cmp(found.from, to) < 0 || (sp.marker.inclusiveLeft && marker.inclusiveRight)))\n return true;\n }\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) continue;\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\n if (fromCmp <= 0 && (cmp(found.to, from) > 0 || (sp.marker.inclusiveRight && marker.inclusiveLeft)) ||\n fromCmp >= 0 && (cmp(found.from, to) < 0 || (sp.marker.inclusiveLeft && marker.inclusiveRight)))\n return true;\n }\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) continue;\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\n if (fromCmp <= 0 && (cmp(found.to, from) > 0 || (sp.marker.inclusiveRight && marker.inclusiveLeft)) ||\n fromCmp >= 0 && (cmp(found.from, to) < 0 || (sp.marker.inclusiveLeft && marker.inclusiveRight)))\n return true;\n }\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) continue;\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\n if (fromCmp <= 0 && (cmp(found.to, from) > 0 || (sp.marker.inclusiveRight && marker.inclusiveLeft)) ||\n fromCmp >= 0 && (cmp(found.from, to) < 0 || (sp.marker.inclusiveLeft && marker.inclusiveRight)))\n return true;\n }\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function isOverlap(idOne, idTwo) {\n var objOne = $(idOne),\n objTwo = $(idTwo),\n offsetOne = objOne.offset(),\n offsetTwo = objTwo.offset(),\n topOne = ($(idOne).offset() || {\n \"top\": NaN\n }).top,\n topTwo = ($(idTwo).offset() || {\n \"top\": NaN\n }).top,\n leftOne = ($(idOne).offset() || {\n \"left\": NaN\n }).left,\n leftTwo = ($(idTwo).offset() || {\n \"left\": NaN\n }).left,\n widthOne = objOne.width(),\n widthTwo = objTwo.width(),\n heightOne = objOne.height(),\n heightTwo = objTwo.height();\n\n var leftTop = leftTwo > leftOne && leftTwo < leftOne + widthOne && topTwo > topOne && topTwo < topOne + heightOne,\n rightTop = leftTwo + widthTwo > leftOne && leftTwo + widthTwo < leftOne + widthOne && topTwo > topOne && topTwo < topOne + heightOne,\n leftBottom = leftTwo > leftOne && leftTwo < leftOne + widthOne && topTwo + heightTwo > topOne && topTwo + heightTwo < topOne + heightOne,\n rightBottom = leftTwo + widthTwo > leftOne && leftTwo + widthTwo < leftOne + widthOne && topTwo + heightTwo > topOne && topTwo + heightTwo < topOne + heightOne;\n return leftTop || rightTop || leftBottom || rightBottom;\n}", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n\t var line = getLine(doc, lineNo);\n\t var sps = sawCollapsedSpans && line.markedSpans;\n\t if (sps) for (var i = 0; i < sps.length; ++i) {\n\t var sp = sps[i];\n\t if (!sp.marker.collapsed) continue;\n\t var found = sp.marker.find(0);\n\t var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n\t var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n\t if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\n\t if (fromCmp <= 0 && (cmp(found.to, from) > 0 || (sp.marker.inclusiveRight && marker.inclusiveLeft)) ||\n\t fromCmp >= 0 && (cmp(found.from, to) < 0 || (sp.marker.inclusiveLeft && marker.inclusiveRight)))\n\t return true;\n\t }\n\t }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n\t var line = getLine(doc, lineNo);\n\t var sps = sawCollapsedSpans && line.markedSpans;\n\t if (sps) for (var i = 0; i < sps.length; ++i) {\n\t var sp = sps[i];\n\t if (!sp.marker.collapsed) continue;\n\t var found = sp.marker.find(0);\n\t var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n\t var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n\t if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\n\t if (fromCmp <= 0 && (cmp(found.to, from) > 0 || (sp.marker.inclusiveRight && marker.inclusiveLeft)) ||\n\t fromCmp >= 0 && (cmp(found.from, to) < 0 || (sp.marker.inclusiveLeft && marker.inclusiveRight)))\n\t return true;\n\t }\n\t }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n\t var line = getLine(doc, lineNo);\n\t var sps = sawCollapsedSpans && line.markedSpans;\n\t if (sps) for (var i = 0; i < sps.length; ++i) {\n\t var sp = sps[i];\n\t if (!sp.marker.collapsed) continue;\n\t var found = sp.marker.find(0);\n\t var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n\t var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n\t if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\n\t if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n\t fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n\t return true;\n\t }\n\t }", "function compareCells(a, b) {\n var n = a.length\n , t = a.length - b.length\n , min = Math.min\n if(t) {\n return t\n }\n switch(n) {\n case 0:\n return 0;\n case 1:\n return a[0] - b[0];\n case 2:\n var d = a[0]+a[1]-b[0]-b[1]\n if(d) {\n return d\n }\n return min(a[0],a[1]) - min(b[0],b[1])\n case 3:\n var l1 = a[0]+a[1]\n , m1 = b[0]+b[1]\n d = l1+a[2] - (m1+b[2])\n if(d) {\n return d\n }\n var l0 = min(a[0], a[1])\n , m0 = min(b[0], b[1])\n , d = min(l0, a[2]) - min(m0, b[2])\n if(d) {\n return d\n }\n return min(l0+a[2], l1) - min(m0+b[2], m1)\n \n //TODO: Maybe optimize n=4 as well?\n \n default:\n var as = a.slice(0)\n as.sort()\n var bs = b.slice(0)\n bs.sort()\n for(var i=0; i<n; ++i) {\n t = as[i] - bs[i]\n if(t) {\n return t\n }\n }\n return 0\n }\n}", "function compareCells(a, b) {\n var n = a.length\n , t = a.length - b.length\n , min = Math.min\n if(t) {\n return t\n }\n switch(n) {\n case 0:\n return 0;\n case 1:\n return a[0] - b[0];\n case 2:\n var d = a[0]+a[1]-b[0]-b[1]\n if(d) {\n return d\n }\n return min(a[0],a[1]) - min(b[0],b[1])\n case 3:\n var l1 = a[0]+a[1]\n , m1 = b[0]+b[1]\n d = l1+a[2] - (m1+b[2])\n if(d) {\n return d\n }\n var l0 = min(a[0], a[1])\n , m0 = min(b[0], b[1])\n , d = min(l0, a[2]) - min(m0, b[2])\n if(d) {\n return d\n }\n return min(l0+a[2], l1) - min(m0+b[2], m1)\n \n //TODO: Maybe optimize n=4 as well?\n \n default:\n var as = a.slice(0)\n as.sort()\n var bs = b.slice(0)\n bs.sort()\n for(var i=0; i<n; ++i) {\n t = as[i] - bs[i]\n if(t) {\n return t\n }\n }\n return 0\n }\n}", "function compareCells(a, b) {\n var n = a.length\n , t = a.length - b.length\n , min = Math.min\n if(t) {\n return t\n }\n switch(n) {\n case 0:\n return 0;\n case 1:\n return a[0] - b[0];\n case 2:\n var d = a[0]+a[1]-b[0]-b[1]\n if(d) {\n return d\n }\n return min(a[0],a[1]) - min(b[0],b[1])\n case 3:\n var l1 = a[0]+a[1]\n , m1 = b[0]+b[1]\n d = l1+a[2] - (m1+b[2])\n if(d) {\n return d\n }\n var l0 = min(a[0], a[1])\n , m0 = min(b[0], b[1])\n , d = min(l0, a[2]) - min(m0, b[2])\n if(d) {\n return d\n }\n return min(l0+a[2], l1) - min(m0+b[2], m1)\n \n //TODO: Maybe optimize n=4 as well?\n \n default:\n var as = a.slice(0)\n as.sort()\n var bs = b.slice(0)\n bs.sort()\n for(var i=0; i<n; ++i) {\n t = as[i] - bs[i]\n if(t) {\n return t\n }\n }\n return 0\n }\n}", "function compareCells(a, b) {\n var n = a.length\n , t = a.length - b.length\n , min = Math.min\n if(t) {\n return t\n }\n switch(n) {\n case 0:\n return 0;\n case 1:\n return a[0] - b[0];\n case 2:\n var d = a[0]+a[1]-b[0]-b[1]\n if(d) {\n return d\n }\n return min(a[0],a[1]) - min(b[0],b[1])\n case 3:\n var l1 = a[0]+a[1]\n , m1 = b[0]+b[1]\n d = l1+a[2] - (m1+b[2])\n if(d) {\n return d\n }\n var l0 = min(a[0], a[1])\n , m0 = min(b[0], b[1])\n , d = min(l0, a[2]) - min(m0, b[2])\n if(d) {\n return d\n }\n return min(l0+a[2], l1) - min(m0+b[2], m1)\n \n //TODO: Maybe optimize n=4 as well?\n \n default:\n var as = a.slice(0)\n as.sort()\n var bs = b.slice(0)\n bs.sort()\n for(var i=0; i<n; ++i) {\n t = as[i] - bs[i]\n if(t) {\n return t\n }\n }\n return 0\n }\n}", "function compareCells(a, b) {\n var n = a.length\n , t = a.length - b.length\n , min = Math.min\n if(t) {\n return t\n }\n switch(n) {\n case 0:\n return 0;\n case 1:\n return a[0] - b[0];\n case 2:\n var d = a[0]+a[1]-b[0]-b[1]\n if(d) {\n return d\n }\n return min(a[0],a[1]) - min(b[0],b[1])\n case 3:\n var l1 = a[0]+a[1]\n , m1 = b[0]+b[1]\n d = l1+a[2] - (m1+b[2])\n if(d) {\n return d\n }\n var l0 = min(a[0], a[1])\n , m0 = min(b[0], b[1])\n , d = min(l0, a[2]) - min(m0, b[2])\n if(d) {\n return d\n }\n return min(l0+a[2], l1) - min(m0+b[2], m1)\n \n //TODO: Maybe optimize n=4 as well?\n \n default:\n var as = a.slice(0)\n as.sort()\n var bs = b.slice(0)\n bs.sort()\n for(var i=0; i<n; ++i) {\n t = as[i] - bs[i]\n if(t) {\n return t\n }\n }\n return 0\n }\n}", "function compareCells(a, b) {\n var n = a.length\n , t = a.length - b.length\n , min = Math.min\n if(t) {\n return t\n }\n switch(n) {\n case 0:\n return 0;\n case 1:\n return a[0] - b[0];\n case 2:\n var d = a[0]+a[1]-b[0]-b[1]\n if(d) {\n return d\n }\n return min(a[0],a[1]) - min(b[0],b[1])\n case 3:\n var l1 = a[0]+a[1]\n , m1 = b[0]+b[1]\n d = l1+a[2] - (m1+b[2])\n if(d) {\n return d\n }\n var l0 = min(a[0], a[1])\n , m0 = min(b[0], b[1])\n , d = min(l0, a[2]) - min(m0, b[2])\n if(d) {\n return d\n }\n return min(l0+a[2], l1) - min(m0+b[2], m1)\n \n //TODO: Maybe optimize n=4 as well?\n \n default:\n var as = a.slice(0)\n as.sort()\n var bs = b.slice(0)\n bs.sort()\n for(var i=0; i<n; ++i) {\n t = as[i] - bs[i]\n if(t) {\n return t\n }\n }\n return 0\n }\n}", "function compareCells(a, b) {\n var n = a.length\n , t = a.length - b.length\n , min = Math.min\n if(t) {\n return t\n }\n switch(n) {\n case 0:\n return 0;\n case 1:\n return a[0] - b[0];\n case 2:\n var d = a[0]+a[1]-b[0]-b[1]\n if(d) {\n return d\n }\n return min(a[0],a[1]) - min(b[0],b[1])\n case 3:\n var l1 = a[0]+a[1]\n , m1 = b[0]+b[1]\n d = l1+a[2] - (m1+b[2])\n if(d) {\n return d\n }\n var l0 = min(a[0], a[1])\n , m0 = min(b[0], b[1])\n , d = min(l0, a[2]) - min(m0, b[2])\n if(d) {\n return d\n }\n return min(l0+a[2], l1) - min(m0+b[2], m1)\n \n //TODO: Maybe optimize n=4 as well?\n \n default:\n var as = a.slice(0)\n as.sort()\n var bs = b.slice(0)\n bs.sort()\n for(var i=0; i<n; ++i) {\n t = as[i] - bs[i]\n if(t) {\n return t\n }\n }\n return 0\n }\n}", "function compareCells(a, b) {\n var n = a.length\n , t = a.length - b.length\n , min = Math.min\n if(t) {\n return t\n }\n switch(n) {\n case 0:\n return 0;\n case 1:\n return a[0] - b[0];\n case 2:\n var d = a[0]+a[1]-b[0]-b[1]\n if(d) {\n return d\n }\n return min(a[0],a[1]) - min(b[0],b[1])\n case 3:\n var l1 = a[0]+a[1]\n , m1 = b[0]+b[1]\n d = l1+a[2] - (m1+b[2])\n if(d) {\n return d\n }\n var l0 = min(a[0], a[1])\n , m0 = min(b[0], b[1])\n , d = min(l0, a[2]) - min(m0, b[2])\n if(d) {\n return d\n }\n return min(l0+a[2], l1) - min(m0+b[2], m1)\n \n //TODO: Maybe optimize n=4 as well?\n \n default:\n var as = a.slice(0)\n as.sort()\n var bs = b.slice(0)\n bs.sort()\n for(var i=0; i<n; ++i) {\n t = as[i] - bs[i]\n if(t) {\n return t\n }\n }\n return 0\n }\n}", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\r\n var line = getLine(doc, lineNo);\r\n var sps = sawCollapsedSpans && line.markedSpans;\r\n if (sps) for (var i = 0; i < sps.length; ++i) {\r\n var sp = sps[i];\r\n if (!sp.marker.collapsed) continue;\r\n var found = sp.marker.find(0);\r\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\r\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\r\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\r\n if (fromCmp <= 0 && (cmp(found.to, from) > 0 || (sp.marker.inclusiveRight && marker.inclusiveLeft)) ||\r\n fromCmp >= 0 && (cmp(found.from, to) < 0 || (sp.marker.inclusiveLeft && marker.inclusiveRight)))\r\n return true;\r\n }\r\n }", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n\t\t var line = getLine(doc, lineNo);\n\t\t var sps = sawCollapsedSpans && line.markedSpans;\n\t\t if (sps) for (var i = 0; i < sps.length; ++i) {\n\t\t var sp = sps[i];\n\t\t if (!sp.marker.collapsed) continue;\n\t\t var found = sp.marker.find(0);\n\t\t var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n\t\t var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n\t\t if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\n\t\t if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n\t\t fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n\t\t return true;\n\t\t }\n\t\t }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n\t\t var line = getLine(doc, lineNo);\n\t\t var sps = sawCollapsedSpans && line.markedSpans;\n\t\t if (sps) { for (var i = 0; i < sps.length; ++i) {\n\t\t var sp = sps[i];\n\t\t if (!sp.marker.collapsed) { continue }\n\t\t var found = sp.marker.find(0);\n\t\t var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n\t\t var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n\t\t if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n\t\t if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n\t\t fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n\t\t { return true }\n\t\t } }\n\t\t }", "static gt(sel1, sel2) {\n // Note: voice is not considered b/c it's more of a vertical component\n return sel1.staff > sel2.staff ||\n (sel1.staff === sel2.staff && sel1.measure > sel2.measure) ||\n (sel1.staff === sel2.staff && sel1.measure === sel2.measure && sel1.tick > sel2.tick);\n }", "function lessThanMark(mark1, mark2) {\n for (var i = 0; i < Math.min(mark1.length, mark2.length); i++) {\n if (mark1[i] < mark2[i]) {\n return -1;\n } else if (mark1[i] > mark2[i]) {\n return 1;\n } // else go on.\n }\n // We have gone through all of them, they are all equal.\n if (mark1.length < mark2.length) { return -1;\n } else if (mark1.length > mark2.length) { return 1;\n } else { return 0; }\n}", "function compareHighlights(h1, h2) {\n return h1.characterRange.start - h2.characterRange.start;\n }", "function compareHighlights(h1, h2) {\n return h1.characterRange.start - h2.characterRange.start;\n }", "function compareHighlights(h1, h2) {\n return h1.characterRange.start - h2.characterRange.start;\n }", "function compareHighlights(h1, h2) {\n return h1.characterRange.start - h2.characterRange.start;\n }", "function compareUnzonedRanges(range1, range2) {\n\treturn range1.startMs - range2.startMs; // earlier ranges go first\n}", "function compareUnzonedRanges(range1, range2) {\n\treturn range1.startMs - range2.startMs; // earlier ranges go first\n}", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo)\n var sps = sawCollapsedSpans && line.markedSpans\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i]\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0)\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker)\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker)\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n}" ]
[ "0.7142195", "0.693498", "0.693498", "0.693498", "0.693498", "0.693498", "0.693498", "0.693498", "0.691132", "0.691132", "0.691132", "0.6910217", "0.6895199", "0.68564695", "0.6827457", "0.6819273", "0.6819273", "0.68139935", "0.68139935", "0.68139935", "0.68139935", "0.68139935", "0.68139935", "0.68139935", "0.68139935", "0.68139935", "0.68139935", "0.68139935", "0.57068807", "0.5413686", "0.5360317", "0.5360317", "0.5336225", "0.5333016", "0.5333016", "0.5333016", "0.5311276", "0.530927", "0.530927", "0.530927", "0.530927", "0.530927", "0.530927", "0.530565", "0.530565", "0.530565", "0.530565", "0.530565", "0.530565", "0.530565", "0.530565", "0.52820086", "0.52790517", "0.52790517", "0.5277681", "0.52762485", "0.52762485", "0.52762485", "0.52762485", "0.52762485", "0.52762485", "0.52762485", "0.52762485", "0.5270952", "0.52614236", "0.52614236", "0.52614236", "0.52614236", "0.52614236", "0.52614236", "0.52614236", "0.52614236", "0.52614236", "0.5255977", "0.52493954", "0.5239848", "0.5225293", "0.52207893", "0.52207893", "0.5208164", "0.5208164", "0.5204806", "0.5204806", "0.5202754" ]
0.6881761
29
Find out whether a line ends or starts in a collapsed span. If so, return the marker for that span.
function collapsedSpanAtSide(line, start) { var sps = sawCollapsedSpans && line.markedSpans, found; if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) { sp = sps[i]; if (sp.marker.collapsed && (start ? sp.from : sp.to) == null && (!found || compareCollapsedMarkers(found, sp.marker) < 0)) { found = sp.marker; } } } return found }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function collapsedSpanAtSide(line, start) {\n\t\t var sps = sawCollapsedSpans && line.markedSpans, found;\n\t\t if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n\t\t sp = sps[i];\n\t\t if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n\t\t (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n\t\t { found = sp.marker; }\n\t\t } }\n\t\t return found\n\t\t }", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n found = sp.marker;\n }\n return found;\n }", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n found = sp.marker;\n }\n return found;\n }", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n found = sp.marker;\n }\n return found;\n }", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n found = sp.marker;\n }\n return found;\n }", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n found = sp.marker;\n }\n return found;\n }", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n found = sp.marker;\n }\n return found;\n }", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n found = sp.marker;\n }\n return found;\n }", "function collapsedSpanAtSide(line, start) {\n\t\t var sps = sawCollapsedSpans && line.markedSpans, found;\n\t\t if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n\t\t sp = sps[i];\n\t\t if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n\t\t (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n\t\t found = sp.marker;\n\t\t }\n\t\t return found;\n\t\t }", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans,\n found;\n\n if (sps) {\n for (var sp = void 0, i = 0; i < sps.length; ++i) {\n sp = sps[i];\n\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null && (!found || compareCollapsedMarkers(found, sp.marker) < 0)) {\n found = sp.marker;\n }\n }\n }\n\n return found;\n }", "function collapsedSpanAtSide(line, start) {\n\t var sps = sawCollapsedSpans && line.markedSpans, found;\n\t if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n\t sp = sps[i];\n\t if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n\t (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n\t found = sp.marker;\n\t }\n\t return found;\n\t }", "function collapsedSpanAtSide(line, start) {\n\t var sps = sawCollapsedSpans && line.markedSpans, found;\n\t if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n\t sp = sps[i];\n\t if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n\t (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n\t found = sp.marker;\n\t }\n\t return found;\n\t }", "function collapsedSpanAtSide(line, start) {\n\t var sps = sawCollapsedSpans && line.markedSpans, found;\n\t if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n\t sp = sps[i];\n\t if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n\t (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n\t found = sp.marker;\n\t }\n\t return found;\n\t }", "function collapsedSpanAtSide(line, start) {\r\n var sps = sawCollapsedSpans && line.markedSpans, found;\r\n if (sps) for (var sp, i = 0; i < sps.length; ++i) {\r\n sp = sps[i];\r\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\r\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\r\n found = sp.marker;\r\n }\r\n return found;\r\n }", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i]\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker }\n } }\n return found\n}", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i]\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker }\n } }\n return found\n}", "function collapsedSpanAtSide(line, start) {\r\n var sps = sawCollapsedSpans && line.markedSpans, found;\r\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\r\n sp = sps[i];\r\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\r\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\r\n { found = sp.marker; }\r\n } }\r\n return found\r\n}", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n}", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n}", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n}", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n}", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n}", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n}", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n}", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n}", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n}", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n}", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n}", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n\n if (lenDiff != 0) {\n return lenDiff;\n }\n\n var aPos = a.find(),\n bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n\n if (fromCmp) {\n return -fromCmp;\n }\n\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n\n if (toCmp) {\n return toCmp;\n }\n\n return b.id - a.id;\n } // Find out whether a line ends or starts in a collapsed span. If", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n\n if (sps) {\n for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n\n if (!sp.marker.collapsed) {\n continue;\n }\n\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) {\n continue;\n }\n\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) || fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0)) {\n return true;\n }\n }\n }\n } // A visual line is a line as drawn on the screen. Folding, for", "function he(e,t){var a=Jo&&t.markedSpans;if(a)for(var n=void 0,r=0;r<a.length;++r)if(n=a[r],n.marker.collapsed){if(null==n.from)return!0;if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&be(e,t,n))return!0}}", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n\n if (sps) {\n for (var sp = void 0, i = 0; i < sps.length; ++i) {\n sp = sps[i];\n\n if (!sp.marker.collapsed) {\n continue;\n }\n\n if (sp.from == null) {\n return true;\n }\n\n if (sp.marker.widgetNode) {\n continue;\n }\n\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp)) {\n return true;\n }\n }\n }\n }", "function lineIsHidden(doc, line) {\n\t\t var sps = sawCollapsedSpans && line.markedSpans;\n\t\t if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n\t\t sp = sps[i];\n\t\t if (!sp.marker.collapsed) continue;\n\t\t if (sp.from == null) return true;\n\t\t if (sp.marker.widgetNode) continue;\n\t\t if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n\t\t return true;\n\t\t }\n\t\t }", "function lineIsHidden(doc, line) {\n\t\t var sps = sawCollapsedSpans && line.markedSpans;\n\t\t if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n\t\t sp = sps[i];\n\t\t if (!sp.marker.collapsed) { continue }\n\t\t if (sp.from == null) { return true }\n\t\t if (sp.marker.widgetNode) { continue }\n\t\t if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n\t\t { return true }\n\t\t } }\n\t\t }", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) continue;\n if (sp.from == null) return true;\n if (sp.marker.widgetNode) continue;\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n return true;\n }\n }", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) continue;\n if (sp.from == null) return true;\n if (sp.marker.widgetNode) continue;\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n return true;\n }\n }", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) continue;\n if (sp.from == null) return true;\n if (sp.marker.widgetNode) continue;\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n return true;\n }\n }", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) continue;\n if (sp.from == null) return true;\n if (sp.marker.widgetNode) continue;\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n return true;\n }\n }", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) continue;\n if (sp.from == null) return true;\n if (sp.marker.widgetNode) continue;\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n return true;\n }\n }", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) continue;\n if (sp.from == null) return true;\n if (sp.marker.widgetNode) continue;\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n return true;\n }\n }", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) continue;\n if (sp.from == null) return true;\n if (sp.marker.widgetNode) continue;\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n return true;\n }\n }", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n if (sp.from == null) { return true }\n if (sp.marker.widgetNode) { continue }\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n { return true }\n } }\n }", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n if (sp.from == null) { return true }\n if (sp.marker.widgetNode) { continue }\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n { return true }\n } }\n }", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n if (sp.from == null) { return true }\n if (sp.marker.widgetNode) { continue }\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n { return true }\n } }\n }", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n if (sp.from == null) { return true }\n if (sp.marker.widgetNode) { continue }\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n { return true }\n } }\n }", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n if (sp.from == null) { return true }\n if (sp.marker.widgetNode) { continue }\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n { return true }\n } }\n }", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n if (sp.from == null) { return true }\n if (sp.marker.widgetNode) { continue }\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n { return true }\n } }\n }", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n if (sp.from == null) { return true }\n if (sp.marker.widgetNode) { continue }\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n { return true }\n } }\n }", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n if (sp.from == null) { return true }\n if (sp.marker.widgetNode) { continue }\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n { return true }\n } }\n }", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n if (sp.from == null) { return true }\n if (sp.marker.widgetNode) { continue }\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n { return true }\n } }\n }", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n if (sp.from == null) { return true }\n if (sp.marker.widgetNode) { continue }\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n { return true }\n } }\n }", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n if (sp.from == null) { return true }\n if (sp.marker.widgetNode) { continue }\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n { return true }\n } }\n }", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n if (sp.from == null) { return true }\n if (sp.marker.widgetNode) { continue }\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n { return true }\n } }\n }", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n if (sp.from == null) { return true }\n if (sp.marker.widgetNode) { continue }\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n { return true }\n } }\n }", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n if (sp.from == null) { return true }\n if (sp.marker.widgetNode) { continue }\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n { return true }\n } }\n }", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n if (sp.from == null) { return true }\n if (sp.marker.widgetNode) { continue }\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n { return true }\n } }\n }", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n if (sp.from == null) { return true }\n if (sp.marker.widgetNode) { continue }\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n { return true }\n } }\n }", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n if (sp.from == null) { return true }\n if (sp.marker.widgetNode) { continue }\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n { return true }\n } }\n }", "function lineIsHidden(doc, line) {\r\n var sps = sawCollapsedSpans && line.markedSpans;\r\n if (sps) for (var sp, i = 0; i < sps.length; ++i) {\r\n sp = sps[i];\r\n if (!sp.marker.collapsed) continue;\r\n if (sp.from == null) return true;\r\n if (sp.marker.widgetNode) continue;\r\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\r\n return true;\r\n }\r\n }", "function getMarkedSpanFor(spans, marker) {\n\t\t if (spans) for (var i = 0; i < spans.length; ++i) {\n\t\t var span = spans[i];\n\t\t if (span.marker == marker) return span;\n\t\t }\n\t\t }", "function getMarkedSpanFor(spans, marker) {\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) { return span }\n } }\n }", "function getMarkedSpanFor(spans, marker) {\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) { return span }\n } }\n }", "function getMarkedSpanFor(spans, marker) {\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) { return span }\n } }\n }", "function getMarkedSpanFor(spans, marker) {\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) { return span }\n } }\n }", "function getMarkedSpanFor(spans, marker) {\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) { return span }\n } }\n }", "function getMarkedSpanFor(spans, marker) {\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) { return span }\n } }\n }", "function getMarkedSpanFor(spans, marker) {\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) { return span }\n } }\n }", "function getMarkedSpanFor(spans, marker) {\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) { return span }\n } }\n }", "function getMarkedSpanFor(spans, marker) {\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) { return span }\n } }\n }", "function getMarkedSpanFor(spans, marker) {\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) { return span }\n } }\n }", "function getMarkedSpanFor(spans, marker) {\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) { return span }\n } }\n }", "function getMarkedSpanFor(spans, marker) {\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) { return span }\n } }\n }", "function getMarkedSpanFor(spans, marker) {\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) { return span }\n } }\n }", "function getMarkedSpanFor(spans, marker) {\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) { return span }\n } }\n }", "function getMarkedSpanFor(spans, marker) {\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) { return span }\n } }\n }", "function getMarkedSpanFor(spans, marker) {\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) { return span }\n } }\n }", "function getMarkedSpanFor(spans, marker) {\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) { return span }\n } }\n }", "function getMarkedSpanFor(spans, marker) {\n\t\t if (spans) { for (var i = 0; i < spans.length; ++i) {\n\t\t var span = spans[i];\n\t\t if (span.marker == marker) { return span }\n\t\t } }\n\t\t }", "function getMarkedSpanFor(spans, marker) {\n if (spans) for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) return span;\n }\n }", "function getMarkedSpanFor(spans, marker) {\n if (spans) for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) return span;\n }\n }", "function getMarkedSpanFor(spans, marker) {\n if (spans) for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) return span;\n }\n }", "function getMarkedSpanFor(spans, marker) {\n if (spans) for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) return span;\n }\n }", "function getMarkedSpanFor(spans, marker) {\n if (spans) for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) return span;\n }\n }", "function getMarkedSpanFor(spans, marker) {\n if (spans) for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) return span;\n }\n }" ]
[ "0.77824205", "0.77296805", "0.77296805", "0.77296805", "0.77296805", "0.77296805", "0.77296805", "0.77296805", "0.77273697", "0.77246094", "0.76923454", "0.76923454", "0.76923454", "0.765709", "0.765314", "0.765314", "0.76409036", "0.76277256", "0.76277256", "0.76277256", "0.76277256", "0.76277256", "0.76277256", "0.76277256", "0.76277256", "0.76277256", "0.76277256", "0.76277256", "0.6823757", "0.6644239", "0.6431703", "0.63891613", "0.6355957", "0.6355057", "0.6351907", "0.6351907", "0.6351907", "0.6351907", "0.6351907", "0.6351907", "0.6351907", "0.63515115", "0.63515115", "0.63515115", "0.63515115", "0.63515115", "0.63515115", "0.63515115", "0.63515115", "0.63515115", "0.63515115", "0.63515115", "0.63515115", "0.63515115", "0.63515115", "0.63515115", "0.63515115", "0.63515115", "0.63287044", "0.6327241", "0.6326854", "0.6326854", "0.6326854", "0.6326854", "0.6326854", "0.6326854", "0.6326854", "0.6326854", "0.6326854", "0.6326854", "0.6326854", "0.6326854", "0.6326854", "0.6326854", "0.6326854", "0.6326854", "0.6326854", "0.6325148", "0.62999535", "0.62999535", "0.62999535", "0.62999535", "0.62999535", "0.62999535" ]
0.77477694
16
Test whether there exists a collapsed span that partially overlaps (covers the start or end, but not both) of a new span. Such overlap is not allowed.
function conflictingCollapsedRange(doc, lineNo, from, to, marker) { var line = getLine(doc, lineNo); var sps = sawCollapsedSpans && line.markedSpans; if (sps) { for (var i = 0; i < sps.length; ++i) { var sp = sps[i]; if (!sp.marker.collapsed) { continue } var found = sp.marker.find(0); var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker); var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker); if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue } if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) || fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0)) { return true } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) continue;\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\n if (fromCmp <= 0 && (cmp(found.to, from) > 0 || (sp.marker.inclusiveRight && marker.inclusiveLeft)) ||\n fromCmp >= 0 && (cmp(found.from, to) < 0 || (sp.marker.inclusiveLeft && marker.inclusiveRight)))\n return true;\n }\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) continue;\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\n if (fromCmp <= 0 && (cmp(found.to, from) > 0 || (sp.marker.inclusiveRight && marker.inclusiveLeft)) ||\n fromCmp >= 0 && (cmp(found.from, to) < 0 || (sp.marker.inclusiveLeft && marker.inclusiveRight)))\n return true;\n }\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) continue;\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\n if (fromCmp <= 0 && (cmp(found.to, from) > 0 || (sp.marker.inclusiveRight && marker.inclusiveLeft)) ||\n fromCmp >= 0 && (cmp(found.from, to) < 0 || (sp.marker.inclusiveLeft && marker.inclusiveRight)))\n return true;\n }\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) continue;\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\n if (fromCmp <= 0 && (cmp(found.to, from) > 0 || (sp.marker.inclusiveRight && marker.inclusiveLeft)) ||\n fromCmp >= 0 && (cmp(found.from, to) < 0 || (sp.marker.inclusiveLeft && marker.inclusiveRight)))\n return true;\n }\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) continue;\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\n if (fromCmp <= 0 && (cmp(found.to, from) > 0 || (sp.marker.inclusiveRight && marker.inclusiveLeft)) ||\n fromCmp >= 0 && (cmp(found.from, to) < 0 || (sp.marker.inclusiveLeft && marker.inclusiveRight)))\n return true;\n }\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) continue;\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\n if (fromCmp <= 0 && (cmp(found.to, from) > 0 || (sp.marker.inclusiveRight && marker.inclusiveLeft)) ||\n fromCmp >= 0 && (cmp(found.from, to) < 0 || (sp.marker.inclusiveLeft && marker.inclusiveRight)))\n return true;\n }\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) continue;\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n return true;\n }\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\r\n var line = getLine(doc, lineNo);\r\n var sps = sawCollapsedSpans && line.markedSpans;\r\n if (sps) for (var i = 0; i < sps.length; ++i) {\r\n var sp = sps[i];\r\n if (!sp.marker.collapsed) continue;\r\n var found = sp.marker.find(0);\r\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\r\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\r\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\r\n if (fromCmp <= 0 && (cmp(found.to, from) > 0 || (sp.marker.inclusiveRight && marker.inclusiveLeft)) ||\r\n fromCmp >= 0 && (cmp(found.from, to) < 0 || (sp.marker.inclusiveLeft && marker.inclusiveRight)))\r\n return true;\r\n }\r\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n\t var line = getLine(doc, lineNo);\n\t var sps = sawCollapsedSpans && line.markedSpans;\n\t if (sps) for (var i = 0; i < sps.length; ++i) {\n\t var sp = sps[i];\n\t if (!sp.marker.collapsed) continue;\n\t var found = sp.marker.find(0);\n\t var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n\t var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n\t if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\n\t if (fromCmp <= 0 && (cmp(found.to, from) > 0 || (sp.marker.inclusiveRight && marker.inclusiveLeft)) ||\n\t fromCmp >= 0 && (cmp(found.from, to) < 0 || (sp.marker.inclusiveLeft && marker.inclusiveRight)))\n\t return true;\n\t }\n\t }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n\t var line = getLine(doc, lineNo);\n\t var sps = sawCollapsedSpans && line.markedSpans;\n\t if (sps) for (var i = 0; i < sps.length; ++i) {\n\t var sp = sps[i];\n\t if (!sp.marker.collapsed) continue;\n\t var found = sp.marker.find(0);\n\t var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n\t var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n\t if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\n\t if (fromCmp <= 0 && (cmp(found.to, from) > 0 || (sp.marker.inclusiveRight && marker.inclusiveLeft)) ||\n\t fromCmp >= 0 && (cmp(found.from, to) < 0 || (sp.marker.inclusiveLeft && marker.inclusiveRight)))\n\t return true;\n\t }\n\t }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n\t\t var line = getLine(doc, lineNo);\n\t\t var sps = sawCollapsedSpans && line.markedSpans;\n\t\t if (sps) for (var i = 0; i < sps.length; ++i) {\n\t\t var sp = sps[i];\n\t\t if (!sp.marker.collapsed) continue;\n\t\t var found = sp.marker.find(0);\n\t\t var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n\t\t var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n\t\t if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\n\t\t if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n\t\t fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n\t\t return true;\n\t\t }\n\t\t }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n\t var line = getLine(doc, lineNo);\n\t var sps = sawCollapsedSpans && line.markedSpans;\n\t if (sps) for (var i = 0; i < sps.length; ++i) {\n\t var sp = sps[i];\n\t if (!sp.marker.collapsed) continue;\n\t var found = sp.marker.find(0);\n\t var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n\t var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n\t if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\n\t if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n\t fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n\t return true;\n\t }\n\t }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n\n if (sps) {\n for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n\n if (!sp.marker.collapsed) {\n continue;\n }\n\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) {\n continue;\n }\n\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) || fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0)) {\n return true;\n }\n }\n }\n } // A visual line is a line as drawn on the screen. Folding, for", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n\t\t var line = getLine(doc, lineNo);\n\t\t var sps = sawCollapsedSpans && line.markedSpans;\n\t\t if (sps) { for (var i = 0; i < sps.length; ++i) {\n\t\t var sp = sps[i];\n\t\t if (!sp.marker.collapsed) { continue }\n\t\t var found = sp.marker.find(0);\n\t\t var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n\t\t var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n\t\t if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n\t\t if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n\t\t fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n\t\t { return true }\n\t\t } }\n\t\t }", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo)\n var sps = sawCollapsedSpans && line.markedSpans\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i]\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0)\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker)\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker)\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n}", "function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo)\n var sps = sawCollapsedSpans && line.markedSpans\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i]\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0)\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker)\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker)\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n}", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\r\n var line = getLine(doc, lineNo$$1);\r\n var sps = sawCollapsedSpans && line.markedSpans;\r\n if (sps) { for (var i = 0; i < sps.length; ++i) {\r\n var sp = sps[i];\r\n if (!sp.marker.collapsed) { continue }\r\n var found = sp.marker.find(0);\r\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\r\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\r\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\r\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\r\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\r\n { return true }\r\n } }\r\n}", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n}", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n}", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n}", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n}", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n}", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n}", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n}", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n}", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n}", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n}", "function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {\n var line = getLine(doc, lineNo$$1);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n}", "isCollapsed(range) {\n var {\n anchor,\n focus\n } = range;\n return Point.equals(anchor, focus);\n }", "isCollapsed(range) {\n var {\n anchor,\n focus\n } = range;\n return Point.equals(anchor, focus);\n }", "overlaps(range) {\n for (let i = 0, j = this.set.length; i < j; i++) {\n const setRange = this.set[i];\n if (setRange.range[1] > range.range[0] &&\n setRange.range[0] < range.range[1]) {\n return true;\n }\n }\n return false;\n }", "function collapsedSpanAtSide(line, start) {\n\t\t var sps = sawCollapsedSpans && line.markedSpans, found;\n\t\t if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n\t\t sp = sps[i];\n\t\t if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n\t\t (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n\t\t { found = sp.marker; }\n\t\t } }\n\t\t return found\n\t\t }", "isExpanded(range) {\n return !Range.isCollapsed(range);\n }", "isExpanded(range) {\n return !Range.isCollapsed(range);\n }", "function collapsedSpanAtSide(line, start) {\n\t\t var sps = sawCollapsedSpans && line.markedSpans, found;\n\t\t if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n\t\t sp = sps[i];\n\t\t if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n\t\t (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n\t\t found = sp.marker;\n\t\t }\n\t\t return found;\n\t\t }", "function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n\n if (lenDiff != 0) {\n return lenDiff;\n }\n\n var aPos = a.find(),\n bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n\n if (fromCmp) {\n return -fromCmp;\n }\n\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n\n if (toCmp) {\n return toCmp;\n }\n\n return b.id - a.id;\n } // Find out whether a line ends or starts in a collapsed span. If", "_isOverlap (segA, segB) {\n\t\tvar _isBefore = (segA.end >= segB.start && segA.start <= segB.end + 1);\n\t\tvar _isAfter = (segA.start <= segB.end + 1 && segA.end >= segB.start);\n\t\tvar _isSame = (segA === segB);\n\t\treturn ((_isBefore || _isAfter) && (!_isSame));\n\t}", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n }", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n }", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n }", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n }", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n }", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n }", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n }", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n }", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n }", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n }", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n }", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n }", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n }", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n }", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n }", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n }", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n }", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans,\n found;\n\n if (sps) {\n for (var sp = void 0, i = 0; i < sps.length; ++i) {\n sp = sps[i];\n\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null && (!found || compareCollapsedMarkers(found, sp.marker) < 0)) {\n found = sp.marker;\n }\n }\n }\n\n return found;\n }", "function collapsedSpanAtSide(line, start) {\n\t var sps = sawCollapsedSpans && line.markedSpans, found;\n\t if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n\t sp = sps[i];\n\t if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n\t (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n\t found = sp.marker;\n\t }\n\t return found;\n\t }", "function collapsedSpanAtSide(line, start) {\n\t var sps = sawCollapsedSpans && line.markedSpans, found;\n\t if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n\t sp = sps[i];\n\t if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n\t (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n\t found = sp.marker;\n\t }\n\t return found;\n\t }", "function collapsedSpanAtSide(line, start) {\n\t var sps = sawCollapsedSpans && line.markedSpans, found;\n\t if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n\t sp = sps[i];\n\t if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n\t (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n\t found = sp.marker;\n\t }\n\t return found;\n\t }", "overlaps(_rect, _insetbyX, _insetByY) {\n return this.intersects(_rect, _insetbyX, _insetByY);\n }", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n found = sp.marker;\n }\n return found;\n }", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n found = sp.marker;\n }\n return found;\n }", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n found = sp.marker;\n }\n return found;\n }", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n found = sp.marker;\n }\n return found;\n }", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n found = sp.marker;\n }\n return found;\n }", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n found = sp.marker;\n }\n return found;\n }", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n found = sp.marker;\n }\n return found;\n }", "function collapsedSpanAtSide(line, start) {\r\n var sps = sawCollapsedSpans && line.markedSpans, found;\r\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\r\n sp = sps[i];\r\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\r\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\r\n { found = sp.marker; }\r\n } }\r\n return found\r\n}", "function collapsedSpanAtSide(line, start) {\r\n var sps = sawCollapsedSpans && line.markedSpans, found;\r\n if (sps) for (var sp, i = 0; i < sps.length; ++i) {\r\n sp = sps[i];\r\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\r\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\r\n found = sp.marker;\r\n }\r\n return found;\r\n }", "function overlap(a, b) {\n if (a.start <= b.start && a.end > b.start) {\n return true;\n } else if (a.start >= b.start && a.start < b.end) {\n return true;\n } else {\n return false;\n }\n }", "function checkOverlap (shifts) {\n var width = 0;\n _.each(shifts, function (shift, i) {\n width += (shift.end-shift.start)\n });\n if (width > 1440) {\n return true;\n } else {\n return false;\n }\n }", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n}", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n}", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n}", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n}", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n}", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n}", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n}", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n}", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n}", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n}", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n}", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i]\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker }\n } }\n return found\n}", "function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i]\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker }\n } }\n return found\n}", "function textSpanContainsTextSpan(span, other) {\n return other.start >= span.start && textSpanEnd(other) <= textSpanEnd(span);\n }" ]
[ "0.6864755", "0.6864755", "0.6864755", "0.6864755", "0.6864755", "0.6864755", "0.685666", "0.6841365", "0.68317807", "0.68317807", "0.682337", "0.6810524", "0.6806325", "0.6797459", "0.67893624", "0.67893624", "0.67893624", "0.67893624", "0.67893624", "0.67893624", "0.67893624", "0.67893624", "0.67893624", "0.67631805", "0.67631805", "0.67511165", "0.6716277", "0.6716277", "0.6716277", "0.6716277", "0.6716277", "0.6716277", "0.6716277", "0.6716277", "0.6716277", "0.6716277", "0.6716277", "0.63248515", "0.63248515", "0.6107233", "0.6094299", "0.6042385", "0.6042385", "0.60395956", "0.60367274", "0.6033609", "0.6027934", "0.6027934", "0.6027934", "0.6027934", "0.6027934", "0.6027934", "0.6027934", "0.6027934", "0.6027934", "0.6027934", "0.6027934", "0.6027934", "0.6027934", "0.6027934", "0.6027934", "0.6027934", "0.6027934", "0.60058117", "0.6003465", "0.6003465", "0.6003465", "0.5999689", "0.5985356", "0.5985356", "0.5985356", "0.5985356", "0.5985356", "0.5985356", "0.5985356", "0.5943119", "0.5942019", "0.5924051", "0.59101546", "0.59043086", "0.59043086", "0.59043086", "0.59043086", "0.59043086", "0.59043086", "0.59043086", "0.59043086", "0.59043086", "0.59043086", "0.59043086", "0.5893012", "0.5893012", "0.58829516" ]
0.68406713
15
A visual line is a line as drawn on the screen. Folding, for example, can cause multiple logical lines to appear on the same visual line. This finds the start of the visual line that the given line is part of (usually that is the line itself).
function visualLine(line) { var merged; while (merged = collapsedSpanAtStart(line)) { line = merged.find(-1, true).line; } return line }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function visualLine(line) {\n\t\t var merged;\n\t\t while (merged = collapsedSpanAtStart(line))\n\t\t line = merged.find(-1, true).line;\n\t\t return line;\n\t\t }", "function visualLine(line) {\n\t\t var merged;\n\t\t while (merged = collapsedSpanAtStart(line))\n\t\t { line = merged.find(-1, true).line; }\n\t\t return line\n\t\t }", "function visualLine(line) {\n\t var merged;\n\t while (merged = collapsedSpanAtStart(line))\n\t line = merged.find(-1, true).line;\n\t return line;\n\t }", "function visualLine(line) {\n\t var merged;\n\t while (merged = collapsedSpanAtStart(line))\n\t line = merged.find(-1, true).line;\n\t return line;\n\t }", "function visualLine(line) {\n\t var merged;\n\t while (merged = collapsedSpanAtStart(line))\n\t line = merged.find(-1, true).line;\n\t return line;\n\t }", "function visualLine(line) {\r\n var merged;\r\n while (merged = collapsedSpanAtStart(line))\r\n { line = merged.find(-1, true).line; }\r\n return line\r\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\r\n var merged;\r\n while (merged = collapsedSpanAtStart(line))\r\n line = merged.find(-1, true).line;\r\n return line;\r\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\n var merged;\n\n while (merged = collapsedSpanAtStart(line)) {\n line = merged.find(-1, true).line;\n }\n\n return line;\n }", "function visualLine(line) {\n var merged\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line }\n return line\n}", "function visualLine(line) {\n var merged\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line }\n return line\n}", "function visualLineContinued(line) {\n var merged, lines;\n\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line;\n (lines || (lines = [])).push(line);\n }\n\n return lines;\n } // Get the line number of the start of the visual line that the", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN),\n vis = visualLine(line);\n\n if (line == vis) {\n return lineN;\n }\n\n return lineNo(vis);\n } // Get the line number of the start of the next visual line after", "function find_start_line() {\n // TODO:\n return 0\n}", "function visualLineContinued(line) {\n\t\t var merged, lines;\n\t\t while (merged = collapsedSpanAtEnd(line)) {\n\t\t line = merged.find(1, true).line;\n\t\t (lines || (lines = [])).push(line);\n\t\t }\n\t\t return lines;\n\t\t }", "function visualLineContinued(line) {\n\t\t var merged, lines;\n\t\t while (merged = collapsedSpanAtEnd(line)) {\n\t\t line = merged.find(1, true).line\n\t\t ;(lines || (lines = [])).push(line);\n\t\t }\n\t\t return lines\n\t\t }", "function getVisibleLine(editor) {\n if (!editor.visibleRanges.length) {\n return undefined;\n }\n const firstVisiblePosition = editor.visibleRanges[0].start;\n const lineNumber = firstVisiblePosition.line;\n const line = editor.document.lineAt(lineNumber);\n const progress = firstVisiblePosition.character / (line.text.length + 2);\n return lineNumber + progress;\n}", "function visualLineContinued(line) {\r\n var merged, lines;\r\n while (merged = collapsedSpanAtEnd(line)) {\r\n line = merged.find(1, true).line\r\n ;(lines || (lines = [])).push(line);\r\n }\r\n return lines\r\n}", "function visualLineContinued(line) {\r\n var merged, lines;\r\n while (merged = collapsedSpanAtEnd(line)) {\r\n line = merged.find(1, true).line;\r\n (lines || (lines = [])).push(line);\r\n }\r\n return lines;\r\n }", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n }", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n }", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n }", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n }", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n }", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n }", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n }", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n }", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n }", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n }", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n }", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n }", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n }", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n }", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n }", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n }", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n }", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n}", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n}", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n}", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n}", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n}", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n}", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n}", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n}", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n}", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n}", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n}", "function visualLineContinued(line) {\n var merged, lines\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line)\n }\n return lines\n}", "function visualLineContinued(line) {\n var merged, lines\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line)\n }\n return lines\n}", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line;\n (lines || (lines = [])).push(line);\n }\n return lines;\n }", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line;\n (lines || (lines = [])).push(line);\n }\n return lines;\n }", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line;\n (lines || (lines = [])).push(line);\n }\n return lines;\n }", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line;\n (lines || (lines = [])).push(line);\n }\n return lines;\n }", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line;\n (lines || (lines = [])).push(line);\n }\n return lines;\n }", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line;\n (lines || (lines = [])).push(line);\n }\n return lines;\n }", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line;\n (lines || (lines = [])).push(line);\n }\n return lines;\n }", "function visualLineContinued(line) {\n\t var merged, lines;\n\t while (merged = collapsedSpanAtEnd(line)) {\n\t line = merged.find(1, true).line;\n\t (lines || (lines = [])).push(line);\n\t }\n\t return lines;\n\t }", "function visualLineContinued(line) {\n\t var merged, lines;\n\t while (merged = collapsedSpanAtEnd(line)) {\n\t line = merged.find(1, true).line;\n\t (lines || (lines = [])).push(line);\n\t }\n\t return lines;\n\t }", "function visualLineContinued(line) {\n\t var merged, lines;\n\t while (merged = collapsedSpanAtEnd(line)) {\n\t line = merged.find(1, true).line;\n\t (lines || (lines = [])).push(line);\n\t }\n\t return lines;\n\t }", "function lineStart(area) {\n area.pos = area.pos || pos(area);\n return pos - linePos(area);\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line)\n if (line == vis) { return lineN }\n return lineNo(vis)\n}", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line)\n if (line == vis) { return lineN }\n return lineNo(vis)\n}", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }" ]
[ "0.8249708", "0.82403517", "0.82310456", "0.82310456", "0.82310456", "0.8211458", "0.81782895", "0.81782895", "0.81782895", "0.81782895", "0.81782895", "0.81782895", "0.81782895", "0.8173139", "0.8154529", "0.8154529", "0.8154529", "0.8154529", "0.8154529", "0.8154529", "0.8154529", "0.8154529", "0.8154529", "0.8154529", "0.8154529", "0.8154065", "0.80754787", "0.80754787", "0.7525497", "0.6921321", "0.6656961", "0.6558318", "0.65468115", "0.65401936", "0.65393287", "0.65281355", "0.65270334", "0.65270334", "0.65270334", "0.65270334", "0.65270334", "0.65270334", "0.65270334", "0.65270334", "0.65270334", "0.65270334", "0.65270334", "0.65270334", "0.65270334", "0.65270334", "0.65270334", "0.65270334", "0.65270334", "0.6517241", "0.6517241", "0.6517241", "0.6517241", "0.6517241", "0.6517241", "0.6517241", "0.6517241", "0.6517241", "0.6517241", "0.6517241", "0.6512882", "0.6512882", "0.65031445", "0.65031445", "0.65031445", "0.65031445", "0.65031445", "0.65031445", "0.65031445", "0.65018106", "0.65018106", "0.65018106", "0.64951473", "0.6478384", "0.6478384", "0.64666057", "0.64666057", "0.64666057", "0.64666057", "0.64666057" ]
0.81785846
20
Returns an array of logical lines that continue the visual line started by the argument, or undefined if there are no such lines.
function visualLineContinued(line) { var merged, lines; while (merged = collapsedSpanAtEnd(line)) { line = merged.find(1, true).line ;(lines || (lines = [])).push(line); } return lines }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function visualLineContinued(line) {\n var merged, lines;\n\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line;\n (lines || (lines = [])).push(line);\n }\n\n return lines;\n } // Get the line number of the start of the visual line that the", "function visualLineContinued(line) {\n\t\t var merged, lines;\n\t\t while (merged = collapsedSpanAtEnd(line)) {\n\t\t line = merged.find(1, true).line;\n\t\t (lines || (lines = [])).push(line);\n\t\t }\n\t\t return lines;\n\t\t }", "function visualLineContinued(line) {\n\t\t var merged, lines;\n\t\t while (merged = collapsedSpanAtEnd(line)) {\n\t\t line = merged.find(1, true).line\n\t\t ;(lines || (lines = [])).push(line);\n\t\t }\n\t\t return lines\n\t\t }", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line;\n (lines || (lines = [])).push(line);\n }\n return lines;\n }", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line;\n (lines || (lines = [])).push(line);\n }\n return lines;\n }", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line;\n (lines || (lines = [])).push(line);\n }\n return lines;\n }", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line;\n (lines || (lines = [])).push(line);\n }\n return lines;\n }", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line;\n (lines || (lines = [])).push(line);\n }\n return lines;\n }", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line;\n (lines || (lines = [])).push(line);\n }\n return lines;\n }", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line;\n (lines || (lines = [])).push(line);\n }\n return lines;\n }", "function visualLineContinued(line) {\n\t var merged, lines;\n\t while (merged = collapsedSpanAtEnd(line)) {\n\t line = merged.find(1, true).line;\n\t (lines || (lines = [])).push(line);\n\t }\n\t return lines;\n\t }", "function visualLineContinued(line) {\n\t var merged, lines;\n\t while (merged = collapsedSpanAtEnd(line)) {\n\t line = merged.find(1, true).line;\n\t (lines || (lines = [])).push(line);\n\t }\n\t return lines;\n\t }", "function visualLineContinued(line) {\n\t var merged, lines;\n\t while (merged = collapsedSpanAtEnd(line)) {\n\t line = merged.find(1, true).line;\n\t (lines || (lines = [])).push(line);\n\t }\n\t return lines;\n\t }", "function visualLineContinued(line) {\r\n var merged, lines;\r\n while (merged = collapsedSpanAtEnd(line)) {\r\n line = merged.find(1, true).line;\r\n (lines || (lines = [])).push(line);\r\n }\r\n return lines;\r\n }", "function visualLineContinued(line) {\r\n var merged, lines;\r\n while (merged = collapsedSpanAtEnd(line)) {\r\n line = merged.find(1, true).line\r\n ;(lines || (lines = [])).push(line);\r\n }\r\n return lines\r\n}", "function visualLineContinued(line) {\n var merged, lines\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line)\n }\n return lines\n}", "function visualLineContinued(line) {\n var merged, lines\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line)\n }\n return lines\n}", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n}", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n}", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n}", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n}", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n}", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n}", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n}", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n}", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n}", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n}", "function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n}", "function visualLine(line) {\n\t\t var merged;\n\t\t while (merged = collapsedSpanAtStart(line))\n\t\t { line = merged.find(-1, true).line; }\n\t\t return line\n\t\t }", "function visualLine(line) {\n\t\t var merged;\n\t\t while (merged = collapsedSpanAtStart(line))\n\t\t line = merged.find(-1, true).line;\n\t\t return line;\n\t\t }", "function linesBefore(area) { return beforeLines(area).allButLast(); }", "function singleLineJourney() {\n \n if (startLine === endLine) {\n if (startJourney < endJourney) {\n for (var i = startJourney; i <= endJourney; i++) {\n journey.push(startLine[i])\n }\n } else if (startJourney > endJourney) {\n for (var i = startJourney; i >= endJourney; i--) {\n journey.push(startLine[i])\n }\n }\n }\n \n}", "get horizontalLineVisibility() {\r\n return this.i.pl;\r\n }", "function visualLine(line) {\r\n var merged;\r\n while (merged = collapsedSpanAtStart(line))\r\n { line = merged.find(-1, true).line; }\r\n return line\r\n}", "function visualLine(line) {\n var merged\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line }\n return line\n}", "function visualLine(line) {\n var merged\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line }\n return line\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\n\t var merged;\n\t while (merged = collapsedSpanAtStart(line))\n\t line = merged.find(-1, true).line;\n\t return line;\n\t }", "function visualLine(line) {\n\t var merged;\n\t while (merged = collapsedSpanAtStart(line))\n\t line = merged.find(-1, true).line;\n\t return line;\n\t }", "function visualLine(line) {\n\t var merged;\n\t while (merged = collapsedSpanAtStart(line))\n\t line = merged.find(-1, true).line;\n\t return line;\n\t }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "getStraightLines() {\n\n let points = [];\n\n points.push(this.getLine(-1, 0));\n points.push(this.getLine(1, 0));\n points.push(this.getLine(0, -1));\n points.push(this.getLine(0, 1));\n\n return points;\n\n }", "function beforeLines(area) { return toLines(before(area)); }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\n var merged;\n\n while (merged = collapsedSpanAtStart(line)) {\n line = merged.find(-1, true).line;\n }\n\n return line;\n }", "function visualLine(line) {\r\n var merged;\r\n while (merged = collapsedSpanAtStart(line))\r\n line = merged.find(-1, true).line;\r\n return line;\r\n }", "function getLines(){\n\tlet lineClass = \"l\" + selCurve;\n\treturn document.getElementsByClassName(lineClass);\n}", "getLines({ start, end, strictIndexing } = { start: 0, end: -1, strictIndexing: true }) {\n const indexing = typeof strictIndexing === 'undefined' ? true : strictIndexing;\n return this.request(`${this.prefix}get_lines`, [\n start,\n end,\n indexing,\n ]);\n }", "function LineString(ls){\n\t\t\t\t// remove tail which should be the same as head\n\t\t\t\tvar reg = ls.slice(0, ls.length - 1);\n\t\t\t\treturn PolyBool.segments({ inverted: false, regions: [reg] });\n\t\t\t}", "function lineBefore(area) { return beforeLines(area).last(); }", "function getLineElementsAtPageOffset(offset) {\n\t\tconst lines = document.getElementsByClassName('code-line');\n\t\tconst position = offset - window.scrollY;\n\t\tlet previous = null;\n\t\tfor (const element of lines) {\n\t\t\tconst line = +element.getAttribute('data-line');\n\t\t\tif (isNaN(line)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst bounds = element.getBoundingClientRect();\n\t\t\tconst entry = { element, line };\n\t\t\tif (position < bounds.top) {\n\t\t\t\tif (previous && previous.fractional < 1) {\n\t\t\t\t\tprevious.line += previous.fractional;\n\t\t\t\t\treturn { previous };\n\t\t\t\t}\n\t\t\t\treturn { previous, next: entry };\n\t\t\t}\n\t\t\tentry.fractional = (position - bounds.top) / (bounds.height);\n\t\t\tprevious = entry;\n\t\t}\n\t\treturn { previous };\n\t}", "setLineCoordinates() {\n if (this.shown) {\n //if not self link && not linker modified pep\n if (!this.crosslink.isSelfLink() && this.crosslink.toProtein) {\n let x, y;\n const source = this.renderedFromProtein.getRenderedInteractor();\n const target = this.renderedToProtein.getRenderedInteractor();\n if (!source.ix || !source.iy) {\n console.log(\"NOT\");\n }\n // from end\n if (source.type === \"group\" || !source.expanded) {\n x = source.ix;\n y = source.iy;\n } else {\n const coord = this.getResidueCoordinates(this.crosslink.fromResidue, this.renderedFromProtein);\n x = coord[0];\n y = coord[1];\n }\n this.line.setAttribute(\"x1\", x);\n this.line.setAttribute(\"y1\", y);\n this.highlightLine.setAttribute(\"x1\", x);\n this.highlightLine.setAttribute(\"y1\", y);\n\n // to end\n if (target.type === \"group\" || !target.expanded) {\n x = target.ix;\n y = target.iy;\n } else {\n const coord = this.getResidueCoordinates(this.crosslink.toResidue, this.renderedToProtein);\n x = coord[0];\n y = coord[1];\n }\n this.line.setAttribute(\"x2\", x);\n this.line.setAttribute(\"y2\", y);\n this.highlightLine.setAttribute(\"x2\", x);\n this.highlightLine.setAttribute(\"y2\", y);\n\n }\n }\n }" ]
[ "0.6936979", "0.6631404", "0.65844053", "0.65823203", "0.65823203", "0.65823203", "0.65823203", "0.65823203", "0.65823203", "0.65823203", "0.6580827", "0.6580827", "0.6580827", "0.6562891", "0.65574646", "0.6548238", "0.6548238", "0.6512879", "0.6512879", "0.6512879", "0.6512879", "0.6512879", "0.6512879", "0.6512879", "0.6512879", "0.6512879", "0.6512879", "0.6512879", "0.59177226", "0.59136206", "0.58994675", "0.5883115", "0.585426", "0.5821036", "0.5795795", "0.5795795", "0.5791646", "0.5791646", "0.5791646", "0.5791646", "0.5791646", "0.5791646", "0.5791646", "0.5791646", "0.5791646", "0.5791646", "0.5791646", "0.57852936", "0.57852936", "0.57852936", "0.57697064", "0.57697064", "0.57697064", "0.57697064", "0.57697064", "0.57697064", "0.57697064", "0.57697064", "0.57697064", "0.57697064", "0.57697064", "0.57697064", "0.57697064", "0.57697064", "0.57697064", "0.57697064", "0.57697064", "0.5752585", "0.5733082", "0.57209504", "0.57209504", "0.57209504", "0.57209504", "0.57209504", "0.57209504", "0.57209504", "0.5696246", "0.56861156", "0.5659008", "0.5625417", "0.5610336", "0.55303603", "0.5526715", "0.5525488" ]
0.6574651
25
Get the line number of the start of the visual line that the given line number is part of.
function visualLineNo(doc, lineN) { var line = getLine(doc, lineN), vis = visualLine(line); if (line == vis) { return lineN } return lineNo(vis) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN),\n vis = visualLine(line);\n\n if (line == vis) {\n return lineN;\n }\n\n return lineNo(vis);\n } // Get the line number of the start of the next visual line after", "function visualLineNo(doc, lineN) {\n\t\t var line = getLine(doc, lineN), vis = visualLine(line);\n\t\t if (line == vis) { return lineN }\n\t\t return lineNo(vis)\n\t\t }", "function visualLineNo(doc, lineN) {\n\t\t var line = getLine(doc, lineN), vis = visualLine(line);\n\t\t if (line == vis) return lineN;\n\t\t return lineNo(vis);\n\t\t }", "function visualLineNo(doc, lineN) {\n\t var line = getLine(doc, lineN), vis = visualLine(line);\n\t if (line == vis) return lineN;\n\t return lineNo(vis);\n\t }", "function visualLineNo(doc, lineN) {\n\t var line = getLine(doc, lineN), vis = visualLine(line);\n\t if (line == vis) return lineN;\n\t return lineNo(vis);\n\t }", "function visualLineNo(doc, lineN) {\n\t var line = getLine(doc, lineN), vis = visualLine(line);\n\t if (line == vis) return lineN;\n\t return lineNo(vis);\n\t }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) return lineN;\n return lineNo(vis);\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) return lineN;\n return lineNo(vis);\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) return lineN;\n return lineNo(vis);\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) return lineN;\n return lineNo(vis);\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) return lineN;\n return lineNo(vis);\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) return lineN;\n return lineNo(vis);\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) return lineN;\n return lineNo(vis);\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line)\n if (line == vis) { return lineN }\n return lineNo(vis)\n}", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line)\n if (line == vis) { return lineN }\n return lineNo(vis)\n}", "function visualLineNo(doc, lineN) {\r\n var line = getLine(doc, lineN), vis = visualLine(line);\r\n if (line == vis) return lineN;\r\n return lineNo(vis);\r\n }", "function visualLineNo(doc, lineN) {\r\n var line = getLine(doc, lineN), vis = visualLine(line);\r\n if (line == vis) { return lineN }\r\n return lineNo(vis)\r\n}", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n}", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n}", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n}", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n}", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n}", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n}", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n}", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n}", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n}", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n}", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n}", "function getVisibleLine(editor) {\n if (!editor.visibleRanges.length) {\n return undefined;\n }\n const firstVisiblePosition = editor.visibleRanges[0].start;\n const lineNumber = firstVisiblePosition.line;\n const line = editor.document.lineAt(lineNumber);\n const progress = firstVisiblePosition.character / (line.text.length + 2);\n return lineNumber + progress;\n}", "_getStartRefLineNumber(referenceNumber) {\n var refRef = PassageMarkdown.START_REF_PREFIX + referenceNumber;\n var ref = this.refs[refRef];\n\n if (!ref) {\n return null;\n }\n\n var $ref = $$1(ReactDOM$c.findDOMNode(ref)); // We really care about the first text after the ref, not the\n // ref element itself:\n\n var $refText = $ref.next();\n\n if ($refText.length === 0) {\n // But if there are no elements after the ref, just\n // use the ref itself.\n $refText = $ref;\n }\n\n var vPos = $refText.offset().top;\n return this.state.startLineNumbersAfter + 1 + this._convertPosToLineNumber(vPos);\n }", "function find_start_line() {\n // TODO:\n return 0\n}", "line(n) {\n if (n < 1 || n > this.lines)\n throw new RangeError(`Invalid line number ${n} in ${this.lines}-line document`);\n return this.lineInner(n, true, 1, 0);\n }", "function getTopVisibleLine(editor) {\n if (!editor[\"visibleRanges\"].length) {\n return undefined;\n }\n const firstVisiblePosition = editor[\"visibleRanges\"][0].start;\n const lineNumber = firstVisiblePosition.line;\n const line = editor.document.lineAt(lineNumber);\n const progress = firstVisiblePosition.character / (line.text.length + 2);\n return lineNumber + progress;\n}", "function visualLine(line) {\n\t var merged;\n\t while (merged = collapsedSpanAtStart(line))\n\t line = merged.find(-1, true).line;\n\t return line;\n\t }", "function visualLine(line) {\n\t var merged;\n\t while (merged = collapsedSpanAtStart(line))\n\t line = merged.find(-1, true).line;\n\t return line;\n\t }", "function visualLine(line) {\n\t var merged;\n\t while (merged = collapsedSpanAtStart(line))\n\t line = merged.find(-1, true).line;\n\t return line;\n\t }", "function visualLine(line) {\n\t\t var merged;\n\t\t while (merged = collapsedSpanAtStart(line))\n\t\t line = merged.find(-1, true).line;\n\t\t return line;\n\t\t }", "function visualLine(line) {\n\t\t var merged;\n\t\t while (merged = collapsedSpanAtStart(line))\n\t\t { line = merged.find(-1, true).line; }\n\t\t return line\n\t\t }", "function code_line(code, line) {\n return code.findIndex(l => l.line === line)\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\r\n var merged;\r\n while (merged = collapsedSpanAtStart(line))\r\n line = merged.find(-1, true).line;\r\n return line;\r\n }", "getPrecedingValidLine(model, lineNumber, indentRulesSupport) {\r\n let languageID = model.getLanguageIdAtPosition(lineNumber, 0);\r\n if (lineNumber > 1) {\r\n let lastLineNumber;\r\n let resultLineNumber = -1;\r\n for (lastLineNumber = lineNumber - 1; lastLineNumber >= 1; lastLineNumber--) {\r\n if (model.getLanguageIdAtPosition(lastLineNumber, 0) !== languageID) {\r\n return resultLineNumber;\r\n }\r\n let text = model.getLineContent(lastLineNumber);\r\n if (indentRulesSupport.shouldIgnore(text) || /^\\s+$/.test(text) || text === '') {\r\n resultLineNumber = lastLineNumber;\r\n continue;\r\n }\r\n return lastLineNumber;\r\n }\r\n }\r\n return -1;\r\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\r\n var merged;\r\n while (merged = collapsedSpanAtStart(line))\r\n { line = merged.find(-1, true).line; }\r\n return line\r\n}", "function visualLine(line) {\n var merged;\n\n while (merged = collapsedSpanAtStart(line)) {\n line = merged.find(-1, true).line;\n }\n\n return line;\n }", "calculateLineIndex(startPosition){\n\t\tthis.lineIndex = startPosition + this.top;\n\t\tthis.lineCount = Math.ceil((this.title.length +this.value.length + this.titleSpacing) / process.stdout.columns);\n\t\treturn this.lineIndex + this.lineCount+ this.bottom;\n\t}", "calculateLineIndex(startPosition){\n\t\tthis.lineIndex = startPosition + this.top;\n\t\tthis.lineCount = Math.ceil((this.title.length +this.value.length + this.titleSpacing) / process.stdout.columns);\n\t\treturn this.lineIndex + this.lineCount+ this.bottom;\n\t}", "function lineStart(area) {\n area.pos = area.pos || pos(area);\n return pos - linePos(area);\n }", "function findStartLine(cm, n) {\n var minindent, minline, doc = cm.view.doc;\n for (var search = n, lim = n - 100; search > lim; --search) {\n if (search == 0) return 0;\n var line = getLine(doc, search-1);\n if (line.stateAfter) return search;\n var indented = countColumn(line.text, null, cm.options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline;\n }", "function findStartLine(cm, n) {\n var minindent, minline, doc = cm.view.doc;\n for (var search = n, lim = n - 100; search > lim; --search) {\n if (search == 0) return 0;\n var line = getLine(doc, search-1);\n if (line.stateAfter) return search;\n var indented = countColumn(line.text, null, cm.options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline;\n }", "function findStartLine(cm, n) {\n var minindent, minline, doc = cm.view.doc;\n for (var search = n, lim = n - 100; search > lim; --search) {\n if (search == 0) return 0;\n var line = getLine(doc, search-1);\n if (line.stateAfter) return search;\n var indented = countColumn(line.text, null, cm.options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline;\n }", "getRealCurrentLineNb() {\n return this.currentLineNb + this.offset;\n }", "getLineAfterViewZone() {\n // TODO: abstract away the data, ids etc.\n const range = this.data.model.getDecorationRange(this.data.startEditDecId);\n // if the first decoration is missing, this implies the region reaches the\n // start of the editor.\n return range ? range.endLineNumber + 1 : 1;\n }", "function getLineNumber(pos, el){\n if (pos == null)\n return -1;\n //console.log(caretPos);\n\n var curr_line = 0;\n var text = \"\";\n if (el != undefined){\n text = el.value;\n }\n\n //go through, checking for a newline, adding one for each\n for (var i = 0; i < pos; i++){\n if (text[i] === \"\\n\"){\n curr_line++;\n }\n }\n return curr_line;\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}" ]
[ "0.7972053", "0.74883324", "0.7423042", "0.74064523", "0.74064523", "0.74064523", "0.7404007", "0.7404007", "0.7404007", "0.7404007", "0.7404007", "0.7404007", "0.7404007", "0.7374401", "0.7374401", "0.7371742", "0.73660076", "0.7365024", "0.7365024", "0.7365024", "0.7365024", "0.7365024", "0.7365024", "0.7365024", "0.7365024", "0.7365024", "0.7365024", "0.7365024", "0.72396016", "0.70150703", "0.686439", "0.6840555", "0.67876965", "0.6784028", "0.6784028", "0.6784028", "0.6772905", "0.6755163", "0.67036694", "0.66939944", "0.66939944", "0.66939944", "0.66939944", "0.66939944", "0.66939944", "0.66939944", "0.6674227", "0.66621804", "0.663841", "0.663841", "0.663841", "0.663841", "0.663841", "0.663841", "0.663841", "0.663841", "0.663841", "0.663841", "0.663841", "0.663841", "0.663841", "0.663841", "0.663841", "0.663841", "0.663841", "0.66338", "0.6629915", "0.660226", "0.660226", "0.6602259", "0.6594825", "0.6594825", "0.6594825", "0.6579004", "0.6577844", "0.65456873", "0.65423447", "0.65423447", "0.65423447", "0.65423447", "0.65423447", "0.65423447", "0.65423447", "0.65423447" ]
0.74559826
18
Get the line number of the start of the next visual line after the given line.
function visualLineEndNo(doc, lineN) { if (lineN > doc.lastLine()) { return lineN } var line = getLine(doc, lineN), merged; if (!lineIsHidden(doc, line)) { return lineN } while (merged = collapsedSpanAtEnd(line)) { line = merged.find(1, true).line; } return lineNo(line) + 1 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN),\n vis = visualLine(line);\n\n if (line == vis) {\n return lineN;\n }\n\n return lineNo(vis);\n } // Get the line number of the start of the next visual line after", "function nextLine() {\n\t\t_this._compConst('LINE', _this.currentLine+1);\n\t\treturn lines[_this.currentLine++];\n\t}", "function visualLine(line) {\n\t\t var merged;\n\t\t while (merged = collapsedSpanAtStart(line))\n\t\t line = merged.find(-1, true).line;\n\t\t return line;\n\t\t }", "function visualLine(line) {\n\t\t var merged;\n\t\t while (merged = collapsedSpanAtStart(line))\n\t\t { line = merged.find(-1, true).line; }\n\t\t return line\n\t\t }", "function visualLineContinued(line) {\n var merged, lines;\n\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line;\n (lines || (lines = [])).push(line);\n }\n\n return lines;\n } // Get the line number of the start of the visual line that the", "function getVisibleLine(editor) {\n if (!editor.visibleRanges.length) {\n return undefined;\n }\n const firstVisiblePosition = editor.visibleRanges[0].start;\n const lineNumber = firstVisiblePosition.line;\n const line = editor.document.lineAt(lineNumber);\n const progress = firstVisiblePosition.character / (line.text.length + 2);\n return lineNumber + progress;\n}", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }", "function visualLine(line) {\n\t var merged;\n\t while (merged = collapsedSpanAtStart(line))\n\t line = merged.find(-1, true).line;\n\t return line;\n\t }", "function visualLine(line) {\n\t var merged;\n\t while (merged = collapsedSpanAtStart(line))\n\t line = merged.find(-1, true).line;\n\t return line;\n\t }", "function visualLine(line) {\n\t var merged;\n\t while (merged = collapsedSpanAtStart(line))\n\t line = merged.find(-1, true).line;\n\t return line;\n\t }", "function visualLineEndNo(doc, lineN) {\n if (lineN > doc.lastLine()) return lineN;\n var line = getLine(doc, lineN), merged;\n if (!lineIsHidden(doc, line)) return lineN;\n while (merged = collapsedSpanAtEnd(line))\n line = merged.find(1, true).line;\n return lineNo(line) + 1;\n }", "function visualLineEndNo(doc, lineN) {\n if (lineN > doc.lastLine()) return lineN;\n var line = getLine(doc, lineN), merged;\n if (!lineIsHidden(doc, line)) return lineN;\n while (merged = collapsedSpanAtEnd(line))\n line = merged.find(1, true).line;\n return lineNo(line) + 1;\n }", "function visualLineEndNo(doc, lineN) {\n if (lineN > doc.lastLine()) return lineN;\n var line = getLine(doc, lineN), merged;\n if (!lineIsHidden(doc, line)) return lineN;\n while (merged = collapsedSpanAtEnd(line))\n line = merged.find(1, true).line;\n return lineNo(line) + 1;\n }", "function visualLineEndNo(doc, lineN) {\n if (lineN > doc.lastLine()) return lineN;\n var line = getLine(doc, lineN), merged;\n if (!lineIsHidden(doc, line)) return lineN;\n while (merged = collapsedSpanAtEnd(line))\n line = merged.find(1, true).line;\n return lineNo(line) + 1;\n }", "function visualLineEndNo(doc, lineN) {\n if (lineN > doc.lastLine()) return lineN;\n var line = getLine(doc, lineN), merged;\n if (!lineIsHidden(doc, line)) return lineN;\n while (merged = collapsedSpanAtEnd(line))\n line = merged.find(1, true).line;\n return lineNo(line) + 1;\n }", "function visualLineEndNo(doc, lineN) {\n if (lineN > doc.lastLine()) return lineN;\n var line = getLine(doc, lineN), merged;\n if (!lineIsHidden(doc, line)) return lineN;\n while (merged = collapsedSpanAtEnd(line))\n line = merged.find(1, true).line;\n return lineNo(line) + 1;\n }", "function visualLineEndNo(doc, lineN) {\n if (lineN > doc.lastLine()) return lineN;\n var line = getLine(doc, lineN), merged;\n if (!lineIsHidden(doc, line)) return lineN;\n while (merged = collapsedSpanAtEnd(line))\n line = merged.find(1, true).line;\n return lineNo(line) + 1;\n }", "function visualLineNo(doc, lineN) {\n\t\t var line = getLine(doc, lineN), vis = visualLine(line);\n\t\t if (line == vis) { return lineN }\n\t\t return lineNo(vis)\n\t\t }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\r\n var merged;\r\n while (merged = collapsedSpanAtStart(line))\r\n { line = merged.find(-1, true).line; }\r\n return line\r\n}", "function visualLine(line) {\n var merged;\n\n while (merged = collapsedSpanAtStart(line)) {\n line = merged.find(-1, true).line;\n }\n\n return line;\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) return lineN;\n return lineNo(vis);\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) return lineN;\n return lineNo(vis);\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) return lineN;\n return lineNo(vis);\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) return lineN;\n return lineNo(vis);\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) return lineN;\n return lineNo(vis);\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) return lineN;\n return lineNo(vis);\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) return lineN;\n return lineNo(vis);\n }", "function visualLine(line) {\r\n var merged;\r\n while (merged = collapsedSpanAtStart(line))\r\n line = merged.find(-1, true).line;\r\n return line;\r\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line)\n if (line == vis) { return lineN }\n return lineNo(vis)\n}", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line)\n if (line == vis) { return lineN }\n return lineNo(vis)\n}", "function visualLineNo(doc, lineN) {\n\t\t var line = getLine(doc, lineN), vis = visualLine(line);\n\t\t if (line == vis) return lineN;\n\t\t return lineNo(vis);\n\t\t }", "function visualLineEndNo(doc, lineN) {\r\n if (lineN > doc.lastLine()) return lineN;\r\n var line = getLine(doc, lineN), merged;\r\n if (!lineIsHidden(doc, line)) return lineN;\r\n while (merged = collapsedSpanAtEnd(line))\r\n line = merged.find(1, true).line;\r\n return lineNo(line) + 1;\r\n }", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n}", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n}", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n}", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n}", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n}", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n}", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n}", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n}", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n}", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n}", "function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n}", "function visualLineEndNo(doc, lineN) {\n if (lineN > doc.lastLine()) { return lineN }\n var line = getLine(doc, lineN), merged;\n if (!lineIsHidden(doc, line)) { return lineN }\n while (merged = collapsedSpanAtEnd(line))\n { line = merged.find(1, true).line; }\n return lineNo(line) + 1\n}" ]
[ "0.79053533", "0.73212373", "0.70655745", "0.7048663", "0.70483404", "0.704656", "0.70358926", "0.70358926", "0.70358926", "0.70358926", "0.70358926", "0.70358926", "0.70358926", "0.70358926", "0.70358926", "0.70358926", "0.70358926", "0.70358926", "0.70358926", "0.70358926", "0.70358926", "0.70358926", "0.70358926", "0.7033989", "0.7033989", "0.7033989", "0.70311517", "0.70311517", "0.70311517", "0.70311517", "0.70311517", "0.70311517", "0.70311517", "0.7020397", "0.7000473", "0.7000473", "0.7000473", "0.7000473", "0.7000473", "0.7000473", "0.7000473", "0.69920456", "0.69897825", "0.6985566", "0.6985566", "0.6985566", "0.6985566", "0.6985566", "0.6985566", "0.6985566", "0.6982312", "0.6974003", "0.6974003", "0.6974003", "0.6974003", "0.6974003", "0.6974003", "0.6974003", "0.6974003", "0.6974003", "0.6974003", "0.6974003", "0.6974003", "0.6974003", "0.6974003", "0.6974003", "0.6974003", "0.6974003", "0.6972056", "0.6972056", "0.696856", "0.69670045", "0.6962182", "0.6962182", "0.6962182", "0.6962182", "0.6962182", "0.6962182", "0.6962182", "0.6962182", "0.6962182", "0.6962182", "0.6962182", "0.69619524" ]
0.70266366
45
Compute whether a line is hidden. Lines count as hidden when they are part of a visual line that starts with another line, or when they are entirely covered by collapsed, nonwidget span.
function lineIsHidden(doc, line) { var sps = sawCollapsedSpans && line.markedSpans; if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) { sp = sps[i]; if (!sp.marker.collapsed) { continue } if (sp.from == null) { return true } if (sp.marker.widgetNode) { continue } if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp)) { return true } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) continue;\n if (sp.from == null) return true;\n if (sp.marker.widgetNode) continue;\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n return true;\n }\n }", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) continue;\n if (sp.from == null) return true;\n if (sp.marker.widgetNode) continue;\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n return true;\n }\n }", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) continue;\n if (sp.from == null) return true;\n if (sp.marker.widgetNode) continue;\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n return true;\n }\n }", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) continue;\n if (sp.from == null) return true;\n if (sp.marker.widgetNode) continue;\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n return true;\n }\n }", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) continue;\n if (sp.from == null) return true;\n if (sp.marker.widgetNode) continue;\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n return true;\n }\n }", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) continue;\n if (sp.from == null) return true;\n if (sp.marker.widgetNode) continue;\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n return true;\n }\n }", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) continue;\n if (sp.from == null) return true;\n if (sp.marker.widgetNode) continue;\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n return true;\n }\n }", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n\n if (sps) {\n for (var sp = void 0, i = 0; i < sps.length; ++i) {\n sp = sps[i];\n\n if (!sp.marker.collapsed) {\n continue;\n }\n\n if (sp.from == null) {\n return true;\n }\n\n if (sp.marker.widgetNode) {\n continue;\n }\n\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp)) {\n return true;\n }\n }\n }\n }", "function lineIsHidden(doc, line) {\r\n var sps = sawCollapsedSpans && line.markedSpans;\r\n if (sps) for (var sp, i = 0; i < sps.length; ++i) {\r\n sp = sps[i];\r\n if (!sp.marker.collapsed) continue;\r\n if (sp.from == null) return true;\r\n if (sp.marker.widgetNode) continue;\r\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\r\n return true;\r\n }\r\n }", "function lineIsHidden(doc, line) {\n\t var sps = sawCollapsedSpans && line.markedSpans;\n\t if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n\t sp = sps[i];\n\t if (!sp.marker.collapsed) continue;\n\t if (sp.from == null) return true;\n\t if (sp.marker.widgetNode) continue;\n\t if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n\t return true;\n\t }\n\t }", "function lineIsHidden(doc, line) {\n\t var sps = sawCollapsedSpans && line.markedSpans;\n\t if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n\t sp = sps[i];\n\t if (!sp.marker.collapsed) continue;\n\t if (sp.from == null) return true;\n\t if (sp.marker.widgetNode) continue;\n\t if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n\t return true;\n\t }\n\t }", "function lineIsHidden(doc, line) {\n\t var sps = sawCollapsedSpans && line.markedSpans;\n\t if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n\t sp = sps[i];\n\t if (!sp.marker.collapsed) continue;\n\t if (sp.from == null) return true;\n\t if (sp.marker.widgetNode) continue;\n\t if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n\t return true;\n\t }\n\t }", "function lineIsHidden(doc, line) {\n\t\t var sps = sawCollapsedSpans && line.markedSpans;\n\t\t if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n\t\t sp = sps[i];\n\t\t if (!sp.marker.collapsed) continue;\n\t\t if (sp.from == null) return true;\n\t\t if (sp.marker.widgetNode) continue;\n\t\t if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n\t\t return true;\n\t\t }\n\t\t }", "function lineIsHidden(doc, line) {\n\t\t var sps = sawCollapsedSpans && line.markedSpans;\n\t\t if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n\t\t sp = sps[i];\n\t\t if (!sp.marker.collapsed) { continue }\n\t\t if (sp.from == null) { return true }\n\t\t if (sp.marker.widgetNode) { continue }\n\t\t if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n\t\t { return true }\n\t\t } }\n\t\t }", "function lineIsHidden(doc, line) {\r\n var sps = sawCollapsedSpans && line.markedSpans;\r\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\r\n sp = sps[i];\r\n if (!sp.marker.collapsed) { continue }\r\n if (sp.from == null) { return true }\r\n if (sp.marker.widgetNode) { continue }\r\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\r\n { return true }\r\n } }\r\n}", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n if (sp.from == null) { return true }\n if (sp.marker.widgetNode) { continue }\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n { return true }\n } }\n}", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n if (sp.from == null) { return true }\n if (sp.marker.widgetNode) { continue }\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n { return true }\n } }\n}", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n if (sp.from == null) { return true }\n if (sp.marker.widgetNode) { continue }\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n { return true }\n } }\n}", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n if (sp.from == null) { return true }\n if (sp.marker.widgetNode) { continue }\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n { return true }\n } }\n}", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n if (sp.from == null) { return true }\n if (sp.marker.widgetNode) { continue }\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n { return true }\n } }\n}", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n if (sp.from == null) { return true }\n if (sp.marker.widgetNode) { continue }\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n { return true }\n } }\n}", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n if (sp.from == null) { return true }\n if (sp.marker.widgetNode) { continue }\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n { return true }\n } }\n}", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n if (sp.from == null) { return true }\n if (sp.marker.widgetNode) { continue }\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n { return true }\n } }\n}", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n if (sp.from == null) { return true }\n if (sp.marker.widgetNode) { continue }\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n { return true }\n } }\n}", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n if (sp.from == null) { return true }\n if (sp.marker.widgetNode) { continue }\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n { return true }\n } }\n}", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n if (sp.from == null) { return true }\n if (sp.marker.widgetNode) { continue }\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n { return true }\n } }\n}", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i]\n if (!sp.marker.collapsed) { continue }\n if (sp.from == null) { return true }\n if (sp.marker.widgetNode) { continue }\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n { return true }\n } }\n}", "function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i]\n if (!sp.marker.collapsed) { continue }\n if (sp.from == null) { return true }\n if (sp.marker.widgetNode) { continue }\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n { return true }\n } }\n}", "_calcVisibleLines() {\n this._lines.qtMaxVisible = Math.floor(this._matrixHeight / this._cell.heightMin);\n if (this._lines.qtMaxVisible > 3)\n this._lines.qtMinVisible = 3;\n else\n this._lines.qtMinVisible = 1;\n if (this._lines.qtMaxVisible > this._lines.qtTotal)\n this._lines.qtMaxVisible = this._lines.qtTotal;\n if (this._lines.qtMaxVisible < this._lines.qtVisible && this._lines.qtMaxVisible != 0)\n this._lines.qtVisible = this._lines.qtMaxVisible;\n }", "isHide() {\n return this.x < 0\n }", "function lineLabelsVisible() {\n return axesDef.y1.length > 1 &&\n (axesDef.y1.length < 15 || chart.hasHighlight()) &&\n c.w >= theme.minWidth;\n }", "function isRowHidden(row) {\n return _.get(row, '_ng_hidden_', false);\n }", "_shouldDisplayLine(line) {\r\n return line.length > 0 && !this._ignoredLine;\r\n }", "isPartiallyVisible() {\n\t\treturn !this.isVisible() && !this.isHidden();\n\t}", "isHidden() {\n return (this.flags & 0x08) !== 0;\n }", "isVisible() {\n\t\tlet y = this.getY();\n\t\treturn y >= -100 && y <= dh + 100;\n\t}", "function isHidden(el) {\n var style = window.getComputedStyle(el);\n return ((style.display === 'none') || (style.visibility === 'hidden'))\n}", "function shouldHide(data, collapsedSectorPaths) {\n var result = false;\n var hasCollapsedAncestor = areAncestorsCollapsed(data.sectorPath, collapsedSectorPaths);\n var isSummaryRow = !data.isDetail;\n var immediateSectorCollapsed = (collapsedSectorPaths[generateSectorKey(data.sectorPath)] != null);\n if (hasCollapsedAncestor)\n result = true;\n else if (immediateSectorCollapsed && !isSummaryRow)\n result = true;\n return result;\n}", "get verticalLineVisibility() {\r\n return this.i.pm;\r\n }", "function isHidden() {\n return scope[ngHideBinder];\n }", "function hiddenState(vis) {\n return vis === spin.PANEL_HIDDENLEFT ||\n vis === spin.PANEL_HIDDENRIGHT;\n }", "function visualLineContinued(line) {\n var merged, lines;\n\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line;\n (lines || (lines = [])).push(line);\n }\n\n return lines;\n } // Get the line number of the start of the visual line that the", "function isVisibleIndicator() {\n // visibleIndicator\n // if() return false\n // return true;\n }", "function isHidden(element) {\n let style = window.getComputedStyle(element);\n return ((style.display === \"none\") || (style.visibility === \"hidden\"))\n}", "function hidden(el) {\n return matchingAttr('hidden', '')(el) || el.style.display === 'none';\n }", "function isHidden($elem) {\n return $elem.hasAttribute(\"hidden\")\n || ($elem.hasAttribute(\"aria-hidden\") && $elem.getAttribute(\"aria-hidden\") !== \"false\")\n // A quick and dirty way to check whether the element is hidden.\n // For a more fine-grained check we could use \"window.getComputedStyle\" but we don't because of bad performance.\n // If the element has visibility set to \"hidden\" or \"collapse\", display set to \"none\" or opacity set to \"0\" through CSS\n // we won't be able to catch it here. We accept it due to the huge performance benefits.\n || $elem.style.display === `none`\n || $elem.style.opacity === `0`\n || $elem.style.visibility === `hidden`\n || $elem.style.visibility === `collapse`;\n}", "isVisible() {\n return this._visibility === 'visible';\n }", "function visualLine(line) {\n\t\t var merged;\n\t\t while (merged = collapsedSpanAtStart(line))\n\t\t { line = merged.find(-1, true).line; }\n\t\t return line\n\t\t }", "function visualLine(line) {\n\t\t var merged;\n\t\t while (merged = collapsedSpanAtStart(line))\n\t\t line = merged.find(-1, true).line;\n\t\t return line;\n\t\t }", "function isDottedSelectionHidden() {\n\t\treturn document.getElementById(this.id).style.visibility == \"hidden\";\n\t}", "function visible(e){return a.a.expr.filters.visible(e)&&!a()(e).parents().addBack().filter(function(){return\"hidden\"===a.a.css(this,\"visibility\")}).length}", "get horizontalLineVisibility() {\r\n return this.i.pl;\r\n }", "function isHidden(node) {\n return !node || node.offsetParent === null;\n}", "function isHidden(node) {\n return !node || node.offsetParent === null;\n}", "get isHide() {\n return this.isStage(STAGE.hidden);\n }", "get _isVisible() {\n return !this.panelElem.hasClass(\"hidden\");\n }", "isCollapsed(range) {\n var {\n anchor,\n focus\n } = range;\n return Point.equals(anchor, focus);\n }", "isCollapsed(range) {\n var {\n anchor,\n focus\n } = range;\n return Point.equals(anchor, focus);\n }", "function visualLineContinued(line) {\r\n var merged, lines;\r\n while (merged = collapsedSpanAtEnd(line)) {\r\n line = merged.find(1, true).line;\r\n (lines || (lines = [])).push(line);\r\n }\r\n return lines;\r\n }", "function shouldPreviewElemBeHidden($elem) {\n var thisVisibility = $elem.attr('data-visibility');\n var parentVisibility = $elem.attr('data-parent-visibility');\n return thisVisibility === 'hidden' || thisVisibility === 'unset' && parentVisibility === 'hidden';\n}", "function visualLineContinued(line) {\n\t\t var merged, lines;\n\t\t while (merged = collapsedSpanAtEnd(line)) {\n\t\t line = merged.find(1, true).line;\n\t\t (lines || (lines = [])).push(line);\n\t\t }\n\t\t return lines;\n\t\t }", "function visualLine(line) {\n\t var merged;\n\t while (merged = collapsedSpanAtStart(line))\n\t line = merged.find(-1, true).line;\n\t return line;\n\t }", "function visualLine(line) {\n\t var merged;\n\t while (merged = collapsedSpanAtStart(line))\n\t line = merged.find(-1, true).line;\n\t return line;\n\t }", "function visualLine(line) {\n\t var merged;\n\t while (merged = collapsedSpanAtStart(line))\n\t line = merged.find(-1, true).line;\n\t return line;\n\t }", "function visualLine(line) {\r\n var merged;\r\n while (merged = collapsedSpanAtStart(line))\r\n line = merged.find(-1, true).line;\r\n return line;\r\n }", "isVisible() {\n return this.editorNode.style.visibility == \"visible\";\n }", "function visualLineContinued(line) {\n\t\t var merged, lines;\n\t\t while (merged = collapsedSpanAtEnd(line)) {\n\t\t line = merged.find(1, true).line\n\t\t ;(lines || (lines = [])).push(line);\n\t\t }\n\t\t return lines\n\t\t }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }" ]
[ "0.85059273", "0.85059273", "0.85059273", "0.85059273", "0.85059273", "0.85059273", "0.85059273", "0.84759015", "0.84702784", "0.8453746", "0.8453746", "0.8453746", "0.844043", "0.8434365", "0.8428665", "0.8419037", "0.8419037", "0.8419037", "0.8419037", "0.8419037", "0.8419037", "0.8419037", "0.8419037", "0.8419037", "0.8419037", "0.8419037", "0.8416682", "0.8416682", "0.6538724", "0.63973355", "0.6386199", "0.6376875", "0.63310844", "0.6273804", "0.62113374", "0.60725945", "0.6028971", "0.59937125", "0.5993698", "0.5943847", "0.59345376", "0.59154344", "0.5853602", "0.58209825", "0.5774228", "0.576676", "0.57309514", "0.5724938", "0.57103974", "0.5705331", "0.56973433", "0.5694223", "0.568495", "0.568495", "0.5678701", "0.56505275", "0.56451976", "0.56451976", "0.56413466", "0.56411034", "0.5639095", "0.5638782", "0.5638782", "0.5638782", "0.56324965", "0.56244755", "0.5617093", "0.561348", "0.561348", "0.561348", "0.561348", "0.561348", "0.561348", "0.561348", "0.5608961", "0.5608961", "0.5608961", "0.5608961", "0.5608961", "0.5608961", "0.5608961", "0.5608961", "0.5608961", "0.5608961" ]
0.85021085
21
Find the height above the given line.
function heightAtLine(lineObj) { lineObj = visualLine(lineObj); var h = 0, chunk = lineObj.parent; for (var i = 0; i < chunk.lines.length; ++i) { var line = chunk.lines[i]; if (line == lineObj) { break } else { h += line.height; } } for (var p = chunk.parent; p; chunk = p, p = chunk.parent) { for (var i$1 = 0; i$1 < p.children.length; ++i$1) { var cur = p.children[i$1]; if (cur == chunk) { break } else { h += cur.height; } } } return h }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function heightAtLine(lineObj) {\n\t\t lineObj = visualLine(lineObj);\n\t\t\n\t\t var h = 0, chunk = lineObj.parent;\n\t\t for (var i = 0; i < chunk.lines.length; ++i) {\n\t\t var line = chunk.lines[i];\n\t\t if (line == lineObj) break;\n\t\t else h += line.height;\n\t\t }\n\t\t for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n\t\t for (var i = 0; i < p.children.length; ++i) {\n\t\t var cur = p.children[i];\n\t\t if (cur == chunk) break;\n\t\t else h += cur.height;\n\t\t }\n\t\t }\n\t\t return h;\n\t\t }", "function heightAtLine(lineObj) {\n\t\t lineObj = visualLine(lineObj);\n\n\t\t var h = 0, chunk = lineObj.parent;\n\t\t for (var i = 0; i < chunk.lines.length; ++i) {\n\t\t var line = chunk.lines[i];\n\t\t if (line == lineObj) { break }\n\t\t else { h += line.height; }\n\t\t }\n\t\t for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n\t\t for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n\t\t var cur = p.children[i$1];\n\t\t if (cur == chunk) { break }\n\t\t else { h += cur.height; }\n\t\t }\n\t\t }\n\t\t return h\n\t\t }", "function heightAtLine(lineObj) {\n\t lineObj = visualLine(lineObj);\n\n\t var h = 0, chunk = lineObj.parent;\n\t for (var i = 0; i < chunk.lines.length; ++i) {\n\t var line = chunk.lines[i];\n\t if (line == lineObj) break;\n\t else h += line.height;\n\t }\n\t for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n\t for (var i = 0; i < p.children.length; ++i) {\n\t var cur = p.children[i];\n\t if (cur == chunk) break;\n\t else h += cur.height;\n\t }\n\t }\n\t return h;\n\t }", "function heightAtLine(lineObj) {\n\t lineObj = visualLine(lineObj);\n\n\t var h = 0, chunk = lineObj.parent;\n\t for (var i = 0; i < chunk.lines.length; ++i) {\n\t var line = chunk.lines[i];\n\t if (line == lineObj) break;\n\t else h += line.height;\n\t }\n\t for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n\t for (var i = 0; i < p.children.length; ++i) {\n\t var cur = p.children[i];\n\t if (cur == chunk) break;\n\t else h += cur.height;\n\t }\n\t }\n\t return h;\n\t }", "function heightAtLine(lineObj) {\n\t lineObj = visualLine(lineObj);\n\t\n\t var h = 0, chunk = lineObj.parent;\n\t for (var i = 0; i < chunk.lines.length; ++i) {\n\t var line = chunk.lines[i];\n\t if (line == lineObj) break;\n\t else h += line.height;\n\t }\n\t for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n\t for (var i = 0; i < p.children.length; ++i) {\n\t var cur = p.children[i];\n\t if (cur == chunk) break;\n\t else h += cur.height;\n\t }\n\t }\n\t return h;\n\t }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) break;\n else h += line.height;\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i = 0; i < p.children.length; ++i) {\n var cur = p.children[i];\n if (cur == chunk) break;\n else h += cur.height;\n }\n }\n return h;\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) break;\n else h += line.height;\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i = 0; i < p.children.length; ++i) {\n var cur = p.children[i];\n if (cur == chunk) break;\n else h += cur.height;\n }\n }\n return h;\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) break;\n else h += line.height;\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i = 0; i < p.children.length; ++i) {\n var cur = p.children[i];\n if (cur == chunk) break;\n else h += cur.height;\n }\n }\n return h;\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) break;\n else h += line.height;\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i = 0; i < p.children.length; ++i) {\n var cur = p.children[i];\n if (cur == chunk) break;\n else h += cur.height;\n }\n }\n return h;\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) break;\n else h += line.height;\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i = 0; i < p.children.length; ++i) {\n var cur = p.children[i];\n if (cur == chunk) break;\n else h += cur.height;\n }\n }\n return h;\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) break;\n else h += line.height;\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i = 0; i < p.children.length; ++i) {\n var cur = p.children[i];\n if (cur == chunk) break;\n else h += cur.height;\n }\n }\n return h;\n }", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) break;\n else h += line.height;\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i = 0; i < p.children.length; ++i) {\n var cur = p.children[i];\n if (cur == chunk) break;\n else h += cur.height;\n }\n }\n return h;\n }", "function heightAtLine(lineObj) {\r\n lineObj = visualLine(lineObj);\r\n\r\n var h = 0, chunk = lineObj.parent;\r\n for (var i = 0; i < chunk.lines.length; ++i) {\r\n var line = chunk.lines[i];\r\n if (line == lineObj) break;\r\n else h += line.height;\r\n }\r\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\r\n for (var i = 0; i < p.children.length; ++i) {\r\n var cur = p.children[i];\r\n if (cur == chunk) break;\r\n else h += cur.height;\r\n }\r\n }\r\n return h;\r\n }", "function heightAtLine(lineObj) {\r\n lineObj = visualLine(lineObj);\r\n\r\n var h = 0, chunk = lineObj.parent;\r\n for (var i = 0; i < chunk.lines.length; ++i) {\r\n var line = chunk.lines[i];\r\n if (line == lineObj) { break }\r\n else { h += line.height; }\r\n }\r\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\r\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\r\n var cur = p.children[i$1];\r\n if (cur == chunk) { break }\r\n else { h += cur.height; }\r\n }\r\n }\r\n return h\r\n}", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n}", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n}", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n}", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n}", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n}", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n}", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n}", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n}", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n}", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n}", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n}", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj)\n\n var h = 0, chunk = lineObj.parent\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i]\n if (line == lineObj) { break }\n else { h += line.height }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1]\n if (cur == chunk) { break }\n else { h += cur.height }\n }\n }\n return h\n}", "function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj)\n\n var h = 0, chunk = lineObj.parent\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i]\n if (line == lineObj) { break }\n else { h += line.height }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1]\n if (cur == chunk) { break }\n else { h += cur.height }\n }\n }\n return h\n}", "getYForLine(line) {\n const options = this.options;\n const spacing = options.spacing_between_lines_px;\n const headroom = options.space_above_staff_ln;\n\n const y = this.y + (line * spacing) + (headroom * spacing);\n\n return y;\n }", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n\n if (diff) {\n for (var n = line; n; n = n.parent) {\n n.height += diff;\n }\n }\n } // Given a line object, find its line number by walking up through", "function updateLineHeight(line, height) {\n\t\t var diff = height - line.height;\n\t\t if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n\t\t }", "function updateLineHeight(line, height) {\n\t\t var diff = height - line.height;\n\t\t if (diff) for (var n = line; n; n = n.parent) n.height += diff;\n\t\t }", "function getLineHeight(elem) {\n var lh = computeStyle(elem, 'line-height');\n if (lh == 'normal') {\n // Normal line heights vary from browser to browser. The spec recommends\n // a value between 1.0 and 1.2 of the font size. Using 1.1 to split the diff.\n lh = parseInt(computeStyle(elem, 'font-size')) * 1.2;\n }\n return parseInt(lh);\n }", "function getLineHeight(elem) {\n var lh = computeStyle(elem, 'line-height');\n if (lh == 'normal') {\n // Normal line heights vary from browser to browser. The spec recommends\n // a value between 1.0 and 1.2 of the font size. Using 1.1 to split the diff.\n lh = parseInt(computeStyle(elem, 'font-size'), 10) * 1.2;\n }\n return parseInt(lh, 10);\n }", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n }", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n }", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n }", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n }", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n }", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n }", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n }", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n }", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n }", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n }", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n }", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n }", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n }", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n }", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n }", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n }", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n }", "function getLineHeight(elem) {\n var lh = computeStyle(elem, 'line-height');\n if (lh == 'normal') {\n // Normal line heights vary from browser to browser. The spec recommends\n // a value between 1.0 and 1.2 of the font size. Using 1.1 to split the diff.\n lh = parseInt(computeStyle(elem, 'font-size')) * 1.2;\n }\n return parseInt(lh);\n }", "function updateLineHeight(line, height) {\r\n var diff = height - line.height;\r\n if (diff) for (var n = line; n; n = n.parent) n.height += diff;\r\n }", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) for (var n = line; n; n = n.parent) n.height += diff;\n }", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) for (var n = line; n; n = n.parent) n.height += diff;\n }", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) for (var n = line; n; n = n.parent) n.height += diff;\n }", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) for (var n = line; n; n = n.parent) n.height += diff;\n }", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) for (var n = line; n; n = n.parent) n.height += diff;\n }", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) for (var n = line; n; n = n.parent) n.height += diff;\n }", "function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) for (var n = line; n; n = n.parent) n.height += diff;\n }", "function updateLineHeight(line, height) {\n\t var diff = height - line.height;\n\t if (diff) for (var n = line; n; n = n.parent) n.height += diff;\n\t }", "function updateLineHeight(line, height) {\n\t var diff = height - line.height;\n\t if (diff) for (var n = line; n; n = n.parent) n.height += diff;\n\t }", "function updateLineHeight(line, height) {\n\t var diff = height - line.height;\n\t if (diff) for (var n = line; n; n = n.parent) n.height += diff;\n\t }", "function lineAtHeight(chunk, h) {\n\t\t var n = chunk.first;\n\t\t outer: do {\n\t\t for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n\t\t var child = chunk.children[i$1], ch = child.height;\n\t\t if (h < ch) { chunk = child; continue outer }\n\t\t h -= ch;\n\t\t n += child.chunkSize();\n\t\t }\n\t\t return n\n\t\t } while (!chunk.lines)\n\t\t var i = 0;\n\t\t for (; i < chunk.lines.length; ++i) {\n\t\t var line = chunk.lines[i], lh = line.height;\n\t\t if (h < lh) { break }\n\t\t h -= lh;\n\t\t }\n\t\t return n + i\n\t\t }", "function updateLineHeight(line, height) {\r\n var diff = height - line.height;\r\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\r\n}", "function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height;\n if (h < ch) { chunk = child; continue outer }\n h -= ch;\n n += child.chunkSize();\n }\n return n\n } while (!chunk.lines)\n var i = 0;\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) { break }\n h -= lh;\n }\n return n + i\n }", "function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height;\n if (h < ch) { chunk = child; continue outer }\n h -= ch;\n n += child.chunkSize();\n }\n return n\n } while (!chunk.lines)\n var i = 0;\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) { break }\n h -= lh;\n }\n return n + i\n }", "function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height;\n if (h < ch) { chunk = child; continue outer }\n h -= ch;\n n += child.chunkSize();\n }\n return n\n } while (!chunk.lines)\n var i = 0;\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) { break }\n h -= lh;\n }\n return n + i\n }", "function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height;\n if (h < ch) { chunk = child; continue outer }\n h -= ch;\n n += child.chunkSize();\n }\n return n\n } while (!chunk.lines)\n var i = 0;\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) { break }\n h -= lh;\n }\n return n + i\n }", "function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height;\n if (h < ch) { chunk = child; continue outer }\n h -= ch;\n n += child.chunkSize();\n }\n return n\n } while (!chunk.lines)\n var i = 0;\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) { break }\n h -= lh;\n }\n return n + i\n }", "function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height;\n if (h < ch) { chunk = child; continue outer }\n h -= ch;\n n += child.chunkSize();\n }\n return n\n } while (!chunk.lines)\n var i = 0;\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) { break }\n h -= lh;\n }\n return n + i\n }", "function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height;\n if (h < ch) { chunk = child; continue outer }\n h -= ch;\n n += child.chunkSize();\n }\n return n\n } while (!chunk.lines)\n var i = 0;\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) { break }\n h -= lh;\n }\n return n + i\n }", "function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height;\n if (h < ch) { chunk = child; continue outer }\n h -= ch;\n n += child.chunkSize();\n }\n return n\n } while (!chunk.lines)\n var i = 0;\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) { break }\n h -= lh;\n }\n return n + i\n }", "function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height;\n if (h < ch) { chunk = child; continue outer }\n h -= ch;\n n += child.chunkSize();\n }\n return n\n } while (!chunk.lines)\n var i = 0;\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) { break }\n h -= lh;\n }\n return n + i\n }", "function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height;\n if (h < ch) { chunk = child; continue outer }\n h -= ch;\n n += child.chunkSize();\n }\n return n\n } while (!chunk.lines)\n var i = 0;\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) { break }\n h -= lh;\n }\n return n + i\n }", "function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height;\n if (h < ch) { chunk = child; continue outer }\n h -= ch;\n n += child.chunkSize();\n }\n return n\n } while (!chunk.lines)\n var i = 0;\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) { break }\n h -= lh;\n }\n return n + i\n }", "function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height;\n if (h < ch) { chunk = child; continue outer }\n h -= ch;\n n += child.chunkSize();\n }\n return n\n } while (!chunk.lines)\n var i = 0;\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) { break }\n h -= lh;\n }\n return n + i\n }", "function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height;\n if (h < ch) { chunk = child; continue outer }\n h -= ch;\n n += child.chunkSize();\n }\n return n\n } while (!chunk.lines)\n var i = 0;\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) { break }\n h -= lh;\n }\n return n + i\n }", "function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height;\n if (h < ch) { chunk = child; continue outer }\n h -= ch;\n n += child.chunkSize();\n }\n return n\n } while (!chunk.lines)\n var i = 0;\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) { break }\n h -= lh;\n }\n return n + i\n }", "function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height;\n if (h < ch) { chunk = child; continue outer }\n h -= ch;\n n += child.chunkSize();\n }\n return n\n } while (!chunk.lines)\n var i = 0;\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) { break }\n h -= lh;\n }\n return n + i\n }", "function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height;\n if (h < ch) { chunk = child; continue outer }\n h -= ch;\n n += child.chunkSize();\n }\n return n\n } while (!chunk.lines)\n var i = 0;\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) { break }\n h -= lh;\n }\n return n + i\n }", "function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height;\n if (h < ch) { chunk = child; continue outer }\n h -= ch;\n n += child.chunkSize();\n }\n return n\n } while (!chunk.lines)\n var i = 0;\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) { break }\n h -= lh;\n }\n return n + i\n }", "function lineHeight(){\n\t\thistoryLine.each(function(index, element){\n\t\t\tif(index == $('.line').length - 1){\n\t\t\t\treturn false;\n\t\t\t} else{\n\t\t\t\tvar thisBlock = $(this).closest('.history-item').height()/2;\n\t\t\t\tvar nextBlock = $(this).closest('.history-item').next().height()/2;\n\t\t\t\tvar h = thisBlock+nextBlock;\n\t\t\t\t$(this).height(h);\n\t\t\t}\n\t\t\t\n\t\t})\n\t}", "function updateLineHeight(line, height) {\n var diff = height - line.height\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff } }\n}", "function updateLineHeight(line, height) {\n var diff = height - line.height\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff } }\n}" ]
[ "0.7672805", "0.7669036", "0.7598157", "0.7598157", "0.759206", "0.7560561", "0.7560561", "0.7560561", "0.7560561", "0.7560561", "0.7560561", "0.7560561", "0.75525343", "0.7474777", "0.746032", "0.746032", "0.746032", "0.746032", "0.746032", "0.746032", "0.746032", "0.746032", "0.746032", "0.746032", "0.746032", "0.74551326", "0.74551326", "0.7411553", "0.7076512", "0.65905035", "0.65748185", "0.6568772", "0.65638417", "0.6559213", "0.6559213", "0.6559213", "0.6559213", "0.6559213", "0.6559213", "0.6559213", "0.6559213", "0.6559213", "0.6559213", "0.6559213", "0.6559213", "0.6559213", "0.6559213", "0.6559213", "0.6559213", "0.6559213", "0.6557111", "0.65540534", "0.65534943", "0.65534943", "0.65534943", "0.65534943", "0.65534943", "0.65534943", "0.65534943", "0.6536946", "0.6536946", "0.6536946", "0.6531552", "0.6522814", "0.6521187", "0.6521187", "0.6521187", "0.6521187", "0.6521187", "0.6521187", "0.6521187", "0.6521187", "0.6521187", "0.6521187", "0.6521187", "0.6521187", "0.6521187", "0.6521187", "0.6521187", "0.6521187", "0.6521187", "0.6510843", "0.65082526", "0.65082526" ]
0.7555887
27