{"version":3,"file":"myassays-layout-editor.iife.js","sources":["../../../src/myassays-global/HistoryManager.js","../../../src/myassays-global/Model.js","../../../node_modules/webidl-conversions/lib/index.js","../../../node_modules/jsdom/lib/jsdom/living/generated/utils.js","../../../node_modules/jsdom/lib/jsdom/living/helpers/namespaces.js","../../../node_modules/jsdom/lib/jsdom/living/nodes/HTMLCollection-impl.js","../../../node_modules/jsdom/lib/jsdom/living/generated/HTMLCollection.js","../__vite-browser-external","../../../node_modules/whatwg-url/lib/utils.js","../../../node_modules/punycode/punycode.es6.js","../../../node_modules/tr46/lib/regexes.js","../../../node_modules/tr46/lib/statusMapping.js","../../../node_modules/tr46/index.js","../../../node_modules/whatwg-url/lib/infra.js","../../../node_modules/whatwg-url/lib/encoding.js","../../../node_modules/whatwg-url/lib/percent-encoding.js","../../../node_modules/whatwg-url/lib/url-state-machine.js","../../../node_modules/whatwg-url/lib/urlencoded.js","../../../node_modules/whatwg-url/lib/Function.js","../../../node_modules/whatwg-url/lib/URLSearchParams-impl.js","../../../node_modules/whatwg-url/lib/URLSearchParams.js","../../../node_modules/whatwg-url/lib/URL-impl.js","../../../node_modules/whatwg-url/lib/URL.js","../../../node_modules/whatwg-url/webidl2js-wrapper.js","../../../node_modules/whatwg-url/index.js","../../../node_modules/symbol-tree/lib/SymbolTreeNode.js","../../../node_modules/symbol-tree/lib/TreePosition.js","../../../node_modules/symbol-tree/lib/TreeIterator.js","../../../node_modules/symbol-tree/lib/SymbolTree.js","../../../node_modules/jsdom/lib/jsdom/living/helpers/internal-constants.js","../__vite-optional-peer-dep:canvas:jsdom","../../../node_modules/jsdom/lib/jsdom/utils.js","../../../src/myassays-global/Utils.js","../model/MainState.js","../model/FillSettings.js","../model/Cell.js","../views/FillSettingsView.js","../myassays-layout-editor.css?raw","../media/icons.getbootstrap.com/eraser.cursor.svg?raw","../media/icons.getbootstrap.com/paint-bucket.cursor.svg?raw","../media/flag.svg?raw","../media/handle-corner.svg?raw","../views/AlertView.js","../MyassaysLayoutEditor.js","../index.js"],"sourcesContent":["\nexport default class HistoryManager extends EventTarget {\n constructor() {\n super();\n\n this.length = 0;\n this.index = 0;\n this.history = [];\n this.currentTransaction = null;\n }\n\n startTransaction() {\n this.currentTransaction = [];\n }\n\n addChange(before, after) {\n if (this.currentTransaction) {\n this.currentTransaction.push({\n before: before,\n after: after\n });\n }\n }\n\n endTransaction() {\n if (this.currentTransaction) {\n this.history = this.history.slice(0, this.index).concat([this.currentTransaction]);\n this.length = this.index = this.history.length;\n this.dispatchChangeEvent();\n this.currentTransaction = null;\n }\n }\n\n dispatchChangeEvent() {\n this.dispatchEvent(new Event(HistoryManager.EVENT_HISTORY_CHANGE));\n }\n\n undo() {\n const index = this.index - 1;\n if (index >= 0) {\n this.index = index;\n // delay change event to allow undo to happen\n setTimeout(() => {\n this.dispatchChangeEvent();\n }, 1);\n return this.history[index].slice().reverse();\n } else {\n return null;\n }\n }\n\n redo() {\n if (this.index < this.length) {\n this.index++;\n // delay change event to allow undo to happen\n setTimeout(() => {\n this.dispatchChangeEvent();\n }, 1);\n return this.history[this.index-1];\n } else {\n return null;\n }\n }\n\n canUndo() {\n return this.index > 0;\n }\n\n canRedo() {\n return this.index < this.length;\n }\n\n static EVENT_HISTORY_CHANGE = \"history_change\";\n}\n","\nfunction cloneValue(value) {\n if (value instanceof Model) {\n return value.attributes;\n } else if (value instanceof Array) {\n return value.map(cloneValue);\n } else if (value instanceof Object) {\n const returnValue = {};\n Object.keys(value).forEach(key => {\n returnValue[key] = cloneValue(value[key]);\n });\n return returnValue;\n } else {\n return value;\n }\n}\n\nexport default class Model extends EventTarget {\n constructor(initialAttributes = {}) {\n super();\n this._previousAttributes = {};\n this._attributes = {...this.constructor.defaults, ...initialAttributes};\n }\n\n set(newAttributes, noTrigger = false) {\n this._previousAttributes = {...this._attributes};\n const previousAttributes = {...this._attributes};\n Object.keys(newAttributes).forEach(key => {\n const newAttribute = newAttributes[key];\n if (this._attributes[key] instanceof Model) {\n if (newAttribute instanceof Model) {\n this._attributes[key] = newAttribute;\n } else {\n this._attributes[key].set(newAttribute);\n }\n } else {\n this._attributes[key] = newAttribute;\n }\n });\n\n if (!noTrigger) {\n const evt = new Event('change');\n const attributes = this._attributes;\n evt.data = {\n attributes,\n previousAttributes,\n hasChanged: (attributeName, handler) => {\n const prevValue = previousAttributes[attributeName];\n const newValue = attributes[attributeName];\n const changed = newValue !== prevValue;\n changed && handler && handler(newValue, prevValue);\n return changed;\n },\n }\n this.dispatchEvent(evt);\n }\n noTrigger || Object.keys(this._attributes).forEach(key => {\n const previousValue = previousAttributes[key];\n const newValue = this._attributes[key];\n if (previousValue !== newValue) {\n const evt = new Event(`change:${key}`);\n evt.data = {\n previousValue: cloneValue(previousValue),\n newValue: cloneValue(newValue),\n }\n this.dispatchEvent(evt);\n }\n });\n }\n\n getExact(attributeName) {\n return this._attributes[attributeName];\n }\n\n get(attributeName) {\n const value = this._attributes[attributeName];\n if (value instanceof Model) {\n return value;\n } else {\n return cloneValue(value);\n }\n }\n\n reset() {\n this._previousAttributes = {};\n this._attributes = {...this.constructor.defaults};\n }\n\n hasChanged(attributeName, handler) {\n const prevValue = this._previousAttributes[attributeName];\n const newValue = this._attributes[attributeName];\n const changed = newValue !== prevValue;\n changed && handler && handler(newValue, prevValue);\n return changed;\n }\n\n set attributes(value) {\n this._attributes = {...value};\n }\n\n get attributes() {\n return cloneValue(this._attributes);\n }\n\n get previousAttributes() {\n return cloneValue(this._previousAttributes);\n }\n\n static defaults = {};\n}\n","\"use strict\";\n\nfunction makeException(ErrorType, message, options) {\n if (options.globals) {\n ErrorType = options.globals[ErrorType.name];\n }\n return new ErrorType(`${options.context ? options.context : \"Value\"} ${message}.`);\n}\n\nfunction toNumber(value, options) {\n if (typeof value === \"bigint\") {\n throw makeException(TypeError, \"is a BigInt which cannot be converted to a number\", options);\n }\n if (!options.globals) {\n return Number(value);\n }\n return options.globals.Number(value);\n}\n\n// Round x to the nearest integer, choosing the even integer if it lies halfway between two.\nfunction evenRound(x) {\n // There are four cases for numbers with fractional part being .5:\n //\n // case | x | floor(x) | round(x) | expected | x <> 0 | x % 1 | x & 1 | example\n // 1 | 2n + 0.5 | 2n | 2n + 1 | 2n | > | 0.5 | 0 | 0.5 -> 0\n // 2 | 2n + 1.5 | 2n + 1 | 2n + 2 | 2n + 2 | > | 0.5 | 1 | 1.5 -> 2\n // 3 | -2n - 0.5 | -2n - 1 | -2n | -2n | < | -0.5 | 0 | -0.5 -> 0\n // 4 | -2n - 1.5 | -2n - 2 | -2n - 1 | -2n - 2 | < | -0.5 | 1 | -1.5 -> -2\n // (where n is a non-negative integer)\n //\n // Branch here for cases 1 and 4\n if ((x > 0 && (x % 1) === +0.5 && (x & 1) === 0) ||\n (x < 0 && (x % 1) === -0.5 && (x & 1) === 1)) {\n return censorNegativeZero(Math.floor(x));\n }\n\n return censorNegativeZero(Math.round(x));\n}\n\nfunction integerPart(n) {\n return censorNegativeZero(Math.trunc(n));\n}\n\nfunction sign(x) {\n return x < 0 ? -1 : 1;\n}\n\nfunction modulo(x, y) {\n // https://tc39.github.io/ecma262/#eqn-modulo\n // Note that http://stackoverflow.com/a/4467559/3191 does NOT work for large modulos\n const signMightNotMatch = x % y;\n if (sign(y) !== sign(signMightNotMatch)) {\n return signMightNotMatch + y;\n }\n return signMightNotMatch;\n}\n\nfunction censorNegativeZero(x) {\n return x === 0 ? 0 : x;\n}\n\nfunction createIntegerConversion(bitLength, { unsigned }) {\n let lowerBound, upperBound;\n if (unsigned) {\n lowerBound = 0;\n upperBound = 2 ** bitLength - 1;\n } else {\n lowerBound = -(2 ** (bitLength - 1));\n upperBound = 2 ** (bitLength - 1) - 1;\n }\n\n const twoToTheBitLength = 2 ** bitLength;\n const twoToOneLessThanTheBitLength = 2 ** (bitLength - 1);\n\n return (value, options = {}) => {\n let x = toNumber(value, options);\n x = censorNegativeZero(x);\n\n if (options.enforceRange) {\n if (!Number.isFinite(x)) {\n throw makeException(TypeError, \"is not a finite number\", options);\n }\n\n x = integerPart(x);\n\n if (x < lowerBound || x > upperBound) {\n throw makeException(\n TypeError,\n `is outside the accepted range of ${lowerBound} to ${upperBound}, inclusive`,\n options\n );\n }\n\n return x;\n }\n\n if (!Number.isNaN(x) && options.clamp) {\n x = Math.min(Math.max(x, lowerBound), upperBound);\n x = evenRound(x);\n return x;\n }\n\n if (!Number.isFinite(x) || x === 0) {\n return 0;\n }\n x = integerPart(x);\n\n // Math.pow(2, 64) is not accurately representable in JavaScript, so try to avoid these per-spec operations if\n // possible. Hopefully it's an optimization for the non-64-bitLength cases too.\n if (x >= lowerBound && x <= upperBound) {\n return x;\n }\n\n // These will not work great for bitLength of 64, but oh well. See the README for more details.\n x = modulo(x, twoToTheBitLength);\n if (!unsigned && x >= twoToOneLessThanTheBitLength) {\n return x - twoToTheBitLength;\n }\n return x;\n };\n}\n\nfunction createLongLongConversion(bitLength, { unsigned }) {\n const upperBound = Number.MAX_SAFE_INTEGER;\n const lowerBound = unsigned ? 0 : Number.MIN_SAFE_INTEGER;\n const asBigIntN = unsigned ? BigInt.asUintN : BigInt.asIntN;\n\n return (value, options = {}) => {\n let x = toNumber(value, options);\n x = censorNegativeZero(x);\n\n if (options.enforceRange) {\n if (!Number.isFinite(x)) {\n throw makeException(TypeError, \"is not a finite number\", options);\n }\n\n x = integerPart(x);\n\n if (x < lowerBound || x > upperBound) {\n throw makeException(\n TypeError,\n `is outside the accepted range of ${lowerBound} to ${upperBound}, inclusive`,\n options\n );\n }\n\n return x;\n }\n\n if (!Number.isNaN(x) && options.clamp) {\n x = Math.min(Math.max(x, lowerBound), upperBound);\n x = evenRound(x);\n return x;\n }\n\n if (!Number.isFinite(x) || x === 0) {\n return 0;\n }\n\n let xBigInt = BigInt(integerPart(x));\n xBigInt = asBigIntN(bitLength, xBigInt);\n return Number(xBigInt);\n };\n}\n\nexports.any = value => {\n return value;\n};\n\nexports.undefined = () => {\n return undefined;\n};\n\nexports.boolean = value => {\n return Boolean(value);\n};\n\nexports.byte = createIntegerConversion(8, { unsigned: false });\nexports.octet = createIntegerConversion(8, { unsigned: true });\n\nexports.short = createIntegerConversion(16, { unsigned: false });\nexports[\"unsigned short\"] = createIntegerConversion(16, { unsigned: true });\n\nexports.long = createIntegerConversion(32, { unsigned: false });\nexports[\"unsigned long\"] = createIntegerConversion(32, { unsigned: true });\n\nexports[\"long long\"] = createLongLongConversion(64, { unsigned: false });\nexports[\"unsigned long long\"] = createLongLongConversion(64, { unsigned: true });\n\nexports.double = (value, options = {}) => {\n const x = toNumber(value, options);\n\n if (!Number.isFinite(x)) {\n throw makeException(TypeError, \"is not a finite floating-point value\", options);\n }\n\n return x;\n};\n\nexports[\"unrestricted double\"] = (value, options = {}) => {\n const x = toNumber(value, options);\n\n return x;\n};\n\nexports.float = (value, options = {}) => {\n const x = toNumber(value, options);\n\n if (!Number.isFinite(x)) {\n throw makeException(TypeError, \"is not a finite floating-point value\", options);\n }\n\n if (Object.is(x, -0)) {\n return x;\n }\n\n const y = Math.fround(x);\n\n if (!Number.isFinite(y)) {\n throw makeException(TypeError, \"is outside the range of a single-precision floating-point value\", options);\n }\n\n return y;\n};\n\nexports[\"unrestricted float\"] = (value, options = {}) => {\n const x = toNumber(value, options);\n\n if (isNaN(x)) {\n return x;\n }\n\n if (Object.is(x, -0)) {\n return x;\n }\n\n return Math.fround(x);\n};\n\nexports.DOMString = (value, options = {}) => {\n if (options.treatNullAsEmptyString && value === null) {\n return \"\";\n }\n\n if (typeof value === \"symbol\") {\n throw makeException(TypeError, \"is a symbol, which cannot be converted to a string\", options);\n }\n\n const StringCtor = options.globals ? options.globals.String : String;\n return StringCtor(value);\n};\n\nexports.ByteString = (value, options = {}) => {\n const x = exports.DOMString(value, options);\n let c;\n for (let i = 0; (c = x.codePointAt(i)) !== undefined; ++i) {\n if (c > 255) {\n throw makeException(TypeError, \"is not a valid ByteString\", options);\n }\n }\n\n return x;\n};\n\nexports.USVString = (value, options = {}) => {\n const S = exports.DOMString(value, options);\n const n = S.length;\n const U = [];\n for (let i = 0; i < n; ++i) {\n const c = S.charCodeAt(i);\n if (c < 0xD800 || c > 0xDFFF) {\n U.push(String.fromCodePoint(c));\n } else if (0xDC00 <= c && c <= 0xDFFF) {\n U.push(String.fromCodePoint(0xFFFD));\n } else if (i === n - 1) {\n U.push(String.fromCodePoint(0xFFFD));\n } else {\n const d = S.charCodeAt(i + 1);\n if (0xDC00 <= d && d <= 0xDFFF) {\n const a = c & 0x3FF;\n const b = d & 0x3FF;\n U.push(String.fromCodePoint((2 << 15) + ((2 << 9) * a) + b));\n ++i;\n } else {\n U.push(String.fromCodePoint(0xFFFD));\n }\n }\n }\n\n return U.join(\"\");\n};\n\nexports.object = (value, options = {}) => {\n if (value === null || (typeof value !== \"object\" && typeof value !== \"function\")) {\n throw makeException(TypeError, \"is not an object\", options);\n }\n\n return value;\n};\n\nconst abByteLengthGetter =\n Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, \"byteLength\").get;\nconst sabByteLengthGetter =\n typeof SharedArrayBuffer === \"function\" ?\n Object.getOwnPropertyDescriptor(SharedArrayBuffer.prototype, \"byteLength\").get :\n null;\n\nfunction isNonSharedArrayBuffer(value) {\n try {\n // This will throw on SharedArrayBuffers, but not detached ArrayBuffers.\n // (The spec says it should throw, but the spec conflicts with implementations: https://github.com/tc39/ecma262/issues/678)\n abByteLengthGetter.call(value);\n\n return true;\n } catch {\n return false;\n }\n}\n\nfunction isSharedArrayBuffer(value) {\n try {\n sabByteLengthGetter.call(value);\n return true;\n } catch {\n return false;\n }\n}\n\nfunction isArrayBufferDetached(value) {\n try {\n // eslint-disable-next-line no-new\n new Uint8Array(value);\n return false;\n } catch {\n return true;\n }\n}\n\nexports.ArrayBuffer = (value, options = {}) => {\n if (!isNonSharedArrayBuffer(value)) {\n if (options.allowShared && !isSharedArrayBuffer(value)) {\n throw makeException(TypeError, \"is not an ArrayBuffer or SharedArrayBuffer\", options);\n }\n throw makeException(TypeError, \"is not an ArrayBuffer\", options);\n }\n if (isArrayBufferDetached(value)) {\n throw makeException(TypeError, \"is a detached ArrayBuffer\", options);\n }\n\n return value;\n};\n\nconst dvByteLengthGetter =\n Object.getOwnPropertyDescriptor(DataView.prototype, \"byteLength\").get;\nexports.DataView = (value, options = {}) => {\n try {\n dvByteLengthGetter.call(value);\n } catch (e) {\n throw makeException(TypeError, \"is not a DataView\", options);\n }\n\n if (!options.allowShared && isSharedArrayBuffer(value.buffer)) {\n throw makeException(TypeError, \"is backed by a SharedArrayBuffer, which is not allowed\", options);\n }\n if (isArrayBufferDetached(value.buffer)) {\n throw makeException(TypeError, \"is backed by a detached ArrayBuffer\", options);\n }\n\n return value;\n};\n\n// Returns the unforgeable `TypedArray` constructor name or `undefined`,\n// if the `this` value isn't a valid `TypedArray` object.\n//\n// https://tc39.es/ecma262/#sec-get-%typedarray%.prototype-@@tostringtag\nconst typedArrayNameGetter = Object.getOwnPropertyDescriptor(\n Object.getPrototypeOf(Uint8Array).prototype,\n Symbol.toStringTag\n).get;\n[\n Int8Array,\n Int16Array,\n Int32Array,\n Uint8Array,\n Uint16Array,\n Uint32Array,\n Uint8ClampedArray,\n Float32Array,\n Float64Array\n].forEach(func => {\n const { name } = func;\n const article = /^[AEIOU]/u.test(name) ? \"an\" : \"a\";\n exports[name] = (value, options = {}) => {\n if (!ArrayBuffer.isView(value) || typedArrayNameGetter.call(value) !== name) {\n throw makeException(TypeError, `is not ${article} ${name} object`, options);\n }\n if (!options.allowShared && isSharedArrayBuffer(value.buffer)) {\n throw makeException(TypeError, \"is a view on a SharedArrayBuffer, which is not allowed\", options);\n }\n if (isArrayBufferDetached(value.buffer)) {\n throw makeException(TypeError, \"is a view on a detached ArrayBuffer\", options);\n }\n\n return value;\n };\n});\n\n// Common definitions\n\nexports.ArrayBufferView = (value, options = {}) => {\n if (!ArrayBuffer.isView(value)) {\n throw makeException(TypeError, \"is not a view on an ArrayBuffer or SharedArrayBuffer\", options);\n }\n\n if (!options.allowShared && isSharedArrayBuffer(value.buffer)) {\n throw makeException(TypeError, \"is a view on a SharedArrayBuffer, which is not allowed\", options);\n }\n\n if (isArrayBufferDetached(value.buffer)) {\n throw makeException(TypeError, \"is a view on a detached ArrayBuffer\", options);\n }\n return value;\n};\n\nexports.BufferSource = (value, options = {}) => {\n if (ArrayBuffer.isView(value)) {\n if (!options.allowShared && isSharedArrayBuffer(value.buffer)) {\n throw makeException(TypeError, \"is a view on a SharedArrayBuffer, which is not allowed\", options);\n }\n\n if (isArrayBufferDetached(value.buffer)) {\n throw makeException(TypeError, \"is a view on a detached ArrayBuffer\", options);\n }\n return value;\n }\n\n if (!options.allowShared && !isNonSharedArrayBuffer(value)) {\n throw makeException(TypeError, \"is not an ArrayBuffer or a view on one\", options);\n }\n if (options.allowShared && !isSharedArrayBuffer(value) && !isNonSharedArrayBuffer(value)) {\n throw makeException(TypeError, \"is not an ArrayBuffer, SharedArrayBuffer, or a view on one\", options);\n }\n if (isArrayBufferDetached(value)) {\n throw makeException(TypeError, \"is a detached ArrayBuffer\", options);\n }\n\n return value;\n};\n\nexports.DOMTimeStamp = exports[\"unsigned long long\"];\n","\"use strict\";\n\n// Returns \"Type(value) is Object\" in ES terminology.\nfunction isObject(value) {\n return (typeof value === \"object\" && value !== null) || typeof value === \"function\";\n}\n\nconst hasOwn = Function.prototype.call.bind(Object.prototype.hasOwnProperty);\n\n// Like `Object.assign`, but using `[[GetOwnProperty]]` and `[[DefineOwnProperty]]`\n// instead of `[[Get]]` and `[[Set]]` and only allowing objects\nfunction define(target, source) {\n for (const key of Reflect.ownKeys(source)) {\n const descriptor = Reflect.getOwnPropertyDescriptor(source, key);\n if (descriptor && !Reflect.defineProperty(target, key, descriptor)) {\n throw new TypeError(`Cannot redefine property: ${String(key)}`);\n }\n }\n}\n\nfunction newObjectInRealm(globalObject, object) {\n const ctorRegistry = initCtorRegistry(globalObject);\n return Object.defineProperties(\n Object.create(ctorRegistry[\"%Object.prototype%\"]),\n Object.getOwnPropertyDescriptors(object)\n );\n}\n\nconst wrapperSymbol = Symbol(\"wrapper\");\nconst implSymbol = Symbol(\"impl\");\nconst sameObjectCaches = Symbol(\"SameObject caches\");\nconst ctorRegistrySymbol = Symbol.for(\"[webidl2js] constructor registry\");\n\nconst AsyncIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf(async function* () {}).prototype);\n\nfunction initCtorRegistry(globalObject) {\n if (hasOwn(globalObject, ctorRegistrySymbol)) {\n return globalObject[ctorRegistrySymbol];\n }\n\n const ctorRegistry = Object.create(null);\n\n // In addition to registering all the WebIDL2JS-generated types in the constructor registry,\n // we also register a few intrinsics that we make use of in generated code, since they are not\n // easy to grab from the globalObject variable.\n ctorRegistry[\"%Object.prototype%\"] = globalObject.Object.prototype;\n ctorRegistry[\"%IteratorPrototype%\"] = Object.getPrototypeOf(\n Object.getPrototypeOf(new globalObject.Array()[Symbol.iterator]())\n );\n\n try {\n ctorRegistry[\"%AsyncIteratorPrototype%\"] = Object.getPrototypeOf(\n Object.getPrototypeOf(\n globalObject.eval(\"(async function* () {})\").prototype\n )\n );\n } catch {\n ctorRegistry[\"%AsyncIteratorPrototype%\"] = AsyncIteratorPrototype;\n }\n\n globalObject[ctorRegistrySymbol] = ctorRegistry;\n return ctorRegistry;\n}\n\nfunction getSameObject(wrapper, prop, creator) {\n if (!wrapper[sameObjectCaches]) {\n wrapper[sameObjectCaches] = Object.create(null);\n }\n\n if (prop in wrapper[sameObjectCaches]) {\n return wrapper[sameObjectCaches][prop];\n }\n\n wrapper[sameObjectCaches][prop] = creator();\n return wrapper[sameObjectCaches][prop];\n}\n\nfunction wrapperForImpl(impl) {\n return impl ? impl[wrapperSymbol] : null;\n}\n\nfunction implForWrapper(wrapper) {\n return wrapper ? wrapper[implSymbol] : null;\n}\n\nfunction tryWrapperForImpl(impl) {\n const wrapper = wrapperForImpl(impl);\n return wrapper ? wrapper : impl;\n}\n\nfunction tryImplForWrapper(wrapper) {\n const impl = implForWrapper(wrapper);\n return impl ? impl : wrapper;\n}\n\nconst iterInternalSymbol = Symbol(\"internal\");\n\nfunction isArrayIndexPropName(P) {\n if (typeof P !== \"string\") {\n return false;\n }\n const i = P >>> 0;\n if (i === 2 ** 32 - 1) {\n return false;\n }\n const s = `${i}`;\n if (P !== s) {\n return false;\n }\n return true;\n}\n\nconst byteLengthGetter =\n Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, \"byteLength\").get;\nfunction isArrayBuffer(value) {\n try {\n byteLengthGetter.call(value);\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction iteratorResult([key, value], kind) {\n let result;\n switch (kind) {\n case \"key\":\n result = key;\n break;\n case \"value\":\n result = value;\n break;\n case \"key+value\":\n result = [key, value];\n break;\n }\n return { value: result, done: false };\n}\n\nconst supportsPropertyIndex = Symbol(\"supports property index\");\nconst supportedPropertyIndices = Symbol(\"supported property indices\");\nconst supportsPropertyName = Symbol(\"supports property name\");\nconst supportedPropertyNames = Symbol(\"supported property names\");\nconst indexedGet = Symbol(\"indexed property get\");\nconst indexedSetNew = Symbol(\"indexed property set new\");\nconst indexedSetExisting = Symbol(\"indexed property set existing\");\nconst namedGet = Symbol(\"named property get\");\nconst namedSetNew = Symbol(\"named property set new\");\nconst namedSetExisting = Symbol(\"named property set existing\");\nconst namedDelete = Symbol(\"named property delete\");\n\nconst asyncIteratorNext = Symbol(\"async iterator get the next iteration result\");\nconst asyncIteratorReturn = Symbol(\"async iterator return steps\");\nconst asyncIteratorInit = Symbol(\"async iterator initialization steps\");\nconst asyncIteratorEOI = Symbol(\"async iterator end of iteration\");\n\nmodule.exports = exports = {\n isObject,\n hasOwn,\n define,\n newObjectInRealm,\n wrapperSymbol,\n implSymbol,\n getSameObject,\n ctorRegistrySymbol,\n initCtorRegistry,\n wrapperForImpl,\n implForWrapper,\n tryWrapperForImpl,\n tryImplForWrapper,\n iterInternalSymbol,\n isArrayBuffer,\n isArrayIndexPropName,\n supportsPropertyIndex,\n supportedPropertyIndices,\n supportsPropertyName,\n supportedPropertyNames,\n indexedGet,\n indexedSetNew,\n indexedSetExisting,\n namedGet,\n namedSetNew,\n namedSetExisting,\n namedDelete,\n asyncIteratorNext,\n asyncIteratorReturn,\n asyncIteratorInit,\n asyncIteratorEOI,\n iteratorResult\n};\n","\"use strict\";\n\n// https://infra.spec.whatwg.org/#namespaces\n\nexports.HTML_NS = \"http://www.w3.org/1999/xhtml\";\n\nexports.MATHML_NS = \"http://www.w3.org/1998/Math/MathML\";\n\nexports.SVG_NS = \"http://www.w3.org/2000/svg\";\n\nexports.XLINK_NS = \"http://www.w3.org/1999/xlink\";\n\nexports.XML_NS = \"http://www.w3.org/XML/1998/namespace\";\n\nexports.XMLNS_NS = \"http://www.w3.org/2000/xmlns/\";\n","\"use strict\";\n\nconst idlUtils = require(\"../generated/utils.js\");\nconst { HTML_NS } = require(\"../helpers/namespaces\");\n\nexports.implementation = class HTMLCollectionImpl {\n constructor(globalObject, args, privateData) {\n this._list = [];\n this._version = -1;\n this._element = privateData.element;\n this._query = privateData.query;\n\n this._globalObject = globalObject;\n\n this._update();\n }\n get length() {\n this._update();\n return this._list.length;\n }\n item(index) {\n this._update();\n return this._list[index] || null;\n }\n namedItem(key) {\n if (key === \"\") {\n return null;\n }\n this._update();\n for (const element of this._list) {\n if (element.getAttributeNS(null, \"id\") === key) {\n return element;\n }\n if (element._namespaceURI === HTML_NS) {\n const name = element.getAttributeNS(null, \"name\");\n if (name === key) {\n return element;\n }\n }\n }\n return null;\n }\n _update() {\n if (this._version < this._element._version) {\n const snapshot = this._query();\n for (let i = 0; i < snapshot.length; i++) {\n this._list[i] = snapshot[i];\n }\n this._list.length = snapshot.length;\n this._version = this._element._version;\n }\n }\n get [idlUtils.supportedPropertyIndices]() {\n this._update();\n return this._list.keys();\n }\n get [idlUtils.supportedPropertyNames]() {\n this._update();\n const result = new Set();\n for (const element of this._list) {\n const id = element.getAttributeNS(null, \"id\");\n if (id) {\n result.add(id);\n }\n if (element._namespaceURI === HTML_NS) {\n const name = element.getAttributeNS(null, \"name\");\n if (name) {\n result.add(name);\n }\n }\n }\n return result;\n }\n\n // Inherit some useful functions from Array.\n [Symbol.iterator]() {\n this._update();\n return this._list[Symbol.iterator]();\n }\n entries() {\n this._update();\n return this._list.entries();\n }\n filter(...args) {\n this._update();\n return this._list.filter(...args);\n }\n map(...args) {\n this._update();\n return this._list.map(...args);\n }\n indexOf(...args) {\n this._update();\n return this._list.indexOf(...args);\n }\n};\n","\"use strict\";\n\nconst conversions = require(\"webidl-conversions\");\nconst utils = require(\"./utils.js\");\n\nconst implSymbol = utils.implSymbol;\nconst ctorRegistrySymbol = utils.ctorRegistrySymbol;\n\nconst interfaceName = \"HTMLCollection\";\n\nexports.is = value => {\n return utils.isObject(value) && utils.hasOwn(value, implSymbol) && value[implSymbol] instanceof Impl.implementation;\n};\nexports.isImpl = value => {\n return utils.isObject(value) && value instanceof Impl.implementation;\n};\nexports.convert = (globalObject, value, { context = \"The provided value\" } = {}) => {\n if (exports.is(value)) {\n return utils.implForWrapper(value);\n }\n throw new globalObject.TypeError(`${context} is not of type 'HTMLCollection'.`);\n};\n\nfunction makeWrapper(globalObject, newTarget) {\n let proto;\n if (newTarget !== undefined) {\n proto = newTarget.prototype;\n }\n\n if (!utils.isObject(proto)) {\n proto = globalObject[ctorRegistrySymbol][\"HTMLCollection\"].prototype;\n }\n\n return Object.create(proto);\n}\n\nfunction makeProxy(wrapper, globalObject) {\n let proxyHandler = proxyHandlerCache.get(globalObject);\n if (proxyHandler === undefined) {\n proxyHandler = new ProxyHandler(globalObject);\n proxyHandlerCache.set(globalObject, proxyHandler);\n }\n return new Proxy(wrapper, proxyHandler);\n}\n\nexports.create = (globalObject, constructorArgs, privateData) => {\n const wrapper = makeWrapper(globalObject);\n return exports.setup(wrapper, globalObject, constructorArgs, privateData);\n};\n\nexports.createImpl = (globalObject, constructorArgs, privateData) => {\n const wrapper = exports.create(globalObject, constructorArgs, privateData);\n return utils.implForWrapper(wrapper);\n};\n\nexports._internalSetup = (wrapper, globalObject) => {};\n\nexports.setup = (wrapper, globalObject, constructorArgs = [], privateData = {}) => {\n privateData.wrapper = wrapper;\n\n exports._internalSetup(wrapper, globalObject);\n Object.defineProperty(wrapper, implSymbol, {\n value: new Impl.implementation(globalObject, constructorArgs, privateData),\n configurable: true\n });\n\n wrapper = makeProxy(wrapper, globalObject);\n\n wrapper[implSymbol][utils.wrapperSymbol] = wrapper;\n if (Impl.init) {\n Impl.init(wrapper[implSymbol]);\n }\n return wrapper;\n};\n\nexports.new = (globalObject, newTarget) => {\n let wrapper = makeWrapper(globalObject, newTarget);\n\n exports._internalSetup(wrapper, globalObject);\n Object.defineProperty(wrapper, implSymbol, {\n value: Object.create(Impl.implementation.prototype),\n configurable: true\n });\n\n wrapper = makeProxy(wrapper, globalObject);\n\n wrapper[implSymbol][utils.wrapperSymbol] = wrapper;\n if (Impl.init) {\n Impl.init(wrapper[implSymbol]);\n }\n return wrapper[implSymbol];\n};\n\nconst exposed = new Set([\"Window\"]);\n\nexports.install = (globalObject, globalNames) => {\n if (!globalNames.some(globalName => exposed.has(globalName))) {\n return;\n }\n\n const ctorRegistry = utils.initCtorRegistry(globalObject);\n class HTMLCollection {\n constructor() {\n throw new globalObject.TypeError(\"Illegal constructor\");\n }\n\n item(index) {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'item' called on an object that is not a valid instance of HTMLCollection.\");\n }\n\n if (arguments.length < 1) {\n throw new globalObject.TypeError(\n `Failed to execute 'item' on 'HTMLCollection': 1 argument required, but only ${arguments.length} present.`\n );\n }\n const args = [];\n {\n let curArg = arguments[0];\n curArg = conversions[\"unsigned long\"](curArg, {\n context: \"Failed to execute 'item' on 'HTMLCollection': parameter 1\",\n globals: globalObject\n });\n args.push(curArg);\n }\n return utils.tryWrapperForImpl(esValue[implSymbol].item(...args));\n }\n\n namedItem(name) {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\n \"'namedItem' called on an object that is not a valid instance of HTMLCollection.\"\n );\n }\n\n if (arguments.length < 1) {\n throw new globalObject.TypeError(\n `Failed to execute 'namedItem' on 'HTMLCollection': 1 argument required, but only ${arguments.length} present.`\n );\n }\n const args = [];\n {\n let curArg = arguments[0];\n curArg = conversions[\"DOMString\"](curArg, {\n context: \"Failed to execute 'namedItem' on 'HTMLCollection': parameter 1\",\n globals: globalObject\n });\n args.push(curArg);\n }\n return utils.tryWrapperForImpl(esValue[implSymbol].namedItem(...args));\n }\n\n get length() {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\n \"'get length' called on an object that is not a valid instance of HTMLCollection.\"\n );\n }\n\n return esValue[implSymbol][\"length\"];\n }\n }\n Object.defineProperties(HTMLCollection.prototype, {\n item: { enumerable: true },\n namedItem: { enumerable: true },\n length: { enumerable: true },\n [Symbol.toStringTag]: { value: \"HTMLCollection\", configurable: true },\n [Symbol.iterator]: { value: globalObject.Array.prototype[Symbol.iterator], configurable: true, writable: true }\n });\n ctorRegistry[interfaceName] = HTMLCollection;\n\n Object.defineProperty(globalObject, interfaceName, {\n configurable: true,\n writable: true,\n value: HTMLCollection\n });\n};\n\nconst proxyHandlerCache = new WeakMap();\nclass ProxyHandler {\n constructor(globalObject) {\n this._globalObject = globalObject;\n }\n\n get(target, P, receiver) {\n if (typeof P === \"symbol\") {\n return Reflect.get(target, P, receiver);\n }\n const desc = this.getOwnPropertyDescriptor(target, P);\n if (desc === undefined) {\n const parent = Object.getPrototypeOf(target);\n if (parent === null) {\n return undefined;\n }\n return Reflect.get(target, P, receiver);\n }\n if (!desc.get && !desc.set) {\n return desc.value;\n }\n const getter = desc.get;\n if (getter === undefined) {\n return undefined;\n }\n return Reflect.apply(getter, receiver, []);\n }\n\n has(target, P) {\n if (typeof P === \"symbol\") {\n return Reflect.has(target, P);\n }\n const desc = this.getOwnPropertyDescriptor(target, P);\n if (desc !== undefined) {\n return true;\n }\n const parent = Object.getPrototypeOf(target);\n if (parent !== null) {\n return Reflect.has(parent, P);\n }\n return false;\n }\n\n ownKeys(target) {\n const keys = new Set();\n\n for (const key of target[implSymbol][utils.supportedPropertyIndices]) {\n keys.add(`${key}`);\n }\n\n for (const key of target[implSymbol][utils.supportedPropertyNames]) {\n if (!(key in target)) {\n keys.add(`${key}`);\n }\n }\n\n for (const key of Reflect.ownKeys(target)) {\n keys.add(key);\n }\n return [...keys];\n }\n\n getOwnPropertyDescriptor(target, P) {\n if (typeof P === \"symbol\") {\n return Reflect.getOwnPropertyDescriptor(target, P);\n }\n let ignoreNamedProps = false;\n\n if (utils.isArrayIndexPropName(P)) {\n const index = P >>> 0;\n const indexedValue = target[implSymbol].item(index);\n if (indexedValue !== null) {\n return {\n writable: false,\n enumerable: true,\n configurable: true,\n value: utils.tryWrapperForImpl(indexedValue)\n };\n }\n ignoreNamedProps = true;\n }\n\n const namedValue = target[implSymbol].namedItem(P);\n\n if (namedValue !== null && !(P in target) && !ignoreNamedProps) {\n return {\n writable: false,\n enumerable: false,\n configurable: true,\n value: utils.tryWrapperForImpl(namedValue)\n };\n }\n\n return Reflect.getOwnPropertyDescriptor(target, P);\n }\n\n set(target, P, V, receiver) {\n if (typeof P === \"symbol\") {\n return Reflect.set(target, P, V, receiver);\n }\n // The `receiver` argument refers to the Proxy exotic object or an object\n // that inherits from it, whereas `target` refers to the Proxy target:\n if (target[implSymbol][utils.wrapperSymbol] === receiver) {\n const globalObject = this._globalObject;\n }\n let ownDesc;\n\n if (utils.isArrayIndexPropName(P)) {\n const index = P >>> 0;\n const indexedValue = target[implSymbol].item(index);\n if (indexedValue !== null) {\n ownDesc = {\n writable: false,\n enumerable: true,\n configurable: true,\n value: utils.tryWrapperForImpl(indexedValue)\n };\n }\n }\n\n if (ownDesc === undefined) {\n ownDesc = Reflect.getOwnPropertyDescriptor(target, P);\n }\n if (ownDesc === undefined) {\n const parent = Reflect.getPrototypeOf(target);\n if (parent !== null) {\n return Reflect.set(parent, P, V, receiver);\n }\n ownDesc = { writable: true, enumerable: true, configurable: true, value: undefined };\n }\n if (!ownDesc.writable) {\n return false;\n }\n if (!utils.isObject(receiver)) {\n return false;\n }\n const existingDesc = Reflect.getOwnPropertyDescriptor(receiver, P);\n let valueDesc;\n if (existingDesc !== undefined) {\n if (existingDesc.get || existingDesc.set) {\n return false;\n }\n if (!existingDesc.writable) {\n return false;\n }\n valueDesc = { value: V };\n } else {\n valueDesc = { writable: true, enumerable: true, configurable: true, value: V };\n }\n return Reflect.defineProperty(receiver, P, valueDesc);\n }\n\n defineProperty(target, P, desc) {\n if (typeof P === \"symbol\") {\n return Reflect.defineProperty(target, P, desc);\n }\n\n const globalObject = this._globalObject;\n\n if (utils.isArrayIndexPropName(P)) {\n return false;\n }\n if (!utils.hasOwn(target, P)) {\n const creating = !(target[implSymbol].namedItem(P) !== null);\n if (!creating) {\n return false;\n }\n }\n return Reflect.defineProperty(target, P, desc);\n }\n\n deleteProperty(target, P) {\n if (typeof P === \"symbol\") {\n return Reflect.deleteProperty(target, P);\n }\n\n const globalObject = this._globalObject;\n\n if (utils.isArrayIndexPropName(P)) {\n const index = P >>> 0;\n return !(target[implSymbol].item(index) !== null);\n }\n\n if (target[implSymbol].namedItem(P) !== null && !(P in target)) {\n return false;\n }\n\n return Reflect.deleteProperty(target, P);\n }\n\n preventExtensions() {\n return false;\n }\n}\n\nconst Impl = require(\"../nodes/HTMLCollection-impl.js\");\n","export default {}","\"use strict\";\n\n// Returns \"Type(value) is Object\" in ES terminology.\nfunction isObject(value) {\n return (typeof value === \"object\" && value !== null) || typeof value === \"function\";\n}\n\nconst hasOwn = Function.prototype.call.bind(Object.prototype.hasOwnProperty);\n\n// Like `Object.assign`, but using `[[GetOwnProperty]]` and `[[DefineOwnProperty]]`\n// instead of `[[Get]]` and `[[Set]]` and only allowing objects\nfunction define(target, source) {\n for (const key of Reflect.ownKeys(source)) {\n const descriptor = Reflect.getOwnPropertyDescriptor(source, key);\n if (descriptor && !Reflect.defineProperty(target, key, descriptor)) {\n throw new TypeError(`Cannot redefine property: ${String(key)}`);\n }\n }\n}\n\nfunction newObjectInRealm(globalObject, object) {\n const ctorRegistry = initCtorRegistry(globalObject);\n return Object.defineProperties(\n Object.create(ctorRegistry[\"%Object.prototype%\"]),\n Object.getOwnPropertyDescriptors(object)\n );\n}\n\nconst wrapperSymbol = Symbol(\"wrapper\");\nconst implSymbol = Symbol(\"impl\");\nconst sameObjectCaches = Symbol(\"SameObject caches\");\nconst ctorRegistrySymbol = Symbol.for(\"[webidl2js] constructor registry\");\n\nconst AsyncIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf(async function* () {}).prototype);\n\nfunction initCtorRegistry(globalObject) {\n if (hasOwn(globalObject, ctorRegistrySymbol)) {\n return globalObject[ctorRegistrySymbol];\n }\n\n const ctorRegistry = Object.create(null);\n\n // In addition to registering all the WebIDL2JS-generated types in the constructor registry,\n // we also register a few intrinsics that we make use of in generated code, since they are not\n // easy to grab from the globalObject variable.\n ctorRegistry[\"%Object.prototype%\"] = globalObject.Object.prototype;\n ctorRegistry[\"%IteratorPrototype%\"] = Object.getPrototypeOf(\n Object.getPrototypeOf(new globalObject.Array()[Symbol.iterator]())\n );\n\n try {\n ctorRegistry[\"%AsyncIteratorPrototype%\"] = Object.getPrototypeOf(\n Object.getPrototypeOf(\n globalObject.eval(\"(async function* () {})\").prototype\n )\n );\n } catch {\n ctorRegistry[\"%AsyncIteratorPrototype%\"] = AsyncIteratorPrototype;\n }\n\n globalObject[ctorRegistrySymbol] = ctorRegistry;\n return ctorRegistry;\n}\n\nfunction getSameObject(wrapper, prop, creator) {\n if (!wrapper[sameObjectCaches]) {\n wrapper[sameObjectCaches] = Object.create(null);\n }\n\n if (prop in wrapper[sameObjectCaches]) {\n return wrapper[sameObjectCaches][prop];\n }\n\n wrapper[sameObjectCaches][prop] = creator();\n return wrapper[sameObjectCaches][prop];\n}\n\nfunction wrapperForImpl(impl) {\n return impl ? impl[wrapperSymbol] : null;\n}\n\nfunction implForWrapper(wrapper) {\n return wrapper ? wrapper[implSymbol] : null;\n}\n\nfunction tryWrapperForImpl(impl) {\n const wrapper = wrapperForImpl(impl);\n return wrapper ? wrapper : impl;\n}\n\nfunction tryImplForWrapper(wrapper) {\n const impl = implForWrapper(wrapper);\n return impl ? impl : wrapper;\n}\n\nconst iterInternalSymbol = Symbol(\"internal\");\n\nfunction isArrayIndexPropName(P) {\n if (typeof P !== \"string\") {\n return false;\n }\n const i = P >>> 0;\n if (i === 2 ** 32 - 1) {\n return false;\n }\n const s = `${i}`;\n if (P !== s) {\n return false;\n }\n return true;\n}\n\nconst byteLengthGetter =\n Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, \"byteLength\").get;\nfunction isArrayBuffer(value) {\n try {\n byteLengthGetter.call(value);\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction iteratorResult([key, value], kind) {\n let result;\n switch (kind) {\n case \"key\":\n result = key;\n break;\n case \"value\":\n result = value;\n break;\n case \"key+value\":\n result = [key, value];\n break;\n }\n return { value: result, done: false };\n}\n\nconst supportsPropertyIndex = Symbol(\"supports property index\");\nconst supportedPropertyIndices = Symbol(\"supported property indices\");\nconst supportsPropertyName = Symbol(\"supports property name\");\nconst supportedPropertyNames = Symbol(\"supported property names\");\nconst indexedGet = Symbol(\"indexed property get\");\nconst indexedSetNew = Symbol(\"indexed property set new\");\nconst indexedSetExisting = Symbol(\"indexed property set existing\");\nconst namedGet = Symbol(\"named property get\");\nconst namedSetNew = Symbol(\"named property set new\");\nconst namedSetExisting = Symbol(\"named property set existing\");\nconst namedDelete = Symbol(\"named property delete\");\n\nconst asyncIteratorNext = Symbol(\"async iterator get the next iteration result\");\nconst asyncIteratorReturn = Symbol(\"async iterator return steps\");\nconst asyncIteratorInit = Symbol(\"async iterator initialization steps\");\nconst asyncIteratorEOI = Symbol(\"async iterator end of iteration\");\n\nmodule.exports = exports = {\n isObject,\n hasOwn,\n define,\n newObjectInRealm,\n wrapperSymbol,\n implSymbol,\n getSameObject,\n ctorRegistrySymbol,\n initCtorRegistry,\n wrapperForImpl,\n implForWrapper,\n tryWrapperForImpl,\n tryImplForWrapper,\n iterInternalSymbol,\n isArrayBuffer,\n isArrayIndexPropName,\n supportsPropertyIndex,\n supportedPropertyIndices,\n supportsPropertyName,\n supportedPropertyNames,\n indexedGet,\n indexedSetNew,\n indexedSetExisting,\n namedGet,\n namedSetNew,\n namedSetExisting,\n namedDelete,\n asyncIteratorNext,\n asyncIteratorReturn,\n asyncIteratorInit,\n asyncIteratorEOI,\n iteratorResult\n};\n","'use strict';\n\n/** Highest positive signed 32-bit float value */\nconst maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n\n/** Bootstring parameters */\nconst base = 36;\nconst tMin = 1;\nconst tMax = 26;\nconst skew = 38;\nconst damp = 700;\nconst initialBias = 72;\nconst initialN = 128; // 0x80\nconst delimiter = '-'; // '\\x2D'\n\n/** Regular expressions */\nconst regexPunycode = /^xn--/;\nconst regexNonASCII = /[^\\0-\\x7F]/; // Note: U+007F DEL is excluded too.\nconst regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n\n/** Error messages */\nconst errors = {\n\t'overflow': 'Overflow: input needs wider integers to process',\n\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t'invalid-input': 'Invalid input'\n};\n\n/** Convenience shortcuts */\nconst baseMinusTMin = base - tMin;\nconst floor = Math.floor;\nconst stringFromCharCode = String.fromCharCode;\n\n/*--------------------------------------------------------------------------*/\n\n/**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\nfunction error(type) {\n\tthrow new RangeError(errors[type]);\n}\n\n/**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\nfunction map(array, callback) {\n\tconst result = [];\n\tlet length = array.length;\n\twhile (length--) {\n\t\tresult[length] = callback(array[length]);\n\t}\n\treturn result;\n}\n\n/**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {String} A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(domain, callback) {\n\tconst parts = domain.split('@');\n\tlet result = '';\n\tif (parts.length > 1) {\n\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t// the local part (i.e. everything up to `@`) intact.\n\t\tresult = parts[0] + '@';\n\t\tdomain = parts[1];\n\t}\n\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\tdomain = domain.replace(regexSeparators, '\\x2E');\n\tconst labels = domain.split('.');\n\tconst encoded = map(labels, callback).join('.');\n\treturn result + encoded;\n}\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see \n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\nfunction ucs2decode(string) {\n\tconst output = [];\n\tlet counter = 0;\n\tconst length = string.length;\n\twhile (counter < length) {\n\t\tconst value = string.charCodeAt(counter++);\n\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t// It's a high surrogate, and there is a next character.\n\t\t\tconst extra = string.charCodeAt(counter++);\n\t\t\tif ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t} else {\n\t\t\t\t// It's an unmatched surrogate; only append this code unit, in case the\n\t\t\t\t// next code unit is the high surrogate of a surrogate pair.\n\t\t\t\toutput.push(value);\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t} else {\n\t\t\toutput.push(value);\n\t\t}\n\t}\n\treturn output;\n}\n\n/**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\nconst ucs2encode = codePoints => String.fromCodePoint(...codePoints);\n\n/**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\nconst basicToDigit = function(codePoint) {\n\tif (codePoint >= 0x30 && codePoint < 0x3A) {\n\t\treturn 26 + (codePoint - 0x30);\n\t}\n\tif (codePoint >= 0x41 && codePoint < 0x5B) {\n\t\treturn codePoint - 0x41;\n\t}\n\tif (codePoint >= 0x61 && codePoint < 0x7B) {\n\t\treturn codePoint - 0x61;\n\t}\n\treturn base;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\nconst digitToBasic = function(digit, flag) {\n\t// 0..25 map to ASCII a..z or A..Z\n\t// 26..35 map to ASCII 0..9\n\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\nconst adapt = function(delta, numPoints, firstTime) {\n\tlet k = 0;\n\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\tdelta += floor(delta / numPoints);\n\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\tdelta = floor(delta / baseMinusTMin);\n\t}\n\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\nconst decode = function(input) {\n\t// Don't use UCS-2.\n\tconst output = [];\n\tconst inputLength = input.length;\n\tlet i = 0;\n\tlet n = initialN;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points: let `basic` be the number of input code\n\t// points before the last delimiter, or `0` if there is none, then copy\n\t// the first basic code points to the output.\n\n\tlet basic = input.lastIndexOf(delimiter);\n\tif (basic < 0) {\n\t\tbasic = 0;\n\t}\n\n\tfor (let j = 0; j < basic; ++j) {\n\t\t// if it's not a basic code point\n\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\terror('not-basic');\n\t\t}\n\t\toutput.push(input.charCodeAt(j));\n\t}\n\n\t// Main decoding loop: start just after the last delimiter if any basic code\n\t// points were copied; start at the beginning otherwise.\n\n\tfor (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t// `index` is the index of the next character to be consumed.\n\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t// which gets added to `i`. The overflow checking is easier\n\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t// value at the end to obtain `delta`.\n\t\tconst oldi = i;\n\t\tfor (let w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\tif (index >= inputLength) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\n\t\t\tconst digit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\tif (digit >= base) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\t\t\tif (digit > floor((maxInt - i) / w)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\ti += digit * w;\n\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\tif (digit < t) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst baseMinusT = base - t;\n\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tw *= baseMinusT;\n\n\t\t}\n\n\t\tconst out = output.length + 1;\n\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t// incrementing `n` each time, so we'll fix that now:\n\t\tif (floor(i / out) > maxInt - n) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tn += floor(i / out);\n\t\ti %= out;\n\n\t\t// Insert `n` at position `i` of the output.\n\t\toutput.splice(i++, 0, n);\n\n\t}\n\n\treturn String.fromCodePoint(...output);\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\nconst encode = function(input) {\n\tconst output = [];\n\n\t// Convert the input in UCS-2 to an array of Unicode code points.\n\tinput = ucs2decode(input);\n\n\t// Cache the length.\n\tconst inputLength = input.length;\n\n\t// Initialize the state.\n\tlet n = initialN;\n\tlet delta = 0;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points.\n\tfor (const currentValue of input) {\n\t\tif (currentValue < 0x80) {\n\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t}\n\t}\n\n\tconst basicLength = output.length;\n\tlet handledCPCount = basicLength;\n\n\t// `handledCPCount` is the number of code points that have been handled;\n\t// `basicLength` is the number of basic code points.\n\n\t// Finish the basic string with a delimiter unless it's empty.\n\tif (basicLength) {\n\t\toutput.push(delimiter);\n\t}\n\n\t// Main encoding loop:\n\twhile (handledCPCount < inputLength) {\n\n\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t// larger one:\n\t\tlet m = maxInt;\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\tm = currentValue;\n\t\t\t}\n\t\t}\n\n\t\t// Increase `delta` enough to advance the decoder's state to ,\n\t\t// but guard against overflow.\n\t\tconst handledCPCountPlusOne = handledCPCount + 1;\n\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\tn = m;\n\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\t\t\tif (currentValue === n) {\n\t\t\t\t// Represent delta as a generalized variable-length integer.\n\t\t\t\tlet q = delta;\n\t\t\t\tfor (let k = base; /* no condition */; k += base) {\n\t\t\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tconst qMinusT = q - t;\n\t\t\t\t\tconst baseMinusT = base - t;\n\t\t\t\t\toutput.push(\n\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t);\n\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t}\n\n\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength);\n\t\t\t\tdelta = 0;\n\t\t\t\t++handledCPCount;\n\t\t\t}\n\t\t}\n\n\t\t++delta;\n\t\t++n;\n\n\t}\n\treturn output.join('');\n};\n\n/**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\nconst toUnicode = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexPunycode.test(string)\n\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t: string;\n\t});\n};\n\n/**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\nconst toASCII = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexNonASCII.test(string)\n\t\t\t? 'xn--' + encode(string)\n\t\t\t: string;\n\t});\n};\n\n/*--------------------------------------------------------------------------*/\n\n/** Define the public API */\nconst punycode = {\n\t/**\n\t * A string representing the current Punycode.js version number.\n\t * @memberOf punycode\n\t * @type String\n\t */\n\t'version': '2.3.1',\n\t/**\n\t * An object of methods to convert from JavaScript's internal character\n\t * representation (UCS-2) to Unicode code points, and back.\n\t * @see \n\t * @memberOf punycode\n\t * @type Object\n\t */\n\t'ucs2': {\n\t\t'decode': ucs2decode,\n\t\t'encode': ucs2encode\n\t},\n\t'decode': decode,\n\t'encode': encode,\n\t'toASCII': toASCII,\n\t'toUnicode': toUnicode\n};\n\nexport { ucs2decode, ucs2encode, decode, encode, toASCII, toUnicode };\nexport default punycode;\n","\"use strict\";\n\nconst combiningMarks = /[\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u0898-\\u089F\\u08CA-\\u08E1\\u08E3-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u09FE\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0AFA-\\u0AFF\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B55-\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C00-\\u0C04\\u0C3C\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0CF3\\u0D00-\\u0D03\\u0D3B\\u0D3C\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D81-\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EBC\\u0EC8-\\u0ECE\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F\\u109A-\\u109D\\u135D-\\u135F\\u1712-\\u1715\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u180F\\u1885\\u1886\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F\\u1AB0-\\u1ACE\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF4\\u1CF7-\\u1CF9\\u1DC0-\\u1DFF\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA82C\\uA880\\uA881\\uA8B4-\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9E5\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\u{101FD}\\u{102E0}\\u{10376}-\\u{1037A}\\u{10A01}-\\u{10A03}\\u{10A05}\\u{10A06}\\u{10A0C}-\\u{10A0F}\\u{10A38}-\\u{10A3A}\\u{10A3F}\\u{10AE5}\\u{10AE6}\\u{10D24}-\\u{10D27}\\u{10EAB}\\u{10EAC}\\u{10EFD}-\\u{10EFF}\\u{10F46}-\\u{10F50}\\u{10F82}-\\u{10F85}\\u{11000}-\\u{11002}\\u{11038}-\\u{11046}\\u{11070}\\u{11073}\\u{11074}\\u{1107F}-\\u{11082}\\u{110B0}-\\u{110BA}\\u{110C2}\\u{11100}-\\u{11102}\\u{11127}-\\u{11134}\\u{11145}\\u{11146}\\u{11173}\\u{11180}-\\u{11182}\\u{111B3}-\\u{111C0}\\u{111C9}-\\u{111CC}\\u{111CE}\\u{111CF}\\u{1122C}-\\u{11237}\\u{1123E}\\u{11241}\\u{112DF}-\\u{112EA}\\u{11300}-\\u{11303}\\u{1133B}\\u{1133C}\\u{1133E}-\\u{11344}\\u{11347}\\u{11348}\\u{1134B}-\\u{1134D}\\u{11357}\\u{11362}\\u{11363}\\u{11366}-\\u{1136C}\\u{11370}-\\u{11374}\\u{11435}-\\u{11446}\\u{1145E}\\u{114B0}-\\u{114C3}\\u{115AF}-\\u{115B5}\\u{115B8}-\\u{115C0}\\u{115DC}\\u{115DD}\\u{11630}-\\u{11640}\\u{116AB}-\\u{116B7}\\u{1171D}-\\u{1172B}\\u{1182C}-\\u{1183A}\\u{11930}-\\u{11935}\\u{11937}\\u{11938}\\u{1193B}-\\u{1193E}\\u{11940}\\u{11942}\\u{11943}\\u{119D1}-\\u{119D7}\\u{119DA}-\\u{119E0}\\u{119E4}\\u{11A01}-\\u{11A0A}\\u{11A33}-\\u{11A39}\\u{11A3B}-\\u{11A3E}\\u{11A47}\\u{11A51}-\\u{11A5B}\\u{11A8A}-\\u{11A99}\\u{11C2F}-\\u{11C36}\\u{11C38}-\\u{11C3F}\\u{11C92}-\\u{11CA7}\\u{11CA9}-\\u{11CB6}\\u{11D31}-\\u{11D36}\\u{11D3A}\\u{11D3C}\\u{11D3D}\\u{11D3F}-\\u{11D45}\\u{11D47}\\u{11D8A}-\\u{11D8E}\\u{11D90}\\u{11D91}\\u{11D93}-\\u{11D97}\\u{11EF3}-\\u{11EF6}\\u{11F00}\\u{11F01}\\u{11F03}\\u{11F34}-\\u{11F3A}\\u{11F3E}-\\u{11F42}\\u{13440}\\u{13447}-\\u{13455}\\u{16AF0}-\\u{16AF4}\\u{16B30}-\\u{16B36}\\u{16F4F}\\u{16F51}-\\u{16F87}\\u{16F8F}-\\u{16F92}\\u{16FE4}\\u{16FF0}\\u{16FF1}\\u{1BC9D}\\u{1BC9E}\\u{1CF00}-\\u{1CF2D}\\u{1CF30}-\\u{1CF46}\\u{1D165}-\\u{1D169}\\u{1D16D}-\\u{1D172}\\u{1D17B}-\\u{1D182}\\u{1D185}-\\u{1D18B}\\u{1D1AA}-\\u{1D1AD}\\u{1D242}-\\u{1D244}\\u{1DA00}-\\u{1DA36}\\u{1DA3B}-\\u{1DA6C}\\u{1DA75}\\u{1DA84}\\u{1DA9B}-\\u{1DA9F}\\u{1DAA1}-\\u{1DAAF}\\u{1E000}-\\u{1E006}\\u{1E008}-\\u{1E018}\\u{1E01B}-\\u{1E021}\\u{1E023}\\u{1E024}\\u{1E026}-\\u{1E02A}\\u{1E08F}\\u{1E130}-\\u{1E136}\\u{1E2AE}\\u{1E2EC}-\\u{1E2EF}\\u{1E4EC}-\\u{1E4EF}\\u{1E8D0}-\\u{1E8D6}\\u{1E944}-\\u{1E94A}\\u{E0100}-\\u{E01EF}]/u;\nconst combiningClassVirama = /[\\u094D\\u09CD\\u0A4D\\u0ACD\\u0B4D\\u0BCD\\u0C4D\\u0CCD\\u0D3B\\u0D3C\\u0D4D\\u0DCA\\u0E3A\\u0EBA\\u0F84\\u1039\\u103A\\u1714\\u1734\\u17D2\\u1A60\\u1B44\\u1BAA\\u1BAB\\u1BF2\\u1BF3\\u2D7F\\uA806\\uA8C4\\uA953\\uA9C0\\uAAF6\\uABED\\u{10A3F}\\u{11046}\\u{1107F}\\u{110B9}\\u{11133}\\u{11134}\\u{111C0}\\u{11235}\\u{112EA}\\u{1134D}\\u{11442}\\u{114C2}\\u{115BF}\\u{1163F}\\u{116B6}\\u{1172B}\\u{11839}\\u{119E0}\\u{11A34}\\u{11A47}\\u{11A99}\\u{11C3F}\\u{11D44}\\u{11D45}\\u{11D97}]/u;\nconst validZWNJ = /[\\u0620\\u0626\\u0628\\u062A-\\u062E\\u0633-\\u063F\\u0641-\\u0647\\u0649\\u064A\\u066E\\u066F\\u0678-\\u0687\\u069A-\\u06BF\\u06C1\\u06C2\\u06CC\\u06CE\\u06D0\\u06D1\\u06FA-\\u06FC\\u06FF\\u0712-\\u0714\\u071A-\\u071D\\u071F-\\u0727\\u0729\\u072B\\u072D\\u072E\\u074E-\\u0758\\u075C-\\u076A\\u076D-\\u0770\\u0772\\u0775-\\u0777\\u077A-\\u077F\\u07CA-\\u07EA\\u0841-\\u0845\\u0848\\u084A-\\u0853\\u0855\\u0860\\u0862-\\u0865\\u0868\\u08A0-\\u08A9\\u08AF\\u08B0\\u08B3\\u08B4\\u08B6-\\u08B8\\u08BA-\\u08BD\\u1807\\u1820-\\u1878\\u1887-\\u18A8\\u18AA\\uA840-\\uA872\\u{10AC0}-\\u{10AC4}\\u{10ACD}\\u{10AD3}-\\u{10ADC}\\u{10ADE}-\\u{10AE0}\\u{10AEB}-\\u{10AEE}\\u{10B80}\\u{10B82}\\u{10B86}-\\u{10B88}\\u{10B8A}\\u{10B8B}\\u{10B8D}\\u{10B90}\\u{10BAD}\\u{10BAE}\\u{10D00}-\\u{10D21}\\u{10D23}\\u{10F30}-\\u{10F32}\\u{10F34}-\\u{10F44}\\u{10F51}-\\u{10F53}\\u{1E900}-\\u{1E943}][\\xAD\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u061C\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u070F\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08D3-\\u08E1\\u08E3-\\u0902\\u093A\\u093C\\u0941-\\u0948\\u094D\\u0951-\\u0957\\u0962\\u0963\\u0981\\u09BC\\u09C1-\\u09C4\\u09CD\\u09E2\\u09E3\\u09FE\\u0A01\\u0A02\\u0A3C\\u0A41\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81\\u0A82\\u0ABC\\u0AC1-\\u0AC5\\u0AC7\\u0AC8\\u0ACD\\u0AE2\\u0AE3\\u0AFA-\\u0AFF\\u0B01\\u0B3C\\u0B3F\\u0B41-\\u0B44\\u0B4D\\u0B56\\u0B62\\u0B63\\u0B82\\u0BC0\\u0BCD\\u0C00\\u0C04\\u0C3E-\\u0C40\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81\\u0CBC\\u0CBF\\u0CC6\\u0CCC\\u0CCD\\u0CE2\\u0CE3\\u0D00\\u0D01\\u0D3B\\u0D3C\\u0D41-\\u0D44\\u0D4D\\u0D62\\u0D63\\u0DCA\\u0DD2-\\u0DD4\\u0DD6\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F71-\\u0F7E\\u0F80-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102D-\\u1030\\u1032-\\u1037\\u1039\\u103A\\u103D\\u103E\\u1058\\u1059\\u105E-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108D\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4\\u17B5\\u17B7-\\u17BD\\u17C6\\u17C9-\\u17D3\\u17DD\\u180B-\\u180D\\u1885\\u1886\\u18A9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193B\\u1A17\\u1A18\\u1A1B\\u1A56\\u1A58-\\u1A5E\\u1A60\\u1A62\\u1A65-\\u1A6C\\u1A73-\\u1A7C\\u1A7F\\u1AB0-\\u1ABE\\u1B00-\\u1B03\\u1B34\\u1B36-\\u1B3A\\u1B3C\\u1B42\\u1B6B-\\u1B73\\u1B80\\u1B81\\u1BA2-\\u1BA5\\u1BA8\\u1BA9\\u1BAB-\\u1BAD\\u1BE6\\u1BE8\\u1BE9\\u1BED\\u1BEF-\\u1BF1\\u1C2C-\\u1C33\\u1C36\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE0\\u1CE2-\\u1CE8\\u1CED\\u1CF4\\u1CF8\\u1CF9\\u1DC0-\\u1DF9\\u1DFB-\\u1DFF\\u200B\\u200E\\u200F\\u202A-\\u202E\\u2060-\\u2064\\u206A-\\u206F\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302D\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA825\\uA826\\uA8C4\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA951\\uA980-\\uA982\\uA9B3\\uA9B6-\\uA9B9\\uA9BC\\uA9BD\\uA9E5\\uAA29-\\uAA2E\\uAA31\\uAA32\\uAA35\\uAA36\\uAA43\\uAA4C\\uAA7C\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEC\\uAAED\\uAAF6\\uABE5\\uABE8\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\uFEFF\\uFFF9-\\uFFFB\\u{101FD}\\u{102E0}\\u{10376}-\\u{1037A}\\u{10A01}-\\u{10A03}\\u{10A05}\\u{10A06}\\u{10A0C}-\\u{10A0F}\\u{10A38}-\\u{10A3A}\\u{10A3F}\\u{10AE5}\\u{10AE6}\\u{10D24}-\\u{10D27}\\u{10F46}-\\u{10F50}\\u{11001}\\u{11038}-\\u{11046}\\u{1107F}-\\u{11081}\\u{110B3}-\\u{110B6}\\u{110B9}\\u{110BA}\\u{11100}-\\u{11102}\\u{11127}-\\u{1112B}\\u{1112D}-\\u{11134}\\u{11173}\\u{11180}\\u{11181}\\u{111B6}-\\u{111BE}\\u{111C9}-\\u{111CC}\\u{1122F}-\\u{11231}\\u{11234}\\u{11236}\\u{11237}\\u{1123E}\\u{112DF}\\u{112E3}-\\u{112EA}\\u{11300}\\u{11301}\\u{1133B}\\u{1133C}\\u{11340}\\u{11366}-\\u{1136C}\\u{11370}-\\u{11374}\\u{11438}-\\u{1143F}\\u{11442}-\\u{11444}\\u{11446}\\u{1145E}\\u{114B3}-\\u{114B8}\\u{114BA}\\u{114BF}\\u{114C0}\\u{114C2}\\u{114C3}\\u{115B2}-\\u{115B5}\\u{115BC}\\u{115BD}\\u{115BF}\\u{115C0}\\u{115DC}\\u{115DD}\\u{11633}-\\u{1163A}\\u{1163D}\\u{1163F}\\u{11640}\\u{116AB}\\u{116AD}\\u{116B0}-\\u{116B5}\\u{116B7}\\u{1171D}-\\u{1171F}\\u{11722}-\\u{11725}\\u{11727}-\\u{1172B}\\u{1182F}-\\u{11837}\\u{11839}\\u{1183A}\\u{119D4}-\\u{119D7}\\u{119DA}\\u{119DB}\\u{119E0}\\u{11A01}-\\u{11A0A}\\u{11A33}-\\u{11A38}\\u{11A3B}-\\u{11A3E}\\u{11A47}\\u{11A51}-\\u{11A56}\\u{11A59}-\\u{11A5B}\\u{11A8A}-\\u{11A96}\\u{11A98}\\u{11A99}\\u{11C30}-\\u{11C36}\\u{11C38}-\\u{11C3D}\\u{11C3F}\\u{11C92}-\\u{11CA7}\\u{11CAA}-\\u{11CB0}\\u{11CB2}\\u{11CB3}\\u{11CB5}\\u{11CB6}\\u{11D31}-\\u{11D36}\\u{11D3A}\\u{11D3C}\\u{11D3D}\\u{11D3F}-\\u{11D45}\\u{11D47}\\u{11D90}\\u{11D91}\\u{11D95}\\u{11D97}\\u{11EF3}\\u{11EF4}\\u{13430}-\\u{13438}\\u{16AF0}-\\u{16AF4}\\u{16B30}-\\u{16B36}\\u{16F4F}\\u{16F8F}-\\u{16F92}\\u{1BC9D}\\u{1BC9E}\\u{1BCA0}-\\u{1BCA3}\\u{1D167}-\\u{1D169}\\u{1D173}-\\u{1D182}\\u{1D185}-\\u{1D18B}\\u{1D1AA}-\\u{1D1AD}\\u{1D242}-\\u{1D244}\\u{1DA00}-\\u{1DA36}\\u{1DA3B}-\\u{1DA6C}\\u{1DA75}\\u{1DA84}\\u{1DA9B}-\\u{1DA9F}\\u{1DAA1}-\\u{1DAAF}\\u{1E000}-\\u{1E006}\\u{1E008}-\\u{1E018}\\u{1E01B}-\\u{1E021}\\u{1E023}\\u{1E024}\\u{1E026}-\\u{1E02A}\\u{1E130}-\\u{1E136}\\u{1E2EC}-\\u{1E2EF}\\u{1E8D0}-\\u{1E8D6}\\u{1E944}-\\u{1E94B}\\u{E0001}\\u{E0020}-\\u{E007F}\\u{E0100}-\\u{E01EF}]*\\u200C[\\xAD\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u061C\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u070F\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08D3-\\u08E1\\u08E3-\\u0902\\u093A\\u093C\\u0941-\\u0948\\u094D\\u0951-\\u0957\\u0962\\u0963\\u0981\\u09BC\\u09C1-\\u09C4\\u09CD\\u09E2\\u09E3\\u09FE\\u0A01\\u0A02\\u0A3C\\u0A41\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81\\u0A82\\u0ABC\\u0AC1-\\u0AC5\\u0AC7\\u0AC8\\u0ACD\\u0AE2\\u0AE3\\u0AFA-\\u0AFF\\u0B01\\u0B3C\\u0B3F\\u0B41-\\u0B44\\u0B4D\\u0B56\\u0B62\\u0B63\\u0B82\\u0BC0\\u0BCD\\u0C00\\u0C04\\u0C3E-\\u0C40\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81\\u0CBC\\u0CBF\\u0CC6\\u0CCC\\u0CCD\\u0CE2\\u0CE3\\u0D00\\u0D01\\u0D3B\\u0D3C\\u0D41-\\u0D44\\u0D4D\\u0D62\\u0D63\\u0DCA\\u0DD2-\\u0DD4\\u0DD6\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F71-\\u0F7E\\u0F80-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102D-\\u1030\\u1032-\\u1037\\u1039\\u103A\\u103D\\u103E\\u1058\\u1059\\u105E-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108D\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4\\u17B5\\u17B7-\\u17BD\\u17C6\\u17C9-\\u17D3\\u17DD\\u180B-\\u180D\\u1885\\u1886\\u18A9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193B\\u1A17\\u1A18\\u1A1B\\u1A56\\u1A58-\\u1A5E\\u1A60\\u1A62\\u1A65-\\u1A6C\\u1A73-\\u1A7C\\u1A7F\\u1AB0-\\u1ABE\\u1B00-\\u1B03\\u1B34\\u1B36-\\u1B3A\\u1B3C\\u1B42\\u1B6B-\\u1B73\\u1B80\\u1B81\\u1BA2-\\u1BA5\\u1BA8\\u1BA9\\u1BAB-\\u1BAD\\u1BE6\\u1BE8\\u1BE9\\u1BED\\u1BEF-\\u1BF1\\u1C2C-\\u1C33\\u1C36\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE0\\u1CE2-\\u1CE8\\u1CED\\u1CF4\\u1CF8\\u1CF9\\u1DC0-\\u1DF9\\u1DFB-\\u1DFF\\u200B\\u200E\\u200F\\u202A-\\u202E\\u2060-\\u2064\\u206A-\\u206F\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302D\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA825\\uA826\\uA8C4\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA951\\uA980-\\uA982\\uA9B3\\uA9B6-\\uA9B9\\uA9BC\\uA9BD\\uA9E5\\uAA29-\\uAA2E\\uAA31\\uAA32\\uAA35\\uAA36\\uAA43\\uAA4C\\uAA7C\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEC\\uAAED\\uAAF6\\uABE5\\uABE8\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\uFEFF\\uFFF9-\\uFFFB\\u{101FD}\\u{102E0}\\u{10376}-\\u{1037A}\\u{10A01}-\\u{10A03}\\u{10A05}\\u{10A06}\\u{10A0C}-\\u{10A0F}\\u{10A38}-\\u{10A3A}\\u{10A3F}\\u{10AE5}\\u{10AE6}\\u{10D24}-\\u{10D27}\\u{10F46}-\\u{10F50}\\u{11001}\\u{11038}-\\u{11046}\\u{1107F}-\\u{11081}\\u{110B3}-\\u{110B6}\\u{110B9}\\u{110BA}\\u{11100}-\\u{11102}\\u{11127}-\\u{1112B}\\u{1112D}-\\u{11134}\\u{11173}\\u{11180}\\u{11181}\\u{111B6}-\\u{111BE}\\u{111C9}-\\u{111CC}\\u{1122F}-\\u{11231}\\u{11234}\\u{11236}\\u{11237}\\u{1123E}\\u{112DF}\\u{112E3}-\\u{112EA}\\u{11300}\\u{11301}\\u{1133B}\\u{1133C}\\u{11340}\\u{11366}-\\u{1136C}\\u{11370}-\\u{11374}\\u{11438}-\\u{1143F}\\u{11442}-\\u{11444}\\u{11446}\\u{1145E}\\u{114B3}-\\u{114B8}\\u{114BA}\\u{114BF}\\u{114C0}\\u{114C2}\\u{114C3}\\u{115B2}-\\u{115B5}\\u{115BC}\\u{115BD}\\u{115BF}\\u{115C0}\\u{115DC}\\u{115DD}\\u{11633}-\\u{1163A}\\u{1163D}\\u{1163F}\\u{11640}\\u{116AB}\\u{116AD}\\u{116B0}-\\u{116B5}\\u{116B7}\\u{1171D}-\\u{1171F}\\u{11722}-\\u{11725}\\u{11727}-\\u{1172B}\\u{1182F}-\\u{11837}\\u{11839}\\u{1183A}\\u{119D4}-\\u{119D7}\\u{119DA}\\u{119DB}\\u{119E0}\\u{11A01}-\\u{11A0A}\\u{11A33}-\\u{11A38}\\u{11A3B}-\\u{11A3E}\\u{11A47}\\u{11A51}-\\u{11A56}\\u{11A59}-\\u{11A5B}\\u{11A8A}-\\u{11A96}\\u{11A98}\\u{11A99}\\u{11C30}-\\u{11C36}\\u{11C38}-\\u{11C3D}\\u{11C3F}\\u{11C92}-\\u{11CA7}\\u{11CAA}-\\u{11CB0}\\u{11CB2}\\u{11CB3}\\u{11CB5}\\u{11CB6}\\u{11D31}-\\u{11D36}\\u{11D3A}\\u{11D3C}\\u{11D3D}\\u{11D3F}-\\u{11D45}\\u{11D47}\\u{11D90}\\u{11D91}\\u{11D95}\\u{11D97}\\u{11EF3}\\u{11EF4}\\u{13430}-\\u{13438}\\u{16AF0}-\\u{16AF4}\\u{16B30}-\\u{16B36}\\u{16F4F}\\u{16F8F}-\\u{16F92}\\u{1BC9D}\\u{1BC9E}\\u{1BCA0}-\\u{1BCA3}\\u{1D167}-\\u{1D169}\\u{1D173}-\\u{1D182}\\u{1D185}-\\u{1D18B}\\u{1D1AA}-\\u{1D1AD}\\u{1D242}-\\u{1D244}\\u{1DA00}-\\u{1DA36}\\u{1DA3B}-\\u{1DA6C}\\u{1DA75}\\u{1DA84}\\u{1DA9B}-\\u{1DA9F}\\u{1DAA1}-\\u{1DAAF}\\u{1E000}-\\u{1E006}\\u{1E008}-\\u{1E018}\\u{1E01B}-\\u{1E021}\\u{1E023}\\u{1E024}\\u{1E026}-\\u{1E02A}\\u{1E130}-\\u{1E136}\\u{1E2EC}-\\u{1E2EF}\\u{1E8D0}-\\u{1E8D6}\\u{1E944}-\\u{1E94B}\\u{E0001}\\u{E0020}-\\u{E007F}\\u{E0100}-\\u{E01EF}]*[\\u0620\\u0622-\\u063F\\u0641-\\u064A\\u066E\\u066F\\u0671-\\u0673\\u0675-\\u06D3\\u06D5\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u077F\\u07CA-\\u07EA\\u0840-\\u0855\\u0860\\u0862-\\u0865\\u0867-\\u086A\\u08A0-\\u08AC\\u08AE-\\u08B4\\u08B6-\\u08BD\\u1807\\u1820-\\u1878\\u1887-\\u18A8\\u18AA\\uA840-\\uA871\\u{10AC0}-\\u{10AC5}\\u{10AC7}\\u{10AC9}\\u{10ACA}\\u{10ACE}-\\u{10AD6}\\u{10AD8}-\\u{10AE1}\\u{10AE4}\\u{10AEB}-\\u{10AEF}\\u{10B80}-\\u{10B91}\\u{10BA9}-\\u{10BAE}\\u{10D01}-\\u{10D23}\\u{10F30}-\\u{10F44}\\u{10F51}-\\u{10F54}\\u{1E900}-\\u{1E943}]/u;\nconst bidiDomain = /[\\u05BE\\u05C0\\u05C3\\u05C6\\u05D0-\\u05EA\\u05EF-\\u05F4\\u0600-\\u0605\\u0608\\u060B\\u060D\\u061B-\\u064A\\u0660-\\u0669\\u066B-\\u066F\\u0671-\\u06D5\\u06DD\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u070D\\u070F\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07C0-\\u07EA\\u07F4\\u07F5\\u07FA\\u07FE-\\u0815\\u081A\\u0824\\u0828\\u0830-\\u083E\\u0840-\\u0858\\u085E\\u0860-\\u086A\\u0870-\\u088E\\u0890\\u0891\\u08A0-\\u08C9\\u08E2\\u200F\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBC2\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFC\\uFE70-\\uFE74\\uFE76-\\uFEFC\\u{10800}-\\u{10805}\\u{10808}\\u{1080A}-\\u{10835}\\u{10837}\\u{10838}\\u{1083C}\\u{1083F}-\\u{10855}\\u{10857}-\\u{1089E}\\u{108A7}-\\u{108AF}\\u{108E0}-\\u{108F2}\\u{108F4}\\u{108F5}\\u{108FB}-\\u{1091B}\\u{10920}-\\u{10939}\\u{1093F}\\u{10980}-\\u{109B7}\\u{109BC}-\\u{109CF}\\u{109D2}-\\u{10A00}\\u{10A10}-\\u{10A13}\\u{10A15}-\\u{10A17}\\u{10A19}-\\u{10A35}\\u{10A40}-\\u{10A48}\\u{10A50}-\\u{10A58}\\u{10A60}-\\u{10A9F}\\u{10AC0}-\\u{10AE4}\\u{10AEB}-\\u{10AF6}\\u{10B00}-\\u{10B35}\\u{10B40}-\\u{10B55}\\u{10B58}-\\u{10B72}\\u{10B78}-\\u{10B91}\\u{10B99}-\\u{10B9C}\\u{10BA9}-\\u{10BAF}\\u{10C00}-\\u{10C48}\\u{10C80}-\\u{10CB2}\\u{10CC0}-\\u{10CF2}\\u{10CFA}-\\u{10D23}\\u{10D30}-\\u{10D39}\\u{10E60}-\\u{10E7E}\\u{10E80}-\\u{10EA9}\\u{10EAD}\\u{10EB0}\\u{10EB1}\\u{10F00}-\\u{10F27}\\u{10F30}-\\u{10F45}\\u{10F51}-\\u{10F59}\\u{10F70}-\\u{10F81}\\u{10F86}-\\u{10F89}\\u{10FB0}-\\u{10FCB}\\u{10FE0}-\\u{10FF6}\\u{1E800}-\\u{1E8C4}\\u{1E8C7}-\\u{1E8CF}\\u{1E900}-\\u{1E943}\\u{1E94B}\\u{1E950}-\\u{1E959}\\u{1E95E}\\u{1E95F}\\u{1EC71}-\\u{1ECB4}\\u{1ED01}-\\u{1ED3D}\\u{1EE00}-\\u{1EE03}\\u{1EE05}-\\u{1EE1F}\\u{1EE21}\\u{1EE22}\\u{1EE24}\\u{1EE27}\\u{1EE29}-\\u{1EE32}\\u{1EE34}-\\u{1EE37}\\u{1EE39}\\u{1EE3B}\\u{1EE42}\\u{1EE47}\\u{1EE49}\\u{1EE4B}\\u{1EE4D}-\\u{1EE4F}\\u{1EE51}\\u{1EE52}\\u{1EE54}\\u{1EE57}\\u{1EE59}\\u{1EE5B}\\u{1EE5D}\\u{1EE5F}\\u{1EE61}\\u{1EE62}\\u{1EE64}\\u{1EE67}-\\u{1EE6A}\\u{1EE6C}-\\u{1EE72}\\u{1EE74}-\\u{1EE77}\\u{1EE79}-\\u{1EE7C}\\u{1EE7E}\\u{1EE80}-\\u{1EE89}\\u{1EE8B}-\\u{1EE9B}\\u{1EEA1}-\\u{1EEA3}\\u{1EEA5}-\\u{1EEA9}\\u{1EEAB}-\\u{1EEBB}]/u;\nconst bidiS1LTR = /[A-Za-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02B8\\u02BB-\\u02C1\\u02D0\\u02D1\\u02E0-\\u02E4\\u02EE\\u0370-\\u0373\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0482\\u048A-\\u052F\\u0531-\\u0556\\u0559-\\u0589\\u0903-\\u0939\\u093B\\u093D-\\u0940\\u0949-\\u094C\\u094E-\\u0950\\u0958-\\u0961\\u0964-\\u0980\\u0982\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09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8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA\\u0CCB\\u0CD5\\u0CD6\\u0CDD\\u0CDE\\u0CE0\\u0CE1\\u0CE6-\\u0CEF\\u0CF1-\\u0CF3\\u0D02-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D40\\u0D46-\\u0D48\\u0D4A-\\u0D4C\\u0D4E\\u0D4F\\u0D54-\\u0D61\\u0D66-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCF-\\u0DD1\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2-\\u0DF4\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E4F-\\u0E5B\\u0E81\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00-\\u0F17\\u0F1A-\\u0F34\\u0F36\\u0F38\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F7F\\u0F85\\u0F88-\\u0F8C\\u0FBE-\\u0FC5\\u0FC7-\\u0FCC\\u0FCE-\\u0FDA\\u1000-\\u102C\\u1031\\u1038\\u103B\\u103C\\u103F-\\u1057\\u105A-\\u105D\\u1061-\\u1070\\u1075-\\u1081\\u1083\\u1084\\u1087-\\u108C\\u108E-\\u109C\\u109E-\\u10C5\\u10C7\\u10CD\\u10D0-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1360-\\u137C\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u167F\\u1681-\\u169A\\u16A0-\\u16F8\\u1700-\\u1711\\u1715\\u171F-\\u1731\\u1734-\\u1736\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17B6\\u17BE-\\u17C5\\u17C7\\u17C8\\u17D4-\\u17DA\\u17DC\\u17E0-\\u17E9\\u1810-\\u1819\\u1820-\\u1878\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1923-\\u1926\\u1929-\\u192B\\u1930\\u1931\\u1933-\\u1938\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19DA\\u1A00-\\u1A16\\u1A19\\u1A1A\\u1A1E-\\u1A55\\u1A57\\u1A61\\u1A63\\u1A64\\u1A6D-\\u1A72\\u1A80-\\u1A89\\u1A90-\\u1A99\\u1AA0-\\u1AAD\\u1B04-\\u1B33\\u1B35\\u1B3B\\u1B3D-\\u1B41\\u1B43-\\u1B4C\\u1B50-\\u1B6A\\u1B74-\\u1B7E\\u1B82-\\u1BA1\\u1BA6\\u1BA7\\u1BAA\\u1BAE-\\u1BE5\\u1BE7\\u1BEA-\\u1BEC\\u1BEE\\u1BF2\\u1BF3\\u1BFC-\\u1C2B\\u1C34\\u1C35\\u1C3B-\\u1C49\\u1C4D-\\u1C88\\u1C90-\\u1CBA\\u1CBD-\\u1CC7\\u1CD3\\u1CE1\\u1CE9-\\u1CEC\\u1CEE-\\u1CF3\\u1CF5-\\u1CF7\\u1CFA\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200E\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u214F\\u2160-\\u2188\\u2336-\\u237A\\u2395\\u249C-\\u24E9\\u26AC\\u2800-\\u28FF\\u2C00-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D70\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u3005-\\u3007\\u3021-\\u3029\\u302E\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u3190-\\u31BF\\u31F0-\\u321C\\u3220-\\u324F\\u3260-\\u327B\\u327F-\\u32B0\\u32C0-\\u32CB\\u32D0-\\u3376\\u337B-\\u33DD\\u33E0-\\u33FE\\u3400-\\u4DBF\\u4E00-\\uA48C\\uA4D0-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66E\\uA680-\\uA69D\\uA6A0-\\uA6EF\\uA6F2-\\uA6F7\\uA722-\\uA787\\uA789-\\uA7CA\\uA7D0\\uA7D1\\uA7D3\\uA7D5-\\uA7D9\\uA7F2-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA824\\uA827\\uA830-\\uA837\\uA840-\\uA873\\uA880-\\uA8C3\\uA8CE-\\uA8D9\\uA8F2-\\uA8FE\\uA900-\\uA925\\uA92E-\\uA946\\uA952\\uA953\\uA95F-\\uA97C\\uA983-\\uA9B2\\uA9B4\\uA9B5\\uA9BA\\uA9BB\\uA9BE-\\uA9CD\\uA9CF-\\uA9D9\\uA9DE-\\uA9E4\\uA9E6-\\uA9FE\\uAA00-\\uAA28\\uAA2F\\uAA30\\uAA33\\uAA34\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA4D\\uAA50-\\uAA59\\uAA5C-\\uAA7B\\uAA7D-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAAEB\\uAAEE-\\uAAF5\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB69\\uAB70-\\uABE4\\uABE6\\uABE7\\uABE9-\\uABEC\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uD800-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC\\u{10000}-\\u{1000B}\\u{1000D}-\\u{10026}\\u{10028}-\\u{1003A}\\u{1003C}\\u{1003D}\\u{1003F}-\\u{1004D}\\u{10050}-\\u{1005D}\\u{10080}-\\u{100FA}\\u{10100}\\u{10102}\\u{10107}-\\u{10133}\\u{10137}-\\u{1013F}\\u{1018D}\\u{1018E}\\u{101D0}-\\u{101FC}\\u{10280}-\\u{1029C}\\u{102A0}-\\u{102D0}\\u{10300}-\\u{10323}\\u{1032D}-\\u{1034A}\\u{10350}-\\u{10375}\\u{10380}-\\u{1039D}\\u{1039F}-\\u{103C3}\\u{103C8}-\\u{103D5}\\u{10400}-\\u{1049D}\\u{104A0}-\\u{104A9}\\u{104B0}-\\u{104D3}\\u{104D8}-\\u{104FB}\\u{10500}-\\u{10527}\\u{10530}-\\u{10563}\\u{1056F}-\\u{1057A}\\u{1057C}-\\u{1058A}\\u{1058C}-\\u{10592}\\u{10594}\\u{10595}\\u{10597}-\\u{105A1}\\u{105A3}-\\u{105B1}\\u{105B3}-\\u{105B9}\\u{105BB}\\u{105BC}\\u{10600}-\\u{10736}\\u{10740}-\\u{10755}\\u{10760}-\\u{10767}\\u{10780}-\\u{10785}\\u{10787}-\\u{107B0}\\u{107B2}-\\u{107BA}\\u{11000}\\u{11002}-\\u{11037}\\u{11047}-\\u{1104D}\\u{11066}-\\u{1106F}\\u{11071}\\u{11072}\\u{11075}\\u{11082}-\\u{110B2}\\u{110B7}\\u{110B8}\\u{110BB}-\\u{110C1}\\u{110CD}\\u{110D0}-\\u{110E8}\\u{110F0}-\\u{110F9}\\u{11103}-\\u{11126}\\u{1112C}\\u{11136}-\\u{11147}\\u{11150}-\\u{11172}\\u{11174}-\\u{11176}\\u{11182}-\\u{111B5}\\u{111BF}-\\u{111C8}\\u{111CD}\\u{111CE}\\u{111D0}-\\u{111DF}\\u{111E1}-\\u{111F4}\\u{11200}-\\u{11211}\\u{11213}-\\u{1122E}\\u{11232}\\u{11233}\\u{11235}\\u{11238}-\\u{1123D}\\u{1123F}\\u{11240}\\u{11280}-\\u{11286}\\u{11288}\\u{1128A}-\\u{1128D}\\u{1128F}-\\u{1129D}\\u{1129F}-\\u{112A9}\\u{112B0}-\\u{112DE}\\u{112E0}-\\u{112E2}\\u{112F0}-\\u{112F9}\\u{11302}\\u{11303}\\u{11305}-\\u{1130C}\\u{1130F}\\u{11310}\\u{11313}-\\u{11328}\\u{1132A}-\\u{11330}\\u{11332}\\u{11333}\\u{11335}-\\u{11339}\\u{1133D}-\\u{1133F}\\u{11341}-\\u{11344}\\u{11347}\\u{11348}\\u{1134B}-\\u{1134D}\\u{11350}\\u{11357}\\u{1135D}-\\u{11363}\\u{11400}-\\u{11437}\\u{11440}\\u{11441}\\u{11445}\\u{11447}-\\u{1145B}\\u{1145D}\\u{1145F}-\\u{11461}\\u{11480}-\\u{114B2}\\u{114B9}\\u{114BB}-\\u{114BE}\\u{114C1}\\u{114C4}-\\u{114C7}\\u{114D0}-\\u{114D9}\\u{11580}-\\u{115B1}\\u{115B8}-\\u{115BB}\\u{115BE}\\u{115C1}-\\u{115DB}\\u{11600}-\\u{11632}\\u{1163B}\\u{1163C}\\u{1163E}\\u{11641}-\\u{11644}\\u{11650}-\\u{11659}\\u{11680}-\\u{116AA}\\u{116AC}\\u{116AE}\\u{116AF}\\u{116B6}\\u{116B8}\\u{116B9}\\u{116C0}-\\u{116C9}\\u{11700}-\\u{1171A}\\u{11720}\\u{11721}\\u{11726}\\u{11730}-\\u{11746}\\u{11800}-\\u{1182E}\\u{11838}\\u{1183B}\\u{118A0}-\\u{118F2}\\u{118FF}-\\u{11906}\\u{11909}\\u{1190C}-\\u{11913}\\u{11915}\\u{11916}\\u{11918}-\\u{11935}\\u{11937}\\u{11938}\\u{1193D}\\u{1193F}-\\u{11942}\\u{11944}-\\u{11946}\\u{11950}-\\u{11959}\\u{119A0}-\\u{119A7}\\u{119AA}-\\u{119D3}\\u{119DC}-\\u{119DF}\\u{119E1}-\\u{119E4}\\u{11A00}\\u{11A07}\\u{11A08}\\u{11A0B}-\\u{11A32}\\u{11A39}\\u{11A3A}\\u{11A3F}-\\u{11A46}\\u{11A50}\\u{11A57}\\u{11A58}\\u{11A5C}-\\u{11A89}\\u{11A97}\\u{11A9A}-\\u{11AA2}\\u{11AB0}-\\u{11AF8}\\u{11B00}-\\u{11B09}\\u{11C00}-\\u{11C08}\\u{11C0A}-\\u{11C2F}\\u{11C3E}-\\u{11C45}\\u{11C50}-\\u{11C6C}\\u{11C70}-\\u{11C8F}\\u{11CA9}\\u{11CB1}\\u{11CB4}\\u{11D00}-\\u{11D06}\\u{11D08}\\u{11D09}\\u{11D0B}-\\u{11D30}\\u{11D46}\\u{11D50}-\\u{11D59}\\u{11D60}-\\u{11D65}\\u{11D67}\\u{11D68}\\u{11D6A}-\\u{11D8E}\\u{11D93}\\u{11D94}\\u{11D96}\\u{11D98}\\u{11DA0}-\\u{11DA9}\\u{11EE0}-\\u{11EF2}\\u{11EF5}-\\u{11EF8}\\u{11F02}-\\u{11F10}\\u{11F12}-\\u{11F35}\\u{11F3E}\\u{11F3F}\\u{11F41}\\u{11F43}-\\u{11F59}\\u{11FB0}\\u{11FC0}-\\u{11FD4}\\u{11FFF}-\\u{12399}\\u{12400}-\\u{1246E}\\u{12470}-\\u{12474}\\u{12480}-\\u{12543}\\u{12F90}-\\u{12FF2}\\u{13000}-\\u{1343F}\\u{13441}-\\u{13446}\\u{14400}-\\u{14646}\\u{16800}-\\u{16A38}\\u{16A40}-\\u{16A5E}\\u{16A60}-\\u{16A69}\\u{16A6E}-\\u{16ABE}\\u{16AC0}-\\u{16AC9}\\u{16AD0}-\\u{16AED}\\u{16AF5}\\u{16B00}-\\u{16B2F}\\u{16B37}-\\u{16B45}\\u{16B50}-\\u{16B59}\\u{16B5B}-\\u{16B61}\\u{16B63}-\\u{16B77}\\u{16B7D}-\\u{16B8F}\\u{16E40}-\\u{16E9A}\\u{16F00}-\\u{16F4A}\\u{16F50}-\\u{16F87}\\u{16F93}-\\u{16F9F}\\u{16FE0}\\u{16FE1}\\u{16FE3}\\u{16FF0}\\u{16FF1}\\u{17000}-\\u{187F7}\\u{18800}-\\u{18CD5}\\u{18D00}-\\u{18D08}\\u{1AFF0}-\\u{1AFF3}\\u{1AFF5}-\\u{1AFFB}\\u{1AFFD}\\u{1AFFE}\\u{1B000}-\\u{1B122}\\u{1B132}\\u{1B150}-\\u{1B152}\\u{1B155}\\u{1B164}-\\u{1B167}\\u{1B170}-\\u{1B2FB}\\u{1BC00}-\\u{1BC6A}\\u{1BC70}-\\u{1BC7C}\\u{1BC80}-\\u{1BC88}\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E7E0}-\\u{1E7E6}\\u{1E7E8}-\\u{1E7EB}\\u{1E7ED}\\u{1E7EE}\\u{1E7F0}-\\u{1E7FE}\\u{1F110}-\\u{1F12E}\\u{1F130}-\\u{1F169}\\u{1F170}-\\u{1F1AC}\\u{1F1E6}-\\u{1F202}\\u{1F210}-\\u{1F23B}\\u{1F240}-\\u{1F248}\\u{1F250}\\u{1F251}\\u{20000}-\\u{2A6DF}\\u{2A700}-\\u{2B739}\\u{2B740}-\\u{2B81D}\\u{2B820}-\\u{2CEA1}\\u{2CEB0}-\\u{2EBE0}\\u{2F800}-\\u{2FA1D}\\u{30000}-\\u{3134A}\\u{31350}-\\u{323AF}\\u{F0000}-\\u{FFFFD}\\u{100000}-\\u{10FFFD}]/u;\nconst bidiS1RTL = /[\\u05BE\\u05C0\\u05C3\\u05C6\\u05D0-\\u05EA\\u05EF-\\u05F4\\u0608\\u060B\\u060D\\u061B-\\u064A\\u066D-\\u066F\\u0671-\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u070D\\u070F\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07C0-\\u07EA\\u07F4\\u07F5\\u07FA\\u07FE-\\u0815\\u081A\\u0824\\u0828\\u0830-\\u083E\\u0840-\\u0858\\u085E\\u0860-\\u086A\\u0870-\\u088E\\u08A0-\\u08C9\\u200F\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBC2\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFC\\uFE70-\\uFE74\\uFE76-\\uFEFC\\u{10800}-\\u{10805}\\u{10808}\\u{1080A}-\\u{10835}\\u{10837}\\u{10838}\\u{1083C}\\u{1083F}-\\u{10855}\\u{10857}-\\u{1089E}\\u{108A7}-\\u{108AF}\\u{108E0}-\\u{108F2}\\u{108F4}\\u{108F5}\\u{108FB}-\\u{1091B}\\u{10920}-\\u{10939}\\u{1093F}\\u{10980}-\\u{109B7}\\u{109BC}-\\u{109CF}\\u{109D2}-\\u{10A00}\\u{10A10}-\\u{10A13}\\u{10A15}-\\u{10A17}\\u{10A19}-\\u{10A35}\\u{10A40}-\\u{10A48}\\u{10A50}-\\u{10A58}\\u{10A60}-\\u{10A9F}\\u{10AC0}-\\u{10AE4}\\u{10AEB}-\\u{10AF6}\\u{10B00}-\\u{10B35}\\u{10B40}-\\u{10B55}\\u{10B58}-\\u{10B72}\\u{10B78}-\\u{10B91}\\u{10B99}-\\u{10B9C}\\u{10BA9}-\\u{10BAF}\\u{10C00}-\\u{10C48}\\u{10C80}-\\u{10CB2}\\u{10CC0}-\\u{10CF2}\\u{10CFA}-\\u{10D23}\\u{10E80}-\\u{10EA9}\\u{10EAD}\\u{10EB0}\\u{10EB1}\\u{10F00}-\\u{10F27}\\u{10F30}-\\u{10F45}\\u{10F51}-\\u{10F59}\\u{10F70}-\\u{10F81}\\u{10F86}-\\u{10F89}\\u{10FB0}-\\u{10FCB}\\u{10FE0}-\\u{10FF6}\\u{1E800}-\\u{1E8C4}\\u{1E8C7}-\\u{1E8CF}\\u{1E900}-\\u{1E943}\\u{1E94B}\\u{1E950}-\\u{1E959}\\u{1E95E}\\u{1E95F}\\u{1EC71}-\\u{1ECB4}\\u{1ED01}-\\u{1ED3D}\\u{1EE00}-\\u{1EE03}\\u{1EE05}-\\u{1EE1F}\\u{1EE21}\\u{1EE22}\\u{1EE24}\\u{1EE27}\\u{1EE29}-\\u{1EE32}\\u{1EE34}-\\u{1EE37}\\u{1EE39}\\u{1EE3B}\\u{1EE42}\\u{1EE47}\\u{1EE49}\\u{1EE4B}\\u{1EE4D}-\\u{1EE4F}\\u{1EE51}\\u{1EE52}\\u{1EE54}\\u{1EE57}\\u{1EE59}\\u{1EE5B}\\u{1EE5D}\\u{1EE5F}\\u{1EE61}\\u{1EE62}\\u{1EE64}\\u{1EE67}-\\u{1EE6A}\\u{1EE6C}-\\u{1EE72}\\u{1EE74}-\\u{1EE77}\\u{1EE79}-\\u{1EE7C}\\u{1EE7E}\\u{1EE80}-\\u{1EE89}\\u{1EE8B}-\\u{1EE9B}\\u{1EEA1}-\\u{1EEA3}\\u{1EEA5}-\\u{1EEA9}\\u{1EEAB}-\\u{1EEBB}]/u;\nconst bidiS2 = /^[\\0-\\x08\\x0E-\\x1B!-@\\[-`\\{-\\x84\\x86-\\xA9\\xAB-\\xB4\\xB6-\\xB9\\xBB-\\xBF\\xD7\\xF7\\u02B9\\u02BA\\u02C2-\\u02CF\\u02D2-\\u02DF\\u02E5-\\u02ED\\u02EF-\\u036F\\u0374\\u0375\\u037E\\u0384\\u0385\\u0387\\u03F6\\u0483-\\u0489\\u058A\\u058D-\\u058F\\u0591-\\u05C7\\u05D0-\\u05EA\\u05EF-\\u05F4\\u0600-\\u070D\\u070F-\\u074A\\u074D-\\u07B1\\u07C0-\\u07FA\\u07FD-\\u082D\\u0830-\\u083E\\u0840-\\u085B\\u085E\\u0860-\\u086A\\u0870-\\u088E\\u0890\\u0891\\u0898-\\u0902\\u093A\\u093C\\u0941-\\u0948\\u094D\\u0951-\\u0957\\u0962\\u0963\\u0981\\u09BC\\u09C1-\\u09C4\\u09CD\\u09E2\\u09E3\\u09F2\\u09F3\\u09FB\\u09FE\\u0A01\\u0A02\\u0A3C\\u0A41\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81\\u0A82\\u0ABC\\u0AC1-\\u0AC5\\u0AC7\\u0AC8\\u0ACD\\u0AE2\\u0AE3\\u0AF1\\u0AFA-\\u0AFF\\u0B01\\u0B3C\\u0B3F\\u0B41-\\u0B44\\u0B4D\\u0B55\\u0B56\\u0B62\\u0B63\\u0B82\\u0BC0\\u0BCD\\u0BF3-\\u0BFA\\u0C00\\u0C04\\u0C3C\\u0C3E-\\u0C40\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C78-\\u0C7E\\u0C81\\u0CBC\\u0CCC\\u0CCD\\u0CE2\\u0CE3\\u0D00\\u0D01\\u0D3B\\u0D3C\\u0D41-\\u0D44\\u0D4D\\u0D62\\u0D63\\u0D81\\u0DCA\\u0DD2-\\u0DD4\\u0DD6\\u0E31\\u0E34-\\u0E3A\\u0E3F\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EBC\\u0EC8-\\u0ECE\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39-\\u0F3D\\u0F71-\\u0F7E\\u0F80-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102D-\\u1030\\u1032-\\u1037\\u1039\\u103A\\u103D\\u103E\\u1058\\u1059\\u105E-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108D\\u109D\\u135D-\\u135F\\u1390-\\u1399\\u1400\\u169B\\u169C\\u1712-\\u1714\\u1732\\u1733\\u1752\\u1753\\u1772\\u1773\\u17B4\\u17B5\\u17B7-\\u17BD\\u17C6\\u17C9-\\u17D3\\u17DB\\u17DD\\u17F0-\\u17F9\\u1800-\\u180F\\u1885\\u1886\\u18A9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193B\\u1940\\u1944\\u1945\\u19DE-\\u19FF\\u1A17\\u1A18\\u1A1B\\u1A56\\u1A58-\\u1A5E\\u1A60\\u1A62\\u1A65-\\u1A6C\\u1A73-\\u1A7C\\u1A7F\\u1AB0-\\u1ACE\\u1B00-\\u1B03\\u1B34\\u1B36-\\u1B3A\\u1B3C\\u1B42\\u1B6B-\\u1B73\\u1B80\\u1B81\\u1BA2-\\u1BA5\\u1BA8\\u1BA9\\u1BAB-\\u1BAD\\u1BE6\\u1BE8\\u1BE9\\u1BED\\u1BEF-\\u1BF1\\u1C2C-\\u1C33\\u1C36\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE0\\u1CE2-\\u1CE8\\u1CED\\u1CF4\\u1CF8\\u1CF9\\u1DC0-\\u1DFF\\u1FBD\\u1FBF-\\u1FC1\\u1FCD-\\u1FCF\\u1FDD-\\u1FDF\\u1FED-\\u1FEF\\u1FFD\\u1FFE\\u200B-\\u200D\\u200F-\\u2027\\u202F-\\u205E\\u2060-\\u2064\\u206A-\\u2070\\u2074-\\u207E\\u2080-\\u208E\\u20A0-\\u20C0\\u20D0-\\u20F0\\u2100\\u2101\\u2103-\\u2106\\u2108\\u2109\\u2114\\u2116-\\u2118\\u211E-\\u2123\\u2125\\u2127\\u2129\\u212E\\u213A\\u213B\\u2140-\\u2144\\u214A-\\u214D\\u2150-\\u215F\\u2189-\\u218B\\u2190-\\u2335\\u237B-\\u2394\\u2396-\\u2426\\u2440-\\u244A\\u2460-\\u249B\\u24EA-\\u26AB\\u26AD-\\u27FF\\u2900-\\u2B73\\u2B76-\\u2B95\\u2B97-\\u2BFF\\u2CE5-\\u2CEA\\u2CEF-\\u2CF1\\u2CF9-\\u2CFF\\u2D7F\\u2DE0-\\u2E5D\\u2E80-\\u2E99\\u2E9B-\\u2EF3\\u2F00-\\u2FD5\\u2FF0-\\u2FFB\\u3001-\\u3004\\u3008-\\u3020\\u302A-\\u302D\\u3030\\u3036\\u3037\\u303D-\\u303F\\u3099-\\u309C\\u30A0\\u30FB\\u31C0-\\u31E3\\u321D\\u321E\\u3250-\\u325F\\u327C-\\u327E\\u32B1-\\u32BF\\u32CC-\\u32CF\\u3377-\\u337A\\u33DE\\u33DF\\u33FF\\u4DC0-\\u4DFF\\uA490-\\uA4C6\\uA60D-\\uA60F\\uA66F-\\uA67F\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA700-\\uA721\\uA788\\uA802\\uA806\\uA80B\\uA825\\uA826\\uA828-\\uA82C\\uA838\\uA839\\uA874-\\uA877\\uA8C4\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA951\\uA980-\\uA982\\uA9B3\\uA9B6-\\uA9B9\\uA9BC\\uA9BD\\uA9E5\\uAA29-\\uAA2E\\uAA31\\uAA32\\uAA35\\uAA36\\uAA43\\uAA4C\\uAA7C\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEC\\uAAED\\uAAF6\\uAB6A\\uAB6B\\uABE5\\uABE8\\uABED\\uFB1D-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBC2\\uFBD3-\\uFD8F\\uFD92-\\uFDC7\\uFDCF\\uFDF0-\\uFE19\\uFE20-\\uFE52\\uFE54-\\uFE66\\uFE68-\\uFE6B\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFEFF\\uFF01-\\uFF20\\uFF3B-\\uFF40\\uFF5B-\\uFF65\\uFFE0-\\uFFE6\\uFFE8-\\uFFEE\\uFFF9-\\uFFFD\\u{10101}\\u{10140}-\\u{1018C}\\u{10190}-\\u{1019C}\\u{101A0}\\u{101FD}\\u{102E0}-\\u{102FB}\\u{10376}-\\u{1037A}\\u{10800}-\\u{10805}\\u{10808}\\u{1080A}-\\u{10835}\\u{10837}\\u{10838}\\u{1083C}\\u{1083F}-\\u{10855}\\u{10857}-\\u{1089E}\\u{108A7}-\\u{108AF}\\u{108E0}-\\u{108F2}\\u{108F4}\\u{108F5}\\u{108FB}-\\u{1091B}\\u{1091F}-\\u{10939}\\u{1093F}\\u{10980}-\\u{109B7}\\u{109BC}-\\u{109CF}\\u{109D2}-\\u{10A03}\\u{10A05}\\u{10A06}\\u{10A0C}-\\u{10A13}\\u{10A15}-\\u{10A17}\\u{10A19}-\\u{10A35}\\u{10A38}-\\u{10A3A}\\u{10A3F}-\\u{10A48}\\u{10A50}-\\u{10A58}\\u{10A60}-\\u{10A9F}\\u{10AC0}-\\u{10AE6}\\u{10AEB}-\\u{10AF6}\\u{10B00}-\\u{10B35}\\u{10B39}-\\u{10B55}\\u{10B58}-\\u{10B72}\\u{10B78}-\\u{10B91}\\u{10B99}-\\u{10B9C}\\u{10BA9}-\\u{10BAF}\\u{10C00}-\\u{10C48}\\u{10C80}-\\u{10CB2}\\u{10CC0}-\\u{10CF2}\\u{10CFA}-\\u{10D27}\\u{10D30}-\\u{10D39}\\u{10E60}-\\u{10E7E}\\u{10E80}-\\u{10EA9}\\u{10EAB}-\\u{10EAD}\\u{10EB0}\\u{10EB1}\\u{10EFD}-\\u{10F27}\\u{10F30}-\\u{10F59}\\u{10F70}-\\u{10F89}\\u{10FB0}-\\u{10FCB}\\u{10FE0}-\\u{10FF6}\\u{11001}\\u{11038}-\\u{11046}\\u{11052}-\\u{11065}\\u{11070}\\u{11073}\\u{11074}\\u{1107F}-\\u{11081}\\u{110B3}-\\u{110B6}\\u{110B9}\\u{110BA}\\u{110C2}\\u{11100}-\\u{11102}\\u{11127}-\\u{1112B}\\u{1112D}-\\u{11134}\\u{11173}\\u{11180}\\u{11181}\\u{111B6}-\\u{111BE}\\u{111C9}-\\u{111CC}\\u{111CF}\\u{1122F}-\\u{11231}\\u{11234}\\u{11236}\\u{11237}\\u{1123E}\\u{11241}\\u{112DF}\\u{112E3}-\\u{112EA}\\u{11300}\\u{11301}\\u{1133B}\\u{1133C}\\u{11340}\\u{11366}-\\u{1136C}\\u{11370}-\\u{11374}\\u{11438}-\\u{1143F}\\u{11442}-\\u{11444}\\u{11446}\\u{1145E}\\u{114B3}-\\u{114B8}\\u{114BA}\\u{114BF}\\u{114C0}\\u{114C2}\\u{114C3}\\u{115B2}-\\u{115B5}\\u{115BC}\\u{115BD}\\u{115BF}\\u{115C0}\\u{115DC}\\u{115DD}\\u{11633}-\\u{1163A}\\u{1163D}\\u{1163F}\\u{11640}\\u{11660}-\\u{1166C}\\u{116AB}\\u{116AD}\\u{116B0}-\\u{116B5}\\u{116B7}\\u{1171D}-\\u{1171F}\\u{11722}-\\u{11725}\\u{11727}-\\u{1172B}\\u{1182F}-\\u{11837}\\u{11839}\\u{1183A}\\u{1193B}\\u{1193C}\\u{1193E}\\u{11943}\\u{119D4}-\\u{119D7}\\u{119DA}\\u{119DB}\\u{119E0}\\u{11A01}-\\u{11A06}\\u{11A09}\\u{11A0A}\\u{11A33}-\\u{11A38}\\u{11A3B}-\\u{11A3E}\\u{11A47}\\u{11A51}-\\u{11A56}\\u{11A59}-\\u{11A5B}\\u{11A8A}-\\u{11A96}\\u{11A98}\\u{11A99}\\u{11C30}-\\u{11C36}\\u{11C38}-\\u{11C3D}\\u{11C92}-\\u{11CA7}\\u{11CAA}-\\u{11CB0}\\u{11CB2}\\u{11CB3}\\u{11CB5}\\u{11CB6}\\u{11D31}-\\u{11D36}\\u{11D3A}\\u{11D3C}\\u{11D3D}\\u{11D3F}-\\u{11D45}\\u{11D47}\\u{11D90}\\u{11D91}\\u{11D95}\\u{11D97}\\u{11EF3}\\u{11EF4}\\u{11F00}\\u{11F01}\\u{11F36}-\\u{11F3A}\\u{11F40}\\u{11F42}\\u{11FD5}-\\u{11FF1}\\u{13440}\\u{13447}-\\u{13455}\\u{16AF0}-\\u{16AF4}\\u{16B30}-\\u{16B36}\\u{16F4F}\\u{16F8F}-\\u{16F92}\\u{16FE2}\\u{16FE4}\\u{1BC9D}\\u{1BC9E}\\u{1BCA0}-\\u{1BCA3}\\u{1CF00}-\\u{1CF2D}\\u{1CF30}-\\u{1CF46}\\u{1D167}-\\u{1D169}\\u{1D173}-\\u{1D182}\\u{1D185}-\\u{1D18B}\\u{1D1AA}-\\u{1D1AD}\\u{1D1E9}\\u{1D1EA}\\u{1D200}-\\u{1D245}\\u{1D300}-\\u{1D356}\\u{1D6DB}\\u{1D715}\\u{1D74F}\\u{1D789}\\u{1D7C3}\\u{1D7CE}-\\u{1D7FF}\\u{1DA00}-\\u{1DA36}\\u{1DA3B}-\\u{1DA6C}\\u{1DA75}\\u{1DA84}\\u{1DA9B}-\\u{1DA9F}\\u{1DAA1}-\\u{1DAAF}\\u{1E000}-\\u{1E006}\\u{1E008}-\\u{1E018}\\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6FC}\\u{1F700}-\\u{1F776}\\u{1F77B}-\\u{1F7D9}\\u{1F7E0}-\\u{1F7EB}\\u{1F7F0}\\u{1F800}-\\u{1F80B}\\u{1F810}-\\u{1F847}\\u{1F850}-\\u{1F859}\\u{1F860}-\\u{1F887}\\u{1F890}-\\u{1F8AD}\\u{1F8B0}\\u{1F8B1}\\u{1F900}-\\u{1FA53}\\u{1FA60}-\\u{1FA6D}\\u{1FA70}-\\u{1FA7C}\\u{1FA80}-\\u{1FA88}\\u{1FA90}-\\u{1FABD}\\u{1FABF}-\\u{1FAC5}\\u{1FACE}-\\u{1FADB}\\u{1FAE0}-\\u{1FAE8}\\u{1FAF0}-\\u{1FAF8}\\u{1FB00}-\\u{1FB92}\\u{1FB94}-\\u{1FBCA}\\u{1FBF0}-\\u{1FBF9}\\u{E0001}\\u{E0020}-\\u{E007F}\\u{E0100}-\\u{E01EF}]*$/u;\nconst bidiS3 = /[0-9\\xB2\\xB3\\xB9\\u05BE\\u05C0\\u05C3\\u05C6\\u05D0-\\u05EA\\u05EF-\\u05F4\\u0600-\\u0605\\u0608\\u060B\\u060D\\u061B-\\u064A\\u0660-\\u0669\\u066B-\\u066F\\u0671-\\u06D5\\u06DD\\u06E5\\u06E6\\u06EE-\\u070D\\u070F\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07C0-\\u07EA\\u07F4\\u07F5\\u07FA\\u07FE-\\u0815\\u081A\\u0824\\u0828\\u0830-\\u083E\\u0840-\\u0858\\u085E\\u0860-\\u086A\\u0870-\\u088E\\u0890\\u0891\\u08A0-\\u08C9\\u08E2\\u200F\\u2070\\u2074-\\u2079\\u2080-\\u2089\\u2488-\\u249B\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBC2\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFC\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\u{102E1}-\\u{102FB}\\u{10800}-\\u{10805}\\u{10808}\\u{1080A}-\\u{10835}\\u{10837}\\u{10838}\\u{1083C}\\u{1083F}-\\u{10855}\\u{10857}-\\u{1089E}\\u{108A7}-\\u{108AF}\\u{108E0}-\\u{108F2}\\u{108F4}\\u{108F5}\\u{108FB}-\\u{1091B}\\u{10920}-\\u{10939}\\u{1093F}\\u{10980}-\\u{109B7}\\u{109BC}-\\u{109CF}\\u{109D2}-\\u{10A00}\\u{10A10}-\\u{10A13}\\u{10A15}-\\u{10A17}\\u{10A19}-\\u{10A35}\\u{10A40}-\\u{10A48}\\u{10A50}-\\u{10A58}\\u{10A60}-\\u{10A9F}\\u{10AC0}-\\u{10AE4}\\u{10AEB}-\\u{10AF6}\\u{10B00}-\\u{10B35}\\u{10B40}-\\u{10B55}\\u{10B58}-\\u{10B72}\\u{10B78}-\\u{10B91}\\u{10B99}-\\u{10B9C}\\u{10BA9}-\\u{10BAF}\\u{10C00}-\\u{10C48}\\u{10C80}-\\u{10CB2}\\u{10CC0}-\\u{10CF2}\\u{10CFA}-\\u{10D23}\\u{10D30}-\\u{10D39}\\u{10E60}-\\u{10E7E}\\u{10E80}-\\u{10EA9}\\u{10EAD}\\u{10EB0}\\u{10EB1}\\u{10F00}-\\u{10F27}\\u{10F30}-\\u{10F45}\\u{10F51}-\\u{10F59}\\u{10F70}-\\u{10F81}\\u{10F86}-\\u{10F89}\\u{10FB0}-\\u{10FCB}\\u{10FE0}-\\u{10FF6}\\u{1D7CE}-\\u{1D7FF}\\u{1E800}-\\u{1E8C4}\\u{1E8C7}-\\u{1E8CF}\\u{1E900}-\\u{1E943}\\u{1E94B}\\u{1E950}-\\u{1E959}\\u{1E95E}\\u{1E95F}\\u{1EC71}-\\u{1ECB4}\\u{1ED01}-\\u{1ED3D}\\u{1EE00}-\\u{1EE03}\\u{1EE05}-\\u{1EE1F}\\u{1EE21}\\u{1EE22}\\u{1EE24}\\u{1EE27}\\u{1EE29}-\\u{1EE32}\\u{1EE34}-\\u{1EE37}\\u{1EE39}\\u{1EE3B}\\u{1EE42}\\u{1EE47}\\u{1EE49}\\u{1EE4B}\\u{1EE4D}-\\u{1EE4F}\\u{1EE51}\\u{1EE52}\\u{1EE54}\\u{1EE57}\\u{1EE59}\\u{1EE5B}\\u{1EE5D}\\u{1EE5F}\\u{1EE61}\\u{1EE62}\\u{1EE64}\\u{1EE67}-\\u{1EE6A}\\u{1EE6C}-\\u{1EE72}\\u{1EE74}-\\u{1EE77}\\u{1EE79}-\\u{1EE7C}\\u{1EE7E}\\u{1EE80}-\\u{1EE89}\\u{1EE8B}-\\u{1EE9B}\\u{1EEA1}-\\u{1EEA3}\\u{1EEA5}-\\u{1EEA9}\\u{1EEAB}-\\u{1EEBB}\\u{1F100}-\\u{1F10A}\\u{1FBF0}-\\u{1FBF9}][\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u0898-\\u089F\\u08CA-\\u08E1\\u08E3-\\u0902\\u093A\\u093C\\u0941-\\u0948\\u094D\\u0951-\\u0957\\u0962\\u0963\\u0981\\u09BC\\u09C1-\\u09C4\\u09CD\\u09E2\\u09E3\\u09FE\\u0A01\\u0A02\\u0A3C\\u0A41\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81\\u0A82\\u0ABC\\u0AC1-\\u0AC5\\u0AC7\\u0AC8\\u0ACD\\u0AE2\\u0AE3\\u0AFA-\\u0AFF\\u0B01\\u0B3C\\u0B3F\\u0B41-\\u0B44\\u0B4D\\u0B55\\u0B56\\u0B62\\u0B63\\u0B82\\u0BC0\\u0BCD\\u0C00\\u0C04\\u0C3C\\u0C3E-\\u0C40\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81\\u0CBC\\u0CCC\\u0CCD\\u0CE2\\u0CE3\\u0D00\\u0D01\\u0D3B\\u0D3C\\u0D41-\\u0D44\\u0D4D\\u0D62\\u0D63\\u0D81\\u0DCA\\u0DD2-\\u0DD4\\u0DD6\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EBC\\u0EC8-\\u0ECE\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F71-\\u0F7E\\u0F80-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102D-\\u1030\\u1032-\\u1037\\u1039\\u103A\\u103D\\u103E\\u1058\\u1059\\u105E-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108D\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732\\u1733\\u1752\\u1753\\u1772\\u1773\\u17B4\\u17B5\\u17B7-\\u17BD\\u17C6\\u17C9-\\u17D3\\u17DD\\u180B-\\u180D\\u180F\\u1885\\u1886\\u18A9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193B\\u1A17\\u1A18\\u1A1B\\u1A56\\u1A58-\\u1A5E\\u1A60\\u1A62\\u1A65-\\u1A6C\\u1A73-\\u1A7C\\u1A7F\\u1AB0-\\u1ACE\\u1B00-\\u1B03\\u1B34\\u1B36-\\u1B3A\\u1B3C\\u1B42\\u1B6B-\\u1B73\\u1B80\\u1B81\\u1BA2-\\u1BA5\\u1BA8\\u1BA9\\u1BAB-\\u1BAD\\u1BE6\\u1BE8\\u1BE9\\u1BED\\u1BEF-\\u1BF1\\u1C2C-\\u1C33\\u1C36\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE0\\u1CE2-\\u1CE8\\u1CED\\u1CF4\\u1CF8\\u1CF9\\u1DC0-\\u1DFF\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302D\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA825\\uA826\\uA82C\\uA8C4\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA951\\uA980-\\uA982\\uA9B3\\uA9B6-\\uA9B9\\uA9BC\\uA9BD\\uA9E5\\uAA29-\\uAA2E\\uAA31\\uAA32\\uAA35\\uAA36\\uAA43\\uAA4C\\uAA7C\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEC\\uAAED\\uAAF6\\uABE5\\uABE8\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\u{101FD}\\u{102E0}\\u{10376}-\\u{1037A}\\u{10A01}-\\u{10A03}\\u{10A05}\\u{10A06}\\u{10A0C}-\\u{10A0F}\\u{10A38}-\\u{10A3A}\\u{10A3F}\\u{10AE5}\\u{10AE6}\\u{10D24}-\\u{10D27}\\u{10EAB}\\u{10EAC}\\u{10EFD}-\\u{10EFF}\\u{10F46}-\\u{10F50}\\u{10F82}-\\u{10F85}\\u{11001}\\u{11038}-\\u{11046}\\u{11070}\\u{11073}\\u{11074}\\u{1107F}-\\u{11081}\\u{110B3}-\\u{110B6}\\u{110B9}\\u{110BA}\\u{110C2}\\u{11100}-\\u{11102}\\u{11127}-\\u{1112B}\\u{1112D}-\\u{11134}\\u{11173}\\u{11180}\\u{11181}\\u{111B6}-\\u{111BE}\\u{111C9}-\\u{111CC}\\u{111CF}\\u{1122F}-\\u{11231}\\u{11234}\\u{11236}\\u{11237}\\u{1123E}\\u{11241}\\u{112DF}\\u{112E3}-\\u{112EA}\\u{11300}\\u{11301}\\u{1133B}\\u{1133C}\\u{11340}\\u{11366}-\\u{1136C}\\u{11370}-\\u{11374}\\u{11438}-\\u{1143F}\\u{11442}-\\u{11444}\\u{11446}\\u{1145E}\\u{114B3}-\\u{114B8}\\u{114BA}\\u{114BF}\\u{114C0}\\u{114C2}\\u{114C3}\\u{115B2}-\\u{115B5}\\u{115BC}\\u{115BD}\\u{115BF}\\u{115C0}\\u{115DC}\\u{115DD}\\u{11633}-\\u{1163A}\\u{1163D}\\u{1163F}\\u{11640}\\u{116AB}\\u{116AD}\\u{116B0}-\\u{116B5}\\u{116B7}\\u{1171D}-\\u{1171F}\\u{11722}-\\u{11725}\\u{11727}-\\u{1172B}\\u{1182F}-\\u{11837}\\u{11839}\\u{1183A}\\u{1193B}\\u{1193C}\\u{1193E}\\u{11943}\\u{119D4}-\\u{119D7}\\u{119DA}\\u{119DB}\\u{119E0}\\u{11A01}-\\u{11A06}\\u{11A09}\\u{11A0A}\\u{11A33}-\\u{11A38}\\u{11A3B}-\\u{11A3E}\\u{11A47}\\u{11A51}-\\u{11A56}\\u{11A59}-\\u{11A5B}\\u{11A8A}-\\u{11A96}\\u{11A98}\\u{11A99}\\u{11C30}-\\u{11C36}\\u{11C38}-\\u{11C3D}\\u{11C92}-\\u{11CA7}\\u{11CAA}-\\u{11CB0}\\u{11CB2}\\u{11CB3}\\u{11CB5}\\u{11CB6}\\u{11D31}-\\u{11D36}\\u{11D3A}\\u{11D3C}\\u{11D3D}\\u{11D3F}-\\u{11D45}\\u{11D47}\\u{11D90}\\u{11D91}\\u{11D95}\\u{11D97}\\u{11EF3}\\u{11EF4}\\u{11F00}\\u{11F01}\\u{11F36}-\\u{11F3A}\\u{11F40}\\u{11F42}\\u{13440}\\u{13447}-\\u{13455}\\u{16AF0}-\\u{16AF4}\\u{16B30}-\\u{16B36}\\u{16F4F}\\u{16F8F}-\\u{16F92}\\u{16FE4}\\u{1BC9D}\\u{1BC9E}\\u{1CF00}-\\u{1CF2D}\\u{1CF30}-\\u{1CF46}\\u{1D167}-\\u{1D169}\\u{1D17B}-\\u{1D182}\\u{1D185}-\\u{1D18B}\\u{1D1AA}-\\u{1D1AD}\\u{1D242}-\\u{1D244}\\u{1DA00}-\\u{1DA36}\\u{1DA3B}-\\u{1DA6C}\\u{1DA75}\\u{1DA84}\\u{1DA9B}-\\u{1DA9F}\\u{1DAA1}-\\u{1DAAF}\\u{1E000}-\\u{1E006}\\u{1E008}-\\u{1E018}\\u{1E01B}-\\u{1E021}\\u{1E023}\\u{1E024}\\u{1E026}-\\u{1E02A}\\u{1E08F}\\u{1E130}-\\u{1E136}\\u{1E2AE}\\u{1E2EC}-\\u{1E2EF}\\u{1E4EC}-\\u{1E4EF}\\u{1E8D0}-\\u{1E8D6}\\u{1E944}-\\u{1E94A}\\u{E0100}-\\u{E01EF}]*$/u;\nconst bidiS4EN = /[0-9\\xB2\\xB3\\xB9\\u06F0-\\u06F9\\u2070\\u2074-\\u2079\\u2080-\\u2089\\u2488-\\u249B\\uFF10-\\uFF19\\u{102E1}-\\u{102FB}\\u{1D7CE}-\\u{1D7FF}\\u{1F100}-\\u{1F10A}\\u{1FBF0}-\\u{1FBF9}]/u;\nconst bidiS4AN = /[\\u0600-\\u0605\\u0660-\\u0669\\u066B\\u066C\\u06DD\\u0890\\u0891\\u08E2\\u{10D30}-\\u{10D39}\\u{10E60}-\\u{10E7E}]/u;\nconst bidiS5 = /^[\\0-\\x08\\x0E-\\x1B!-\\x84\\x86-\\u0377\\u037A-\\u037F\\u0384-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u052F\\u0531-\\u0556\\u0559-\\u058A\\u058D-\\u058F\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0606\\u0607\\u0609\\u060A\\u060C\\u060E-\\u061A\\u064B-\\u065F\\u066A\\u0670\\u06D6-\\u06DC\\u06DE-\\u06E4\\u06E7-\\u06ED\\u06F0-\\u06F9\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07F6-\\u07F9\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u0898-\\u089F\\u08CA-\\u08E1\\u08E3-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09FE\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A76\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AF1\\u0AF9-\\u0AFF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B55-\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B77\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC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5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u137C\\u1380-\\u1399\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1400-\\u167F\\u1681-\\u169C\\u16A0-\\u16F8\\u1700-\\u1715\\u171F-\\u1736\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17DD\\u17E0-\\u17E9\\u17F0-\\u17F9\\u1800-\\u1819\\u1820-\\u1878\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1940\\u1944-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19DA\\u19DE-\\u1A1B\\u1A1E-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA0-\\u1AAD\\u1AB0-\\u1ACE\\u1B00-\\u1B4C\\u1B50-\\u1B7E\\u1B80-\\u1BF3\\u1BFC-\\u1C37\\u1C3B-\\u1C49\\u1C4D-\\u1C88\\u1C90-\\u1CBA\\u1CBD-\\u1CC7\\u1CD0-\\u1CFA\\u1D00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FC4\\u1FC6-\\u1FD3\\u1FD6-\\u1FDB\\u1FDD-\\u1FEF\\u1FF2-\\u1FF4\\u1FF6-\\u1FFE\\u200B-\\u200E\\u2010-\\u2027\\u202F-\\u205E\\u2060-\\u2064\\u206A-\\u2071\\u2074-\\u208E\\u2090-\\u209C\\u20A0-\\u20C0\\u20D0-\\u20F0\\u2100-\\u218B\\u2190-\\u2426\\u2440-\\u244A\\u2460-\\u2B73\\u2B76-\\u2B95\\u2B97-\\u2CF3\\u2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E6\\uFFE8-\\uFFEE\\uFFF9-\\uFFFD\\u{10000}-\\u{1000B}\\u{1000D}-\\u{10026}\\u{10028}-\\u{1003A}\\u{1003C}\\u{1003D}\\u{1003F}-\\u{1004D}\\u{10050}-\\u{1005D}\\u{10080}-\\u{100FA}\\u{10100}-\\u{10102}\\u{10107}-\\u{10133}\\u{10137}-\\u{1018E}\\u{10190}-\\u{1019C}\\u{101A0}\\u{101D0}-\\u{101FD}\\u{10280}-\\u{1029C}\\u{102A0}-\\u{102D0}\\u{102E0}-\\u{102FB}\\u{10300}-\\u{10323}\\u{1032D}-\\u{1034A}\\u{10350}-\\u{1037A}\\u{10380}-\\u{1039D}\\u{1039F}-\\u{103C3}\\u{103C8}-\\u{103D5}\\u{10400}-\\u{1049D}\\u{104A0}-\\u{104A9}\\u{104B0}-\\u{104D3}\\u{104D8}-\\u{104FB}\\u{10500}-\\u{10527}\\u{10530}-\\u{10563}\\u{1056F}-\\u{1057A}\\u{1057C}-\\u{1058A}\\u{1058C}-\\u{10592}\\u{10594}\\u{10595}\\u{10597}-\\u{105A1}\\u{105A3}-\\u{105B1}\\u{105B3}-\\u{105B9}\\u{105BB}\\u{105BC}\\u{10600}-\\u{10736}\\u{10740}-\\u{10755}\\u{10760}-\\u{10767}\\u{10780}-\\u{10785}\\u{10787}-\\u{107B0}\\u{107B2}-\\u{107BA}\\u{1091F}\\u{10A01}-\\u{10A03}\\u{10A05}\\u{10A06}\\u{10A0C}-\\u{10A0F}\\u{10A38}-\\u{10A3A}\\u{10A3F}\\u{10AE5}\\u{10AE6}\\u{10B39}-\\u{10B3F}\\u{10D24}-\\u{10D27}\\u{10EAB}\\u{10EAC}\\u{10EFD}-\\u{10EFF}\\u{10F46}-\\u{10F50}\\u{10F82}-\\u{10F85}\\u{11000}-\\u{1104D}\\u{11052}-\\u{11075}\\u{1107F}-\\u{110C2}\\u{110CD}\\u{110D0}-\\u{110E8}\\u{110F0}-\\u{110F9}\\u{11100}-\\u{11134}\\u{11136}-\\u{11147}\\u{11150}-\\u{11176}\\u{11180}-\\u{111DF}\\u{111E1}-\\u{111F4}\\u{11200}-\\u{11211}\\u{11213}-\\u{11241}\\u{11280}-\\u{11286}\\u{11288}\\u{1128A}-\\u{1128D}\\u{1128F}-\\u{1129D}\\u{1129F}-\\u{112A9}\\u{112B0}-\\u{112EA}\\u{112F0}-\\u{112F9}\\u{11300}-\\u{11303}\\u{11305}-\\u{1130C}\\u{1130F}\\u{11310}\\u{11313}-\\u{11328}\\u{1132A}-\\u{11330}\\u{11332}\\u{11333}\\u{11335}-\\u{11339}\\u{1133B}-\\u{11344}\\u{11347}\\u{11348}\\u{1134B}-\\u{1134D}\\u{11350}\\u{11357}\\u{1135D}-\\u{11363}\\u{11366}-\\u{1136C}\\u{11370}-\\u{11374}\\u{11400}-\\u{1145B}\\u{1145D}-\\u{11461}\\u{11480}-\\u{114C7}\\u{114D0}-\\u{114D9}\\u{11580}-\\u{115B5}\\u{115B8}-\\u{115DD}\\u{11600}-\\u{11644}\\u{11650}-\\u{11659}\\u{11660}-\\u{1166C}\\u{11680}-\\u{116B9}\\u{116C0}-\\u{116C9}\\u{11700}-\\u{1171A}\\u{1171D}-\\u{1172B}\\u{11730}-\\u{11746}\\u{11800}-\\u{1183B}\\u{118A0}-\\u{118F2}\\u{118FF}-\\u{11906}\\u{11909}\\u{1190C}-\\u{11913}\\u{11915}\\u{11916}\\u{11918}-\\u{11935}\\u{11937}\\u{11938}\\u{1193B}-\\u{11946}\\u{11950}-\\u{11959}\\u{119A0}-\\u{119A7}\\u{119AA}-\\u{119D7}\\u{119DA}-\\u{119E4}\\u{11A00}-\\u{11A47}\\u{11A50}-\\u{11AA2}\\u{11AB0}-\\u{11AF8}\\u{11B00}-\\u{11B09}\\u{11C00}-\\u{11C08}\\u{11C0A}-\\u{11C36}\\u{11C38}-\\u{11C45}\\u{11C50}-\\u{11C6C}\\u{11C70}-\\u{11C8F}\\u{11C92}-\\u{11CA7}\\u{11CA9}-\\u{11CB6}\\u{11D00}-\\u{11D06}\\u{11D08}\\u{11D09}\\u{11D0B}-\\u{11D36}\\u{11D3A}\\u{11D3C}\\u{11D3D}\\u{11D3F}-\\u{11D47}\\u{11D50}-\\u{11D59}\\u{11D60}-\\u{11D65}\\u{11D67}\\u{11D68}\\u{11D6A}-\\u{11D8E}\\u{11D90}\\u{11D91}\\u{11D93}-\\u{11D98}\\u{11DA0}-\\u{11DA9}\\u{11EE0}-\\u{11EF8}\\u{11F00}-\\u{11F10}\\u{11F12}-\\u{11F3A}\\u{11F3E}-\\u{11F59}\\u{11FB0}\\u{11FC0}-\\u{11FF1}\\u{11FFF}-\\u{12399}\\u{12400}-\\u{1246E}\\u{12470}-\\u{12474}\\u{12480}-\\u{12543}\\u{12F90}-\\u{12FF2}\\u{13000}-\\u{13455}\\u{14400}-\\u{14646}\\u{16800}-\\u{16A38}\\u{16A40}-\\u{16A5E}\\u{16A60}-\\u{16A69}\\u{16A6E}-\\u{16ABE}\\u{16AC0}-\\u{16AC9}\\u{16AD0}-\\u{16AED}\\u{16AF0}-\\u{16AF5}\\u{16B00}-\\u{16B45}\\u{16B50}-\\u{16B59}\\u{16B5B}-\\u{16B61}\\u{16B63}-\\u{16B77}\\u{16B7D}-\\u{16B8F}\\u{16E40}-\\u{16E9A}\\u{16F00}-\\u{16F4A}\\u{16F4F}-\\u{16F87}\\u{16F8F}-\\u{16F9F}\\u{16FE0}-\\u{16FE4}\\u{16FF0}\\u{16FF1}\\u{17000}-\\u{187F7}\\u{18800}-\\u{18CD5}\\u{18D00}-\\u{18D08}\\u{1AFF0}-\\u{1AFF3}\\u{1AFF5}-\\u{1AFFB}\\u{1AFFD}\\u{1AFFE}\\u{1B000}-\\u{1B122}\\u{1B132}\\u{1B150}-\\u{1B152}\\u{1B155}\\u{1B164}-\\u{1B167}\\u{1B170}-\\u{1B2FB}\\u{1BC00}-\\u{1BC6A}\\u{1BC70}-\\u{1BC7C}\\u{1BC80}-\\u{1BC88}\\u{1BC90}-\\u{1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u{1E8D0}-\\u{1E8D6}\\u{1E944}-\\u{1E94A}\\u{1EEF0}\\u{1EEF1}\\u{1F000}-\\u{1F02B}\\u{1F030}-\\u{1F093}\\u{1F0A0}-\\u{1F0AE}\\u{1F0B1}-\\u{1F0BF}\\u{1F0C1}-\\u{1F0CF}\\u{1F0D1}-\\u{1F0F5}\\u{1F100}-\\u{1F1AD}\\u{1F1E6}-\\u{1F202}\\u{1F210}-\\u{1F23B}\\u{1F240}-\\u{1F248}\\u{1F250}\\u{1F251}\\u{1F260}-\\u{1F265}\\u{1F300}-\\u{1F6D7}\\u{1F6DC}-\\u{1F6EC}\\u{1F6F0}-\\u{1F6FC}\\u{1F700}-\\u{1F776}\\u{1F77B}-\\u{1F7D9}\\u{1F7E0}-\\u{1F7EB}\\u{1F7F0}\\u{1F800}-\\u{1F80B}\\u{1F810}-\\u{1F847}\\u{1F850}-\\u{1F859}\\u{1F860}-\\u{1F887}\\u{1F890}-\\u{1F8AD}\\u{1F8B0}\\u{1F8B1}\\u{1F900}-\\u{1FA53}\\u{1FA60}-\\u{1FA6D}\\u{1FA70}-\\u{1FA7C}\\u{1FA80}-\\u{1FA88}\\u{1FA90}-\\u{1FABD}\\u{1FABF}-\\u{1FAC5}\\u{1FACE}-\\u{1FADB}\\u{1FAE0}-\\u{1FAE8}\\u{1FAF0}-\\u{1FAF8}\\u{1FB00}-\\u{1FB92}\\u{1FB94}-\\u{1FBCA}\\u{1FBF0}-\\u{1FBF9}\\u{20000}-\\u{2A6DF}\\u{2A700}-\\u{2B739}\\u{2B740}-\\u{2B81D}\\u{2B820}-\\u{2CEA1}\\u{2CEB0}-\\u{2EBE0}\\u{2F800}-\\u{2FA1D}\\u{30000}-\\u{3134A}\\u{31350}-\\u{323AF}\\u{E0001}\\u{E0020}-\\u{E007F}\\u{E0100}-\\u{E01EF}\\u{F0000}-\\u{FFFFD}\\u{100000}-\\u{10FFFD}]*$/u;\nconst bidiS6 = /[0-9A-Za-z\\xAA\\xB2\\xB3\\xB5\\xB9\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02B8\\u02BB-\\u02C1\\u02D0\\u02D1\\u02E0-\\u02E4\\u02EE\\u0370-\\u0373\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0482\\u048A-\\u052F\\u0531-\\u0556\\u0559-\\u0589\\u06F0-\\u06F9\\u0903-\\u0939\\u093B\\u093D-\\u0940\\u0949-\\u094C\\u094E-\\u0950\\u0958-\\u0961\\u0964-\\u0980\\u0982\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD-\\u09C0\\u09C7\\u09C8\\u09CB\\u09CC\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E1\\u09E6-\\u09F1\\u09F4-\\u09FA\\u09FC\\u09FD\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3E-\\u0A40\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A6F\\u0A72-\\u0A74\\u0A76\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD-\\u0AC0\\u0AC9\\u0ACB\\u0ACC\\u0AD0\\u0AE0\\u0AE1\\u0AE6-\\u0AF0\\u0AF9\\u0B02\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B3E\\u0B40\\u0B47\\u0B48\\u0B4B\\u0B4C\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B66-\\u0B77\\u0B83\\u0B85-\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\\u0F36\\u0F38\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F7F\\u0F85\\u0F88-\\u0F8C\\u0FBE-\\u0FC5\\u0FC7-\\u0FCC\\u0FCE-\\u0FDA\\u1000-\\u102C\\u1031\\u1038\\u103B\\u103C\\u103F-\\u1057\\u105A-\\u105D\\u1061-\\u1070\\u1075-\\u1081\\u1083\\u1084\\u1087-\\u108C\\u108E-\\u109C\\u109E-\\u10C5\\u10C7\\u10CD\\u10D0-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1360-\\u137C\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u167F\\u1681-\\u169A\\u16A0-\\u16F8\\u1700-\\u1711\\u1715\\u171F-\\u1731\\u1734-\\u1736\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17B6\\u17BE-\\u17C5\\u17C7\\u17C8\\u17D4-\\u17DA\\u17DC\\u17E0-\\u17E9\\u1810-\\u1819\\u1820-\\u1878\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1923-\\u1926\\u1929-\\u192B\\u1930\\u1931\\u1933-\\u1938\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19DA\\u1A00-\\u1A16\\u1A19\\u1A1A\\u1A1E-\\u1A55\\u1A57\\u1A61\\u1A63\\u1A64\\u1A6D-\\u1A72\\u1A80-\\u1A89\\u1A90-\\u1A99\\u1AA0-\\u1AAD\\u1B04-\\u1B33\\u1B35\\u1B3B\\u1B3D-\\u1B41\\u1B43-\\u1B4C\\u1B50-\\u1B6A\\u1B74-\\u1B7E\\u1B82-\\u1BA1\\u1BA6\\u1BA7\\u1BAA\\u1BAE-\\u1BE5\\u1BE7\\u1BEA-\\u1BEC\\u1BEE\\u1BF2\\u1BF3\\u1BFC-\\u1C2B\\u1C34\\u1C35\\u1C3B-\\u1C49\\u1C4D-\\u1C88\\u1C90-\\u1CBA\\u1CBD-\\u1CC7\\u1CD3\\u1CE1\\u1CE9-\\u1CEC\\u1CEE-\\u1CF3\\u1CF5-\\u1CF7\\u1CFA\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200E\\u2070\\u2071\\u2074-\\u2079\\u207F-\\u2089\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u214F\\u2160-\\u2188\\u2336-\\u237A\\u2395\\u2488-\\u24E9\\u26AC\\u2800-\\u28FF\\u2C00-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D70\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u3005-\\u3007\\u3021-\\u3029\\u302E\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u3190-\\u31BF\\u31F0-\\u321C\\u3220-\\u324F\\u3260-\\u327B\\u327F-\\u32B0\\u32C0-\\u32CB\\u32D0-\\u3376\\u337B-\\u33DD\\u33E0-\\u33FE\\u3400-\\u4DBF\\u4E00-\\uA48C\\uA4D0-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66E\\uA680-\\uA69D\\uA6A0-\\uA6EF\\uA6F2-\\uA6F7\\uA722-\\uA787\\uA789-\\uA7CA\\uA7D0\\uA7D1\\uA7D3\\uA7D5-\\uA7D9\\uA7F2-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA824\\uA827\\uA830-\\uA837\\uA840-\\uA873\\uA880-\\uA8C3\\uA8CE-\\uA8D9\\uA8F2-\\uA8FE\\uA900-\\uA925\\uA92E-\\uA946\\uA952\\uA953\\uA95F-\\uA97C\\uA983-\\uA9B2\\uA9B4\\uA9B5\\uA9BA\\uA9BB\\uA9BE-\\uA9CD\\uA9CF-\\uA9D9\\uA9DE-\\uA9E4\\uA9E6-\\uA9FE\\uAA00-\\uAA28\\uAA2F\\uAA30\\uAA33\\uAA34\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA4D\\uAA50-\\uAA59\\uAA5C-\\uAA7B\\uAA7D-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAAEB\\uAAEE-\\uAAF5\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB69\\uAB70-\\uABE4\\uABE6\\uABE7\\uABE9-\\uABEC\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uD800-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC\\u{10000}-\\u{1000B}\\u{1000D}-\\u{10026}\\u{10028}-\\u{1003A}\\u{1003C}\\u{1003D}\\u{1003F}-\\u{1004D}\\u{10050}-\\u{1005D}\\u{10080}-\\u{100FA}\\u{10100}\\u{10102}\\u{10107}-\\u{10133}\\u{10137}-\\u{1013F}\\u{1018D}\\u{1018E}\\u{101D0}-\\u{101FC}\\u{10280}-\\u{1029C}\\u{102A0}-\\u{102D0}\\u{102E1}-\\u{102FB}\\u{10300}-\\u{10323}\\u{1032D}-\\u{1034A}\\u{10350}-\\u{10375}\\u{10380}-\\u{1039D}\\u{1039F}-\\u{103C3}\\u{103C8}-\\u{103D5}\\u{10400}-\\u{1049D}\\u{104A0}-\\u{104A9}\\u{104B0}-\\u{104D3}\\u{104D8}-\\u{104FB}\\u{10500}-\\u{10527}\\u{10530}-\\u{10563}\\u{1056F}-\\u{1057A}\\u{1057C}-\\u{1058A}\\u{1058C}-\\u{10592}\\u{10594}\\u{10595}\\u{10597}-\\u{105A1}\\u{105A3}-\\u{105B1}\\u{105B3}-\\u{105B9}\\u{105BB}\\u{105BC}\\u{10600}-\\u{10736}\\u{10740}-\\u{10755}\\u{10760}-\\u{10767}\\u{10780}-\\u{10785}\\u{10787}-\\u{107B0}\\u{107B2}-\\u{107BA}\\u{11000}\\u{11002}-\\u{11037}\\u{11047}-\\u{1104D}\\u{11066}-\\u{1106F}\\u{11071}\\u{11072}\\u{11075}\\u{11082}-\\u{110B2}\\u{110B7}\\u{110B8}\\u{110BB}-\\u{110C1}\\u{110CD}\\u{110D0}-\\u{110E8}\\u{110F0}-\\u{110F9}\\u{11103}-\\u{11126}\\u{1112C}\\u{11136}-\\u{11147}\\u{11150}-\\u{11172}\\u{11174}-\\u{11176}\\u{11182}-\\u{111B5}\\u{111BF}-\\u{111C8}\\u{111CD}\\u{111CE}\\u{111D0}-\\u{111DF}\\u{111E1}-\\u{111F4}\\u{11200}-\\u{11211}\\u{11213}-\\u{1122E}\\u{11232}\\u{11233}\\u{11235}\\u{11238}-\\u{1123D}\\u{1123F}\\u{11240}\\u{11280}-\\u{11286}\\u{11288}\\u{1128A}-\\u{1128D}\\u{1128F}-\\u{1129D}\\u{1129F}-\\u{112A9}\\u{112B0}-\\u{112DE}\\u{112E0}-\\u{112E2}\\u{112F0}-\\u{112F9}\\u{11302}\\u{11303}\\u{11305}-\\u{1130C}\\u{1130F}\\u{11310}\\u{11313}-\\u{11328}\\u{1132A}-\\u{11330}\\u{11332}\\u{11333}\\u{11335}-\\u{11339}\\u{1133D}-\\u{1133F}\\u{11341}-\\u{11344}\\u{11347}\\u{11348}\\u{1134B}-\\u{1134D}\\u{11350}\\u{11357}\\u{1135D}-\\u{11363}\\u{11400}-\\u{11437}\\u{11440}\\u{11441}\\u{11445}\\u{11447}-\\u{1145B}\\u{1145D}\\u{1145F}-\\u{11461}\\u{11480}-\\u{114B2}\\u{114B9}\\u{114BB}-\\u{114BE}\\u{114C1}\\u{114C4}-\\u{114C7}\\u{114D0}-\\u{114D9}\\u{11580}-\\u{115B1}\\u{115B8}-\\u{115BB}\\u{115BE}\\u{115C1}-\\u{115DB}\\u{11600}-\\u{11632}\\u{1163B}\\u{1163C}\\u{1163E}\\u{11641}-\\u{11644}\\u{11650}-\\u{11659}\\u{11680}-\\u{116AA}\\u{116AC}\\u{116AE}\\u{116AF}\\u{116B6}\\u{116B8}\\u{116B9}\\u{116C0}-\\u{116C9}\\u{11700}-\\u{1171A}\\u{11720}\\u{11721}\\u{11726}\\u{11730}-\\u{11746}\\u{11800}-\\u{1182E}\\u{11838}\\u{1183B}\\u{118A0}-\\u{118F2}\\u{118FF}-\\u{11906}\\u{11909}\\u{1190C}-\\u{11913}\\u{11915}\\u{11916}\\u{11918}-\\u{11935}\\u{11937}\\u{11938}\\u{1193D}\\u{1193F}-\\u{11942}\\u{11944}-\\u{11946}\\u{11950}-\\u{11959}\\u{119A0}-\\u{119A7}\\u{119AA}-\\u{119D3}\\u{119DC}-\\u{119DF}\\u{119E1}-\\u{119E4}\\u{11A00}\\u{11A07}\\u{11A08}\\u{11A0B}-\\u{11A32}\\u{11A39}\\u{11A3A}\\u{11A3F}-\\u{11A46}\\u{11A50}\\u{11A57}\\u{11A58}\\u{11A5C}-\\u{11A89}\\u{11A97}\\u{11A9A}-\\u{11AA2}\\u{11AB0}-\\u{11AF8}\\u{11B00}-\\u{11B09}\\u{11C00}-\\u{11C08}\\u{11C0A}-\\u{11C2F}\\u{11C3E}-\\u{11C45}\\u{11C50}-\\u{11C6C}\\u{11C70}-\\u{11C8F}\\u{11CA9}\\u{11CB1}\\u{11CB4}\\u{11D00}-\\u{11D06}\\u{11D08}\\u{11D09}\\u{11D0B}-\\u{11D30}\\u{11D46}\\u{11D50}-\\u{11D59}\\u{11D60}-\\u{11D65}\\u{11D67}\\u{11D68}\\u{11D6A}-\\u{11D8E}\\u{11D93}\\u{11D94}\\u{11D96}\\u{11D98}\\u{11DA0}-\\u{11DA9}\\u{11EE0}-\\u{11EF2}\\u{11EF5}-\\u{11EF8}\\u{11F02}-\\u{11F10}\\u{11F12}-\\u{11F35}\\u{11F3E}\\u{11F3F}\\u{11F41}\\u{11F43}-\\u{11F59}\\u{11FB0}\\u{11FC0}-\\u{11FD4}\\u{11FFF}-\\u{12399}\\u{12400}-\\u{1246E}\\u{12470}-\\u{12474}\\u{12480}-\\u{12543}\\u{12F90}-\\u{12FF2}\\u{13000}-\\u{1343F}\\u{13441}-\\u{13446}\\u{14400}-\\u{14646}\\u{16800}-\\u{16A38}\\u{16A40}-\\u{16A5E}\\u{16A60}-\\u{16A69}\\u{16A6E}-\\u{16ABE}\\u{16AC0}-\\u{16AC9}\\u{16AD0}-\\u{16AED}\\u{16AF5}\\u{16B00}-\\u{16B2F}\\u{16B37}-\\u{16B45}\\u{16B50}-\\u{16B59}\\u{16B5B}-\\u{16B61}\\u{16B63}-\\u{16B77}\\u{16B7D}-\\u{16B8F}\\u{16E40}-\\u{16E9A}\\u{16F00}-\\u{16F4A}\\u{16F50}-\\u{16F87}\\u{16F93}-\\u{16F9F}\\u{16FE0}\\u{16FE1}\\u{16FE3}\\u{16FF0}\\u{16FF1}\\u{17000}-\\u{187F7}\\u{18800}-\\u{18CD5}\\u{18D00}-\\u{18D08}\\u{1AFF0}-\\u{1AFF3}\\u{1AFF5}-\\u{1AFFB}\\u{1AFFD}\\u{1AFFE}\\u{1B000}-\\u{1B122}\\u{1B132}\\u{1B150}-\\u{1B152}\\u{1B155}\\u{1B164}-\\u{1B167}\\u{1B170}-\\u{1B2FB}\\u{1BC00}-\\u{1BC6A}\\u{1BC70}-\\u{1BC7C}\\u{1BC80}-\\u{1BC88}\\u{1BC90}-\\u{1BC99}\\u{1BC9C}\\u{1BC9F}\\u{1CF50}-\\u{1CFC3}\\u{1D000}-\\u{1D0F5}\\u{1D100}-\\u{1D126}\\u{1D129}-\\u{1D166}\\u{1D16A}-\\u{1D172}\\u{1D183}\\u{1D184}\\u{1D18C}-\\u{1D1A9}\\u{1D1AE}-\\u{1D1E8}\\u{1D2C0}-\\u{1D2D3}\\u{1D2E0}-\\u{1D2F3}\\u{1D360}-\\u{1D378}\\u{1D400}-\\u{1D454}\\u{1D456}-\\u{1D49C}\\u{1D49E}\\u{1D49F}\\u{1D4A2}\\u{1D4A5}\\u{1D4A6}\\u{1D4A9}-\\u{1D4AC}\\u{1D4AE}-\\u{1D4B9}\\u{1D4BB}\\u{1D4BD}-\\u{1D4C3}\\u{1D4C5}-\\u{1D505}\\u{1D507}-\\u{1D50A}\\u{1D50D}-\\u{1D514}\\u{1D516}-\\u{1D51C}\\u{1D51E}-\\u{1D539}\\u{1D53B}-\\u{1D53E}\\u{1D540}-\\u{1D544}\\u{1D546}\\u{1D54A}-\\u{1D550}\\u{1D552}-\\u{1D6A5}\\u{1D6A8}-\\u{1D6DA}\\u{1D6DC}-\\u{1D714}\\u{1D716}-\\u{1D74E}\\u{1D750}-\\u{1D788}\\u{1D78A}-\\u{1D7C2}\\u{1D7C4}-\\u{1D7CB}\\u{1D7CE}-\\u{1D9FF}\\u{1DA37}-\\u{1DA3A}\\u{1DA6D}-\\u{1DA74}\\u{1DA76}-\\u{1DA83}\\u{1DA85}-\\u{1DA8B}\\u{1DF00}-\\u{1DF1E}\\u{1DF25}-\\u{1DF2A}\\u{1E030}-\\u{1E06D}\\u{1E100}-\\u{1E12C}\\u{1E137}-\\u{1E13D}\\u{1E140}-\\u{1E149}\\u{1E14E}\\u{1E14F}\\u{1E290}-\\u{1E2AD}\\u{1E2C0}-\\u{1E2EB}\\u{1E2F0}-\\u{1E2F9}\\u{1E4D0}-\\u{1E4EB}\\u{1E4F0}-\\u{1E4F9}\\u{1E7E0}-\\u{1E7E6}\\u{1E7E8}-\\u{1E7EB}\\u{1E7ED}\\u{1E7EE}\\u{1E7F0}-\\u{1E7FE}\\u{1F100}-\\u{1F10A}\\u{1F110}-\\u{1F12E}\\u{1F130}-\\u{1F169}\\u{1F170}-\\u{1F1AC}\\u{1F1E6}-\\u{1F202}\\u{1F210}-\\u{1F23B}\\u{1F240}-\\u{1F248}\\u{1F250}\\u{1F251}\\u{1FBF0}-\\u{1FBF9}\\u{20000}-\\u{2A6DF}\\u{2A700}-\\u{2B739}\\u{2B740}-\\u{2B81D}\\u{2B820}-\\u{2CEA1}\\u{2CEB0}-\\u{2EBE0}\\u{2F800}-\\u{2FA1D}\\u{30000}-\\u{3134A}\\u{31350}-\\u{323AF}\\u{F0000}-\\u{FFFFD}\\u{100000}-\\u{10FFFD}][\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u0898-\\u089F\\u08CA-\\u08E1\\u08E3-\\u0902\\u093A\\u093C\\u0941-\\u0948\\u094D\\u0951-\\u0957\\u0962\\u0963\\u0981\\u09BC\\u09C1-\\u09C4\\u09CD\\u09E2\\u09E3\\u09FE\\u0A01\\u0A02\\u0A3C\\u0A41\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81\\u0A82\\u0ABC\\u0AC1-\\u0AC5\\u0AC7\\u0AC8\\u0ACD\\u0AE2\\u0AE3\\u0AFA-\\u0AFF\\u0B01\\u0B3C\\u0B3F\\u0B41-\\u0B44\\u0B4D\\u0B55\\u0B56\\u0B62\\u0B63\\u0B82\\u0BC0\\u0BCD\\u0C00\\u0C04\\u0C3C\\u0C3E-\\u0C40\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81\\u0CBC\\u0CCC\\u0CCD\\u0CE2\\u0CE3\\u0D00\\u0D01\\u0D3B\\u0D3C\\u0D41-\\u0D44\\u0D4D\\u0D62\\u0D63\\u0D81\\u0DCA\\u0DD2-\\u0DD4\\u0DD6\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EBC\\u0EC8-\\u0ECE\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F71-\\u0F7E\\u0F80-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102D-\\u1030\\u1032-\\u1037\\u1039\\u103A\\u103D\\u103E\\u1058\\u1059\\u105E-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108D\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732\\u1733\\u1752\\u1753\\u1772\\u1773\\u17B4\\u17B5\\u17B7-\\u17BD\\u17C6\\u17C9-\\u17D3\\u17DD\\u180B-\\u180D\\u180F\\u1885\\u1886\\u18A9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193B\\u1A17\\u1A18\\u1A1B\\u1A56\\u1A58-\\u1A5E\\u1A60\\u1A62\\u1A65-\\u1A6C\\u1A73-\\u1A7C\\u1A7F\\u1AB0-\\u1ACE\\u1B00-\\u1B03\\u1B34\\u1B36-\\u1B3A\\u1B3C\\u1B42\\u1B6B-\\u1B73\\u1B80\\u1B81\\u1BA2-\\u1BA5\\u1BA8\\u1BA9\\u1BAB-\\u1BAD\\u1BE6\\u1BE8\\u1BE9\\u1BED\\u1BEF-\\u1BF1\\u1C2C-\\u1C33\\u1C36\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE0\\u1CE2-\\u1CE8\\u1CED\\u1CF4\\u1CF8\\u1CF9\\u1DC0-\\u1DFF\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302D\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA825\\uA826\\uA82C\\uA8C4\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA951\\uA980-\\uA982\\uA9B3\\uA9B6-\\uA9B9\\uA9BC\\uA9BD\\uA9E5\\uAA29-\\uAA2E\\uAA31\\uAA32\\uAA35\\uAA36\\uAA43\\uAA4C\\uAA7C\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEC\\uAAED\\uAAF6\\uABE5\\uABE8\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\u{101FD}\\u{102E0}\\u{10376}-\\u{1037A}\\u{10A01}-\\u{10A03}\\u{10A05}\\u{10A06}\\u{10A0C}-\\u{10A0F}\\u{10A38}-\\u{10A3A}\\u{10A3F}\\u{10AE5}\\u{10AE6}\\u{10D24}-\\u{10D27}\\u{10EAB}\\u{10EAC}\\u{10EFD}-\\u{10EFF}\\u{10F46}-\\u{10F50}\\u{10F82}-\\u{10F85}\\u{11001}\\u{11038}-\\u{11046}\\u{11070}\\u{11073}\\u{11074}\\u{1107F}-\\u{11081}\\u{110B3}-\\u{110B6}\\u{110B9}\\u{110BA}\\u{110C2}\\u{11100}-\\u{11102}\\u{11127}-\\u{1112B}\\u{1112D}-\\u{11134}\\u{11173}\\u{11180}\\u{11181}\\u{111B6}-\\u{111BE}\\u{111C9}-\\u{111CC}\\u{111CF}\\u{1122F}-\\u{11231}\\u{11234}\\u{11236}\\u{11237}\\u{1123E}\\u{11241}\\u{112DF}\\u{112E3}-\\u{112EA}\\u{11300}\\u{11301}\\u{1133B}\\u{1133C}\\u{11340}\\u{11366}-\\u{1136C}\\u{11370}-\\u{11374}\\u{11438}-\\u{1143F}\\u{11442}-\\u{11444}\\u{11446}\\u{1145E}\\u{114B3}-\\u{114B8}\\u{114BA}\\u{114BF}\\u{114C0}\\u{114C2}\\u{114C3}\\u{115B2}-\\u{115B5}\\u{115BC}\\u{115BD}\\u{115BF}\\u{115C0}\\u{115DC}\\u{115DD}\\u{11633}-\\u{1163A}\\u{1163D}\\u{1163F}\\u{11640}\\u{116AB}\\u{116AD}\\u{116B0}-\\u{116B5}\\u{116B7}\\u{1171D}-\\u{1171F}\\u{11722}-\\u{11725}\\u{11727}-\\u{1172B}\\u{1182F}-\\u{11837}\\u{11839}\\u{1183A}\\u{1193B}\\u{1193C}\\u{1193E}\\u{11943}\\u{119D4}-\\u{119D7}\\u{119DA}\\u{119DB}\\u{119E0}\\u{11A01}-\\u{11A06}\\u{11A09}\\u{11A0A}\\u{11A33}-\\u{11A38}\\u{11A3B}-\\u{11A3E}\\u{11A47}\\u{11A51}-\\u{11A56}\\u{11A59}-\\u{11A5B}\\u{11A8A}-\\u{11A96}\\u{11A98}\\u{11A99}\\u{11C30}-\\u{11C36}\\u{11C38}-\\u{11C3D}\\u{11C92}-\\u{11CA7}\\u{11CAA}-\\u{11CB0}\\u{11CB2}\\u{11CB3}\\u{11CB5}\\u{11CB6}\\u{11D31}-\\u{11D36}\\u{11D3A}\\u{11D3C}\\u{11D3D}\\u{11D3F}-\\u{11D45}\\u{11D47}\\u{11D90}\\u{11D91}\\u{11D95}\\u{11D97}\\u{11EF3}\\u{11EF4}\\u{11F00}\\u{11F01}\\u{11F36}-\\u{11F3A}\\u{11F40}\\u{11F42}\\u{13440}\\u{13447}-\\u{13455}\\u{16AF0}-\\u{16AF4}\\u{16B30}-\\u{16B36}\\u{16F4F}\\u{16F8F}-\\u{16F92}\\u{16FE4}\\u{1BC9D}\\u{1BC9E}\\u{1CF00}-\\u{1CF2D}\\u{1CF30}-\\u{1CF46}\\u{1D167}-\\u{1D169}\\u{1D17B}-\\u{1D182}\\u{1D185}-\\u{1D18B}\\u{1D1AA}-\\u{1D1AD}\\u{1D242}-\\u{1D244}\\u{1DA00}-\\u{1DA36}\\u{1DA3B}-\\u{1DA6C}\\u{1DA75}\\u{1DA84}\\u{1DA9B}-\\u{1DA9F}\\u{1DAA1}-\\u{1DAAF}\\u{1E000}-\\u{1E006}\\u{1E008}-\\u{1E018}\\u{1E01B}-\\u{1E021}\\u{1E023}\\u{1E024}\\u{1E026}-\\u{1E02A}\\u{1E08F}\\u{1E130}-\\u{1E136}\\u{1E2AE}\\u{1E2EC}-\\u{1E2EF}\\u{1E4EC}-\\u{1E4EF}\\u{1E8D0}-\\u{1E8D6}\\u{1E944}-\\u{1E94A}\\u{E0100}-\\u{E01EF}]*$/u;\n\nmodule.exports = {\n combiningMarks,\n combiningClassVirama,\n validZWNJ,\n bidiDomain,\n bidiS1LTR,\n bidiS1RTL,\n bidiS2,\n bidiS3,\n bidiS4EN,\n bidiS4AN,\n bidiS5,\n bidiS6\n};\n","\"use strict\";\n\nmodule.exports.STATUS_MAPPING = {\n mapped: 1,\n valid: 2,\n disallowed: 3,\n disallowed_STD3_valid: 4,\n disallowed_STD3_mapped: 5,\n deviation: 6,\n ignored: 7\n};\n","\"use strict\";\n\nconst punycode = require(\"punycode/\");\nconst regexes = require(\"./lib/regexes.js\");\nconst mappingTable = require(\"./lib/mappingTable.json\");\nconst { STATUS_MAPPING } = require(\"./lib/statusMapping.js\");\n\nfunction containsNonASCII(str) {\n return /[^\\x00-\\x7F]/u.test(str);\n}\n\nfunction findStatus(val, { useSTD3ASCIIRules }) {\n let start = 0;\n let end = mappingTable.length - 1;\n\n while (start <= end) {\n const mid = Math.floor((start + end) / 2);\n\n const target = mappingTable[mid];\n const min = Array.isArray(target[0]) ? target[0][0] : target[0];\n const max = Array.isArray(target[0]) ? target[0][1] : target[0];\n\n if (min <= val && max >= val) {\n if (useSTD3ASCIIRules &&\n (target[1] === STATUS_MAPPING.disallowed_STD3_valid || target[1] === STATUS_MAPPING.disallowed_STD3_mapped)) {\n return [STATUS_MAPPING.disallowed, ...target.slice(2)];\n } else if (target[1] === STATUS_MAPPING.disallowed_STD3_valid) {\n return [STATUS_MAPPING.valid, ...target.slice(2)];\n } else if (target[1] === STATUS_MAPPING.disallowed_STD3_mapped) {\n return [STATUS_MAPPING.mapped, ...target.slice(2)];\n }\n\n return target.slice(1);\n } else if (min > val) {\n end = mid - 1;\n } else {\n start = mid + 1;\n }\n }\n\n return null;\n}\n\nfunction mapChars(domainName, { useSTD3ASCIIRules, processingOption }) {\n let hasError = false;\n let processed = \"\";\n\n for (const ch of domainName) {\n const [status, mapping] = findStatus(ch.codePointAt(0), { useSTD3ASCIIRules });\n\n switch (status) {\n case STATUS_MAPPING.disallowed:\n hasError = true;\n processed += ch;\n break;\n case STATUS_MAPPING.ignored:\n break;\n case STATUS_MAPPING.mapped:\n processed += mapping;\n break;\n case STATUS_MAPPING.deviation:\n if (processingOption === \"transitional\") {\n processed += mapping;\n } else {\n processed += ch;\n }\n break;\n case STATUS_MAPPING.valid:\n processed += ch;\n break;\n }\n }\n\n return {\n string: processed,\n error: hasError\n };\n}\n\nfunction validateLabel(label, { checkHyphens, checkBidi, checkJoiners, processingOption, useSTD3ASCIIRules }) {\n if (label.normalize(\"NFC\") !== label) {\n return false;\n }\n\n const codePoints = Array.from(label);\n\n if (checkHyphens) {\n if ((codePoints[2] === \"-\" && codePoints[3] === \"-\") ||\n (label.startsWith(\"-\") || label.endsWith(\"-\"))) {\n return false;\n }\n }\n\n if (label.includes(\".\") ||\n (codePoints.length > 0 && regexes.combiningMarks.test(codePoints[0]))) {\n return false;\n }\n\n for (const ch of codePoints) {\n const [status] = findStatus(ch.codePointAt(0), { useSTD3ASCIIRules });\n if ((processingOption === \"transitional\" && status !== STATUS_MAPPING.valid) ||\n (processingOption === \"nontransitional\" &&\n status !== STATUS_MAPPING.valid && status !== STATUS_MAPPING.deviation)) {\n return false;\n }\n }\n\n // https://tools.ietf.org/html/rfc5892#appendix-A\n if (checkJoiners) {\n let last = 0;\n for (const [i, ch] of codePoints.entries()) {\n if (ch === \"\\u200C\" || ch === \"\\u200D\") {\n if (i > 0) {\n if (regexes.combiningClassVirama.test(codePoints[i - 1])) {\n continue;\n }\n if (ch === \"\\u200C\") {\n // TODO: make this more efficient\n const next = codePoints.indexOf(\"\\u200C\", i + 1);\n const test = next < 0 ? codePoints.slice(last) : codePoints.slice(last, next);\n if (regexes.validZWNJ.test(test.join(\"\"))) {\n last = i + 1;\n continue;\n }\n }\n }\n return false;\n }\n }\n }\n\n // https://tools.ietf.org/html/rfc5893#section-2\n // For the codePoints length check, see discussion in https://github.com/jsdom/whatwg-url/pull/250 and the second item\n // in https://github.com/whatwg/url/issues/744.\n if (checkBidi && codePoints.length > 0) {\n let rtl;\n\n // 1\n if (regexes.bidiS1LTR.test(codePoints[0])) {\n rtl = false;\n } else if (regexes.bidiS1RTL.test(codePoints[0])) {\n rtl = true;\n } else {\n return false;\n }\n\n if (rtl) {\n // 2-4\n if (!regexes.bidiS2.test(label) ||\n !regexes.bidiS3.test(label) ||\n (regexes.bidiS4EN.test(label) && regexes.bidiS4AN.test(label))) {\n return false;\n }\n } else if (!regexes.bidiS5.test(label) ||\n !regexes.bidiS6.test(label)) { // 5-6\n return false;\n }\n }\n\n return true;\n}\n\nfunction isBidiDomain(labels) {\n const domain = labels.map(label => {\n if (label.startsWith(\"xn--\")) {\n try {\n return punycode.decode(label.substring(4));\n } catch (err) {\n return \"\";\n }\n }\n return label;\n }).join(\".\");\n return regexes.bidiDomain.test(domain);\n}\n\nfunction processing(domainName, options) {\n const { processingOption } = options;\n\n // 1. Map.\n let { string, error } = mapChars(domainName, options);\n\n // 2. Normalize.\n string = string.normalize(\"NFC\");\n\n // 3. Break.\n const labels = string.split(\".\");\n const isBidi = isBidiDomain(labels);\n\n // 4. Convert/Validate.\n for (const [i, origLabel] of labels.entries()) {\n let label = origLabel;\n let curProcessing = processingOption;\n if (label.startsWith(\"xn--\")) {\n try {\n label = punycode.decode(label.substring(4));\n labels[i] = label;\n } catch (err) {\n error = true;\n continue;\n }\n curProcessing = \"nontransitional\";\n }\n\n // No need to validate if we already know there is an error.\n if (error) {\n continue;\n }\n const validation = validateLabel(label, {\n ...options,\n processingOption: curProcessing,\n checkBidi: options.checkBidi && isBidi\n });\n if (!validation) {\n error = true;\n }\n }\n\n return {\n string: labels.join(\".\"),\n error\n };\n}\n\nfunction toASCII(domainName, {\n checkHyphens = false,\n checkBidi = false,\n checkJoiners = false,\n useSTD3ASCIIRules = false,\n processingOption = \"nontransitional\",\n verifyDNSLength = false\n} = {}) {\n if (processingOption !== \"transitional\" && processingOption !== \"nontransitional\") {\n throw new RangeError(\"processingOption must be either transitional or nontransitional\");\n }\n\n const result = processing(domainName, {\n processingOption,\n checkHyphens,\n checkBidi,\n checkJoiners,\n useSTD3ASCIIRules\n });\n let labels = result.string.split(\".\");\n labels = labels.map(l => {\n if (containsNonASCII(l)) {\n try {\n return `xn--${punycode.encode(l)}`;\n } catch (e) {\n result.error = true;\n }\n }\n return l;\n });\n\n if (verifyDNSLength) {\n const total = labels.join(\".\").length;\n if (total > 253 || total === 0) {\n result.error = true;\n }\n\n for (let i = 0; i < labels.length; ++i) {\n if (labels[i].length > 63 || labels[i].length === 0) {\n result.error = true;\n break;\n }\n }\n }\n\n if (result.error) {\n return null;\n }\n return labels.join(\".\");\n}\n\nfunction toUnicode(domainName, {\n checkHyphens = false,\n checkBidi = false,\n checkJoiners = false,\n useSTD3ASCIIRules = false,\n processingOption = \"nontransitional\"\n} = {}) {\n const result = processing(domainName, {\n processingOption,\n checkHyphens,\n checkBidi,\n checkJoiners,\n useSTD3ASCIIRules\n });\n\n return {\n domain: result.string,\n error: result.error\n };\n}\n\nmodule.exports = {\n toASCII,\n toUnicode\n};\n","\"use strict\";\n\n// Note that we take code points as JS numbers, not JS strings.\n\nfunction isASCIIDigit(c) {\n return c >= 0x30 && c <= 0x39;\n}\n\nfunction isASCIIAlpha(c) {\n return (c >= 0x41 && c <= 0x5A) || (c >= 0x61 && c <= 0x7A);\n}\n\nfunction isASCIIAlphanumeric(c) {\n return isASCIIAlpha(c) || isASCIIDigit(c);\n}\n\nfunction isASCIIHex(c) {\n return isASCIIDigit(c) || (c >= 0x41 && c <= 0x46) || (c >= 0x61 && c <= 0x66);\n}\n\nmodule.exports = {\n isASCIIDigit,\n isASCIIAlpha,\n isASCIIAlphanumeric,\n isASCIIHex\n};\n","\"use strict\";\nconst utf8Encoder = new TextEncoder();\nconst utf8Decoder = new TextDecoder(\"utf-8\", { ignoreBOM: true });\n\nfunction utf8Encode(string) {\n return utf8Encoder.encode(string);\n}\n\nfunction utf8DecodeWithoutBOM(bytes) {\n return utf8Decoder.decode(bytes);\n}\n\nmodule.exports = {\n utf8Encode,\n utf8DecodeWithoutBOM\n};\n","\"use strict\";\nconst { isASCIIHex } = require(\"./infra\");\nconst { utf8Encode } = require(\"./encoding\");\n\nfunction p(char) {\n return char.codePointAt(0);\n}\n\n// https://url.spec.whatwg.org/#percent-encode\nfunction percentEncode(c) {\n let hex = c.toString(16).toUpperCase();\n if (hex.length === 1) {\n hex = `0${hex}`;\n }\n\n return `%${hex}`;\n}\n\n// https://url.spec.whatwg.org/#percent-decode\nfunction percentDecodeBytes(input) {\n const output = new Uint8Array(input.byteLength);\n let outputIndex = 0;\n for (let i = 0; i < input.byteLength; ++i) {\n const byte = input[i];\n if (byte !== 0x25) {\n output[outputIndex++] = byte;\n } else if (byte === 0x25 && (!isASCIIHex(input[i + 1]) || !isASCIIHex(input[i + 2]))) {\n output[outputIndex++] = byte;\n } else {\n const bytePoint = parseInt(String.fromCodePoint(input[i + 1], input[i + 2]), 16);\n output[outputIndex++] = bytePoint;\n i += 2;\n }\n }\n\n return output.slice(0, outputIndex);\n}\n\n// https://url.spec.whatwg.org/#string-percent-decode\nfunction percentDecodeString(input) {\n const bytes = utf8Encode(input);\n return percentDecodeBytes(bytes);\n}\n\n// https://url.spec.whatwg.org/#c0-control-percent-encode-set\nfunction isC0ControlPercentEncode(c) {\n return c <= 0x1F || c > 0x7E;\n}\n\n// https://url.spec.whatwg.org/#fragment-percent-encode-set\nconst extraFragmentPercentEncodeSet = new Set([p(\" \"), p(\"\\\"\"), p(\"<\"), p(\">\"), p(\"`\")]);\nfunction isFragmentPercentEncode(c) {\n return isC0ControlPercentEncode(c) || extraFragmentPercentEncodeSet.has(c);\n}\n\n// https://url.spec.whatwg.org/#query-percent-encode-set\nconst extraQueryPercentEncodeSet = new Set([p(\" \"), p(\"\\\"\"), p(\"#\"), p(\"<\"), p(\">\")]);\nfunction isQueryPercentEncode(c) {\n return isC0ControlPercentEncode(c) || extraQueryPercentEncodeSet.has(c);\n}\n\n// https://url.spec.whatwg.org/#special-query-percent-encode-set\nfunction isSpecialQueryPercentEncode(c) {\n return isQueryPercentEncode(c) || c === p(\"'\");\n}\n\n// https://url.spec.whatwg.org/#path-percent-encode-set\nconst extraPathPercentEncodeSet = new Set([p(\"?\"), p(\"`\"), p(\"{\"), p(\"}\")]);\nfunction isPathPercentEncode(c) {\n return isQueryPercentEncode(c) || extraPathPercentEncodeSet.has(c);\n}\n\n// https://url.spec.whatwg.org/#userinfo-percent-encode-set\nconst extraUserinfoPercentEncodeSet =\n new Set([p(\"/\"), p(\":\"), p(\";\"), p(\"=\"), p(\"@\"), p(\"[\"), p(\"\\\\\"), p(\"]\"), p(\"^\"), p(\"|\")]);\nfunction isUserinfoPercentEncode(c) {\n return isPathPercentEncode(c) || extraUserinfoPercentEncodeSet.has(c);\n}\n\n// https://url.spec.whatwg.org/#component-percent-encode-set\nconst extraComponentPercentEncodeSet = new Set([p(\"$\"), p(\"%\"), p(\"&\"), p(\"+\"), p(\",\")]);\nfunction isComponentPercentEncode(c) {\n return isUserinfoPercentEncode(c) || extraComponentPercentEncodeSet.has(c);\n}\n\n// https://url.spec.whatwg.org/#application-x-www-form-urlencoded-percent-encode-set\nconst extraURLEncodedPercentEncodeSet = new Set([p(\"!\"), p(\"'\"), p(\"(\"), p(\")\"), p(\"~\")]);\nfunction isURLEncodedPercentEncode(c) {\n return isComponentPercentEncode(c) || extraURLEncodedPercentEncodeSet.has(c);\n}\n\n// https://url.spec.whatwg.org/#code-point-percent-encode-after-encoding\n// https://url.spec.whatwg.org/#utf-8-percent-encode\n// Assuming encoding is always utf-8 allows us to trim one of the logic branches. TODO: support encoding.\n// The \"-Internal\" variant here has code points as JS strings. The external version used by other files has code points\n// as JS numbers, like the rest of the codebase.\nfunction utf8PercentEncodeCodePointInternal(codePoint, percentEncodePredicate) {\n const bytes = utf8Encode(codePoint);\n let output = \"\";\n for (const byte of bytes) {\n // Our percentEncodePredicate operates on bytes, not code points, so this is slightly different from the spec.\n if (!percentEncodePredicate(byte)) {\n output += String.fromCharCode(byte);\n } else {\n output += percentEncode(byte);\n }\n }\n\n return output;\n}\n\nfunction utf8PercentEncodeCodePoint(codePoint, percentEncodePredicate) {\n return utf8PercentEncodeCodePointInternal(String.fromCodePoint(codePoint), percentEncodePredicate);\n}\n\n// https://url.spec.whatwg.org/#string-percent-encode-after-encoding\n// https://url.spec.whatwg.org/#string-utf-8-percent-encode\nfunction utf8PercentEncodeString(input, percentEncodePredicate, spaceAsPlus = false) {\n let output = \"\";\n for (const codePoint of input) {\n if (spaceAsPlus && codePoint === \" \") {\n output += \"+\";\n } else {\n output += utf8PercentEncodeCodePointInternal(codePoint, percentEncodePredicate);\n }\n }\n return output;\n}\n\nmodule.exports = {\n isC0ControlPercentEncode,\n isFragmentPercentEncode,\n isQueryPercentEncode,\n isSpecialQueryPercentEncode,\n isPathPercentEncode,\n isUserinfoPercentEncode,\n isURLEncodedPercentEncode,\n percentDecodeString,\n percentDecodeBytes,\n utf8PercentEncodeString,\n utf8PercentEncodeCodePoint\n};\n","\"use strict\";\nconst tr46 = require(\"tr46\");\n\nconst infra = require(\"./infra\");\nconst { utf8DecodeWithoutBOM } = require(\"./encoding\");\nconst { percentDecodeString, utf8PercentEncodeCodePoint, utf8PercentEncodeString, isC0ControlPercentEncode,\n isFragmentPercentEncode, isQueryPercentEncode, isSpecialQueryPercentEncode, isPathPercentEncode,\n isUserinfoPercentEncode } = require(\"./percent-encoding\");\n\nfunction p(char) {\n return char.codePointAt(0);\n}\n\nconst specialSchemes = {\n ftp: 21,\n file: null,\n http: 80,\n https: 443,\n ws: 80,\n wss: 443\n};\n\nconst failure = Symbol(\"failure\");\n\nfunction countSymbols(str) {\n return [...str].length;\n}\n\nfunction at(input, idx) {\n const c = input[idx];\n return isNaN(c) ? undefined : String.fromCodePoint(c);\n}\n\nfunction isSingleDot(buffer) {\n return buffer === \".\" || buffer.toLowerCase() === \"%2e\";\n}\n\nfunction isDoubleDot(buffer) {\n buffer = buffer.toLowerCase();\n return buffer === \"..\" || buffer === \"%2e.\" || buffer === \".%2e\" || buffer === \"%2e%2e\";\n}\n\nfunction isWindowsDriveLetterCodePoints(cp1, cp2) {\n return infra.isASCIIAlpha(cp1) && (cp2 === p(\":\") || cp2 === p(\"|\"));\n}\n\nfunction isWindowsDriveLetterString(string) {\n return string.length === 2 && infra.isASCIIAlpha(string.codePointAt(0)) && (string[1] === \":\" || string[1] === \"|\");\n}\n\nfunction isNormalizedWindowsDriveLetterString(string) {\n return string.length === 2 && infra.isASCIIAlpha(string.codePointAt(0)) && string[1] === \":\";\n}\n\nfunction containsForbiddenHostCodePoint(string) {\n return string.search(/\\u0000|\\u0009|\\u000A|\\u000D|\\u0020|#|\\/|:|<|>|\\?|@|\\[|\\\\|\\]|\\^|\\|/u) !== -1;\n}\n\nfunction containsForbiddenDomainCodePoint(string) {\n return containsForbiddenHostCodePoint(string) || string.search(/[\\u0000-\\u001F]|%|\\u007F/u) !== -1;\n}\n\nfunction isSpecialScheme(scheme) {\n return specialSchemes[scheme] !== undefined;\n}\n\nfunction isSpecial(url) {\n return isSpecialScheme(url.scheme);\n}\n\nfunction isNotSpecial(url) {\n return !isSpecialScheme(url.scheme);\n}\n\nfunction defaultPort(scheme) {\n return specialSchemes[scheme];\n}\n\nfunction parseIPv4Number(input) {\n if (input === \"\") {\n return failure;\n }\n\n let R = 10;\n\n if (input.length >= 2 && input.charAt(0) === \"0\" && input.charAt(1).toLowerCase() === \"x\") {\n input = input.substring(2);\n R = 16;\n } else if (input.length >= 2 && input.charAt(0) === \"0\") {\n input = input.substring(1);\n R = 8;\n }\n\n if (input === \"\") {\n return 0;\n }\n\n let regex = /[^0-7]/u;\n if (R === 10) {\n regex = /[^0-9]/u;\n }\n if (R === 16) {\n regex = /[^0-9A-Fa-f]/u;\n }\n\n if (regex.test(input)) {\n return failure;\n }\n\n return parseInt(input, R);\n}\n\nfunction parseIPv4(input) {\n const parts = input.split(\".\");\n if (parts[parts.length - 1] === \"\") {\n if (parts.length > 1) {\n parts.pop();\n }\n }\n\n if (parts.length > 4) {\n return failure;\n }\n\n const numbers = [];\n for (const part of parts) {\n const n = parseIPv4Number(part);\n if (n === failure) {\n return failure;\n }\n\n numbers.push(n);\n }\n\n for (let i = 0; i < numbers.length - 1; ++i) {\n if (numbers[i] > 255) {\n return failure;\n }\n }\n if (numbers[numbers.length - 1] >= 256 ** (5 - numbers.length)) {\n return failure;\n }\n\n let ipv4 = numbers.pop();\n let counter = 0;\n\n for (const n of numbers) {\n ipv4 += n * 256 ** (3 - counter);\n ++counter;\n }\n\n return ipv4;\n}\n\nfunction serializeIPv4(address) {\n let output = \"\";\n let n = address;\n\n for (let i = 1; i <= 4; ++i) {\n output = String(n % 256) + output;\n if (i !== 4) {\n output = `.${output}`;\n }\n n = Math.floor(n / 256);\n }\n\n return output;\n}\n\nfunction parseIPv6(input) {\n const address = [0, 0, 0, 0, 0, 0, 0, 0];\n let pieceIndex = 0;\n let compress = null;\n let pointer = 0;\n\n input = Array.from(input, c => c.codePointAt(0));\n\n if (input[pointer] === p(\":\")) {\n if (input[pointer + 1] !== p(\":\")) {\n return failure;\n }\n\n pointer += 2;\n ++pieceIndex;\n compress = pieceIndex;\n }\n\n while (pointer < input.length) {\n if (pieceIndex === 8) {\n return failure;\n }\n\n if (input[pointer] === p(\":\")) {\n if (compress !== null) {\n return failure;\n }\n ++pointer;\n ++pieceIndex;\n compress = pieceIndex;\n continue;\n }\n\n let value = 0;\n let length = 0;\n\n while (length < 4 && infra.isASCIIHex(input[pointer])) {\n value = value * 0x10 + parseInt(at(input, pointer), 16);\n ++pointer;\n ++length;\n }\n\n if (input[pointer] === p(\".\")) {\n if (length === 0) {\n return failure;\n }\n\n pointer -= length;\n\n if (pieceIndex > 6) {\n return failure;\n }\n\n let numbersSeen = 0;\n\n while (input[pointer] !== undefined) {\n let ipv4Piece = null;\n\n if (numbersSeen > 0) {\n if (input[pointer] === p(\".\") && numbersSeen < 4) {\n ++pointer;\n } else {\n return failure;\n }\n }\n\n if (!infra.isASCIIDigit(input[pointer])) {\n return failure;\n }\n\n while (infra.isASCIIDigit(input[pointer])) {\n const number = parseInt(at(input, pointer));\n if (ipv4Piece === null) {\n ipv4Piece = number;\n } else if (ipv4Piece === 0) {\n return failure;\n } else {\n ipv4Piece = ipv4Piece * 10 + number;\n }\n if (ipv4Piece > 255) {\n return failure;\n }\n ++pointer;\n }\n\n address[pieceIndex] = address[pieceIndex] * 0x100 + ipv4Piece;\n\n ++numbersSeen;\n\n if (numbersSeen === 2 || numbersSeen === 4) {\n ++pieceIndex;\n }\n }\n\n if (numbersSeen !== 4) {\n return failure;\n }\n\n break;\n } else if (input[pointer] === p(\":\")) {\n ++pointer;\n if (input[pointer] === undefined) {\n return failure;\n }\n } else if (input[pointer] !== undefined) {\n return failure;\n }\n\n address[pieceIndex] = value;\n ++pieceIndex;\n }\n\n if (compress !== null) {\n let swaps = pieceIndex - compress;\n pieceIndex = 7;\n while (pieceIndex !== 0 && swaps > 0) {\n const temp = address[compress + swaps - 1];\n address[compress + swaps - 1] = address[pieceIndex];\n address[pieceIndex] = temp;\n --pieceIndex;\n --swaps;\n }\n } else if (compress === null && pieceIndex !== 8) {\n return failure;\n }\n\n return address;\n}\n\nfunction serializeIPv6(address) {\n let output = \"\";\n const compress = findLongestZeroSequence(address);\n let ignore0 = false;\n\n for (let pieceIndex = 0; pieceIndex <= 7; ++pieceIndex) {\n if (ignore0 && address[pieceIndex] === 0) {\n continue;\n } else if (ignore0) {\n ignore0 = false;\n }\n\n if (compress === pieceIndex) {\n const separator = pieceIndex === 0 ? \"::\" : \":\";\n output += separator;\n ignore0 = true;\n continue;\n }\n\n output += address[pieceIndex].toString(16);\n\n if (pieceIndex !== 7) {\n output += \":\";\n }\n }\n\n return output;\n}\n\nfunction parseHost(input, isNotSpecialArg = false) {\n if (input[0] === \"[\") {\n if (input[input.length - 1] !== \"]\") {\n return failure;\n }\n\n return parseIPv6(input.substring(1, input.length - 1));\n }\n\n if (isNotSpecialArg) {\n return parseOpaqueHost(input);\n }\n\n const domain = utf8DecodeWithoutBOM(percentDecodeString(input));\n const asciiDomain = domainToASCII(domain);\n if (asciiDomain === failure) {\n return failure;\n }\n\n if (containsForbiddenDomainCodePoint(asciiDomain)) {\n return failure;\n }\n\n if (endsInANumber(asciiDomain)) {\n return parseIPv4(asciiDomain);\n }\n\n return asciiDomain;\n}\n\nfunction endsInANumber(input) {\n const parts = input.split(\".\");\n if (parts[parts.length - 1] === \"\") {\n if (parts.length === 1) {\n return false;\n }\n parts.pop();\n }\n\n const last = parts[parts.length - 1];\n if (parseIPv4Number(last) !== failure) {\n return true;\n }\n\n if (/^[0-9]+$/u.test(last)) {\n return true;\n }\n\n return false;\n}\n\nfunction parseOpaqueHost(input) {\n if (containsForbiddenHostCodePoint(input)) {\n return failure;\n }\n\n return utf8PercentEncodeString(input, isC0ControlPercentEncode);\n}\n\nfunction findLongestZeroSequence(arr) {\n let maxIdx = null;\n let maxLen = 1; // only find elements > 1\n let currStart = null;\n let currLen = 0;\n\n for (let i = 0; i < arr.length; ++i) {\n if (arr[i] !== 0) {\n if (currLen > maxLen) {\n maxIdx = currStart;\n maxLen = currLen;\n }\n\n currStart = null;\n currLen = 0;\n } else {\n if (currStart === null) {\n currStart = i;\n }\n ++currLen;\n }\n }\n\n // if trailing zeros\n if (currLen > maxLen) {\n return currStart;\n }\n\n return maxIdx;\n}\n\nfunction serializeHost(host) {\n if (typeof host === \"number\") {\n return serializeIPv4(host);\n }\n\n // IPv6 serializer\n if (host instanceof Array) {\n return `[${serializeIPv6(host)}]`;\n }\n\n return host;\n}\n\nfunction domainToASCII(domain, beStrict = false) {\n const result = tr46.toASCII(domain, {\n checkBidi: true,\n checkHyphens: false,\n checkJoiners: true,\n useSTD3ASCIIRules: beStrict,\n verifyDNSLength: beStrict\n });\n if (result === null || result === \"\") {\n return failure;\n }\n return result;\n}\n\nfunction trimControlChars(url) {\n return url.replace(/^[\\u0000-\\u001F\\u0020]+|[\\u0000-\\u001F\\u0020]+$/ug, \"\");\n}\n\nfunction trimTabAndNewline(url) {\n return url.replace(/\\u0009|\\u000A|\\u000D/ug, \"\");\n}\n\nfunction shortenPath(url) {\n const { path } = url;\n if (path.length === 0) {\n return;\n }\n if (url.scheme === \"file\" && path.length === 1 && isNormalizedWindowsDriveLetter(path[0])) {\n return;\n }\n\n path.pop();\n}\n\nfunction includesCredentials(url) {\n return url.username !== \"\" || url.password !== \"\";\n}\n\nfunction cannotHaveAUsernamePasswordPort(url) {\n return url.host === null || url.host === \"\" || url.scheme === \"file\";\n}\n\nfunction hasAnOpaquePath(url) {\n return typeof url.path === \"string\";\n}\n\nfunction isNormalizedWindowsDriveLetter(string) {\n return /^[A-Za-z]:$/u.test(string);\n}\n\nfunction URLStateMachine(input, base, encodingOverride, url, stateOverride) {\n this.pointer = 0;\n this.input = input;\n this.base = base || null;\n this.encodingOverride = encodingOverride || \"utf-8\";\n this.stateOverride = stateOverride;\n this.url = url;\n this.failure = false;\n this.parseError = false;\n\n if (!this.url) {\n this.url = {\n scheme: \"\",\n username: \"\",\n password: \"\",\n host: null,\n port: null,\n path: [],\n query: null,\n fragment: null\n };\n\n const res = trimControlChars(this.input);\n if (res !== this.input) {\n this.parseError = true;\n }\n this.input = res;\n }\n\n const res = trimTabAndNewline(this.input);\n if (res !== this.input) {\n this.parseError = true;\n }\n this.input = res;\n\n this.state = stateOverride || \"scheme start\";\n\n this.buffer = \"\";\n this.atFlag = false;\n this.arrFlag = false;\n this.passwordTokenSeenFlag = false;\n\n this.input = Array.from(this.input, c => c.codePointAt(0));\n\n for (; this.pointer <= this.input.length; ++this.pointer) {\n const c = this.input[this.pointer];\n const cStr = isNaN(c) ? undefined : String.fromCodePoint(c);\n\n // exec state machine\n const ret = this[`parse ${this.state}`](c, cStr);\n if (!ret) {\n break; // terminate algorithm\n } else if (ret === failure) {\n this.failure = true;\n break;\n }\n }\n}\n\nURLStateMachine.prototype[\"parse scheme start\"] = function parseSchemeStart(c, cStr) {\n if (infra.isASCIIAlpha(c)) {\n this.buffer += cStr.toLowerCase();\n this.state = \"scheme\";\n } else if (!this.stateOverride) {\n this.state = \"no scheme\";\n --this.pointer;\n } else {\n this.parseError = true;\n return failure;\n }\n\n return true;\n};\n\nURLStateMachine.prototype[\"parse scheme\"] = function parseScheme(c, cStr) {\n if (infra.isASCIIAlphanumeric(c) || c === p(\"+\") || c === p(\"-\") || c === p(\".\")) {\n this.buffer += cStr.toLowerCase();\n } else if (c === p(\":\")) {\n if (this.stateOverride) {\n if (isSpecial(this.url) && !isSpecialScheme(this.buffer)) {\n return false;\n }\n\n if (!isSpecial(this.url) && isSpecialScheme(this.buffer)) {\n return false;\n }\n\n if ((includesCredentials(this.url) || this.url.port !== null) && this.buffer === \"file\") {\n return false;\n }\n\n if (this.url.scheme === \"file\" && this.url.host === \"\") {\n return false;\n }\n }\n this.url.scheme = this.buffer;\n if (this.stateOverride) {\n if (this.url.port === defaultPort(this.url.scheme)) {\n this.url.port = null;\n }\n return false;\n }\n this.buffer = \"\";\n if (this.url.scheme === \"file\") {\n if (this.input[this.pointer + 1] !== p(\"/\") || this.input[this.pointer + 2] !== p(\"/\")) {\n this.parseError = true;\n }\n this.state = \"file\";\n } else if (isSpecial(this.url) && this.base !== null && this.base.scheme === this.url.scheme) {\n this.state = \"special relative or authority\";\n } else if (isSpecial(this.url)) {\n this.state = \"special authority slashes\";\n } else if (this.input[this.pointer + 1] === p(\"/\")) {\n this.state = \"path or authority\";\n ++this.pointer;\n } else {\n this.url.path = \"\";\n this.state = \"opaque path\";\n }\n } else if (!this.stateOverride) {\n this.buffer = \"\";\n this.state = \"no scheme\";\n this.pointer = -1;\n } else {\n this.parseError = true;\n return failure;\n }\n\n return true;\n};\n\nURLStateMachine.prototype[\"parse no scheme\"] = function parseNoScheme(c) {\n if (this.base === null || (hasAnOpaquePath(this.base) && c !== p(\"#\"))) {\n return failure;\n } else if (hasAnOpaquePath(this.base) && c === p(\"#\")) {\n this.url.scheme = this.base.scheme;\n this.url.path = this.base.path;\n this.url.query = this.base.query;\n this.url.fragment = \"\";\n this.state = \"fragment\";\n } else if (this.base.scheme === \"file\") {\n this.state = \"file\";\n --this.pointer;\n } else {\n this.state = \"relative\";\n --this.pointer;\n }\n\n return true;\n};\n\nURLStateMachine.prototype[\"parse special relative or authority\"] = function parseSpecialRelativeOrAuthority(c) {\n if (c === p(\"/\") && this.input[this.pointer + 1] === p(\"/\")) {\n this.state = \"special authority ignore slashes\";\n ++this.pointer;\n } else {\n this.parseError = true;\n this.state = \"relative\";\n --this.pointer;\n }\n\n return true;\n};\n\nURLStateMachine.prototype[\"parse path or authority\"] = function parsePathOrAuthority(c) {\n if (c === p(\"/\")) {\n this.state = \"authority\";\n } else {\n this.state = \"path\";\n --this.pointer;\n }\n\n return true;\n};\n\nURLStateMachine.prototype[\"parse relative\"] = function parseRelative(c) {\n this.url.scheme = this.base.scheme;\n if (c === p(\"/\")) {\n this.state = \"relative slash\";\n } else if (isSpecial(this.url) && c === p(\"\\\\\")) {\n this.parseError = true;\n this.state = \"relative slash\";\n } else {\n this.url.username = this.base.username;\n this.url.password = this.base.password;\n this.url.host = this.base.host;\n this.url.port = this.base.port;\n this.url.path = this.base.path.slice();\n this.url.query = this.base.query;\n if (c === p(\"?\")) {\n this.url.query = \"\";\n this.state = \"query\";\n } else if (c === p(\"#\")) {\n this.url.fragment = \"\";\n this.state = \"fragment\";\n } else if (!isNaN(c)) {\n this.url.query = null;\n this.url.path.pop();\n this.state = \"path\";\n --this.pointer;\n }\n }\n\n return true;\n};\n\nURLStateMachine.prototype[\"parse relative slash\"] = function parseRelativeSlash(c) {\n if (isSpecial(this.url) && (c === p(\"/\") || c === p(\"\\\\\"))) {\n if (c === p(\"\\\\\")) {\n this.parseError = true;\n }\n this.state = \"special authority ignore slashes\";\n } else if (c === p(\"/\")) {\n this.state = \"authority\";\n } else {\n this.url.username = this.base.username;\n this.url.password = this.base.password;\n this.url.host = this.base.host;\n this.url.port = this.base.port;\n this.state = \"path\";\n --this.pointer;\n }\n\n return true;\n};\n\nURLStateMachine.prototype[\"parse special authority slashes\"] = function parseSpecialAuthoritySlashes(c) {\n if (c === p(\"/\") && this.input[this.pointer + 1] === p(\"/\")) {\n this.state = \"special authority ignore slashes\";\n ++this.pointer;\n } else {\n this.parseError = true;\n this.state = \"special authority ignore slashes\";\n --this.pointer;\n }\n\n return true;\n};\n\nURLStateMachine.prototype[\"parse special authority ignore slashes\"] = function parseSpecialAuthorityIgnoreSlashes(c) {\n if (c !== p(\"/\") && c !== p(\"\\\\\")) {\n this.state = \"authority\";\n --this.pointer;\n } else {\n this.parseError = true;\n }\n\n return true;\n};\n\nURLStateMachine.prototype[\"parse authority\"] = function parseAuthority(c, cStr) {\n if (c === p(\"@\")) {\n this.parseError = true;\n if (this.atFlag) {\n this.buffer = `%40${this.buffer}`;\n }\n this.atFlag = true;\n\n // careful, this is based on buffer and has its own pointer (this.pointer != pointer) and inner chars\n const len = countSymbols(this.buffer);\n for (let pointer = 0; pointer < len; ++pointer) {\n const codePoint = this.buffer.codePointAt(pointer);\n\n if (codePoint === p(\":\") && !this.passwordTokenSeenFlag) {\n this.passwordTokenSeenFlag = true;\n continue;\n }\n const encodedCodePoints = utf8PercentEncodeCodePoint(codePoint, isUserinfoPercentEncode);\n if (this.passwordTokenSeenFlag) {\n this.url.password += encodedCodePoints;\n } else {\n this.url.username += encodedCodePoints;\n }\n }\n this.buffer = \"\";\n } else if (isNaN(c) || c === p(\"/\") || c === p(\"?\") || c === p(\"#\") ||\n (isSpecial(this.url) && c === p(\"\\\\\"))) {\n if (this.atFlag && this.buffer === \"\") {\n this.parseError = true;\n return failure;\n }\n this.pointer -= countSymbols(this.buffer) + 1;\n this.buffer = \"\";\n this.state = \"host\";\n } else {\n this.buffer += cStr;\n }\n\n return true;\n};\n\nURLStateMachine.prototype[\"parse hostname\"] =\nURLStateMachine.prototype[\"parse host\"] = function parseHostName(c, cStr) {\n if (this.stateOverride && this.url.scheme === \"file\") {\n --this.pointer;\n this.state = \"file host\";\n } else if (c === p(\":\") && !this.arrFlag) {\n if (this.buffer === \"\") {\n this.parseError = true;\n return failure;\n }\n\n if (this.stateOverride === \"hostname\") {\n return false;\n }\n\n const host = parseHost(this.buffer, isNotSpecial(this.url));\n if (host === failure) {\n return failure;\n }\n\n this.url.host = host;\n this.buffer = \"\";\n this.state = \"port\";\n } else if (isNaN(c) || c === p(\"/\") || c === p(\"?\") || c === p(\"#\") ||\n (isSpecial(this.url) && c === p(\"\\\\\"))) {\n --this.pointer;\n if (isSpecial(this.url) && this.buffer === \"\") {\n this.parseError = true;\n return failure;\n } else if (this.stateOverride && this.buffer === \"\" &&\n (includesCredentials(this.url) || this.url.port !== null)) {\n this.parseError = true;\n return false;\n }\n\n const host = parseHost(this.buffer, isNotSpecial(this.url));\n if (host === failure) {\n return failure;\n }\n\n this.url.host = host;\n this.buffer = \"\";\n this.state = \"path start\";\n if (this.stateOverride) {\n return false;\n }\n } else {\n if (c === p(\"[\")) {\n this.arrFlag = true;\n } else if (c === p(\"]\")) {\n this.arrFlag = false;\n }\n this.buffer += cStr;\n }\n\n return true;\n};\n\nURLStateMachine.prototype[\"parse port\"] = function parsePort(c, cStr) {\n if (infra.isASCIIDigit(c)) {\n this.buffer += cStr;\n } else if (isNaN(c) || c === p(\"/\") || c === p(\"?\") || c === p(\"#\") ||\n (isSpecial(this.url) && c === p(\"\\\\\")) ||\n this.stateOverride) {\n if (this.buffer !== \"\") {\n const port = parseInt(this.buffer);\n if (port > 2 ** 16 - 1) {\n this.parseError = true;\n return failure;\n }\n this.url.port = port === defaultPort(this.url.scheme) ? null : port;\n this.buffer = \"\";\n }\n if (this.stateOverride) {\n return false;\n }\n this.state = \"path start\";\n --this.pointer;\n } else {\n this.parseError = true;\n return failure;\n }\n\n return true;\n};\n\nconst fileOtherwiseCodePoints = new Set([p(\"/\"), p(\"\\\\\"), p(\"?\"), p(\"#\")]);\n\nfunction startsWithWindowsDriveLetter(input, pointer) {\n const length = input.length - pointer;\n return length >= 2 &&\n isWindowsDriveLetterCodePoints(input[pointer], input[pointer + 1]) &&\n (length === 2 || fileOtherwiseCodePoints.has(input[pointer + 2]));\n}\n\nURLStateMachine.prototype[\"parse file\"] = function parseFile(c) {\n this.url.scheme = \"file\";\n this.url.host = \"\";\n\n if (c === p(\"/\") || c === p(\"\\\\\")) {\n if (c === p(\"\\\\\")) {\n this.parseError = true;\n }\n this.state = \"file slash\";\n } else if (this.base !== null && this.base.scheme === \"file\") {\n this.url.host = this.base.host;\n this.url.path = this.base.path.slice();\n this.url.query = this.base.query;\n if (c === p(\"?\")) {\n this.url.query = \"\";\n this.state = \"query\";\n } else if (c === p(\"#\")) {\n this.url.fragment = \"\";\n this.state = \"fragment\";\n } else if (!isNaN(c)) {\n this.url.query = null;\n if (!startsWithWindowsDriveLetter(this.input, this.pointer)) {\n shortenPath(this.url);\n } else {\n this.parseError = true;\n this.url.path = [];\n }\n\n this.state = \"path\";\n --this.pointer;\n }\n } else {\n this.state = \"path\";\n --this.pointer;\n }\n\n return true;\n};\n\nURLStateMachine.prototype[\"parse file slash\"] = function parseFileSlash(c) {\n if (c === p(\"/\") || c === p(\"\\\\\")) {\n if (c === p(\"\\\\\")) {\n this.parseError = true;\n }\n this.state = \"file host\";\n } else {\n if (this.base !== null && this.base.scheme === \"file\") {\n if (!startsWithWindowsDriveLetter(this.input, this.pointer) &&\n isNormalizedWindowsDriveLetterString(this.base.path[0])) {\n this.url.path.push(this.base.path[0]);\n }\n this.url.host = this.base.host;\n }\n this.state = \"path\";\n --this.pointer;\n }\n\n return true;\n};\n\nURLStateMachine.prototype[\"parse file host\"] = function parseFileHost(c, cStr) {\n if (isNaN(c) || c === p(\"/\") || c === p(\"\\\\\") || c === p(\"?\") || c === p(\"#\")) {\n --this.pointer;\n if (!this.stateOverride && isWindowsDriveLetterString(this.buffer)) {\n this.parseError = true;\n this.state = \"path\";\n } else if (this.buffer === \"\") {\n this.url.host = \"\";\n if (this.stateOverride) {\n return false;\n }\n this.state = \"path start\";\n } else {\n let host = parseHost(this.buffer, isNotSpecial(this.url));\n if (host === failure) {\n return failure;\n }\n if (host === \"localhost\") {\n host = \"\";\n }\n this.url.host = host;\n\n if (this.stateOverride) {\n return false;\n }\n\n this.buffer = \"\";\n this.state = \"path start\";\n }\n } else {\n this.buffer += cStr;\n }\n\n return true;\n};\n\nURLStateMachine.prototype[\"parse path start\"] = function parsePathStart(c) {\n if (isSpecial(this.url)) {\n if (c === p(\"\\\\\")) {\n this.parseError = true;\n }\n this.state = \"path\";\n\n if (c !== p(\"/\") && c !== p(\"\\\\\")) {\n --this.pointer;\n }\n } else if (!this.stateOverride && c === p(\"?\")) {\n this.url.query = \"\";\n this.state = \"query\";\n } else if (!this.stateOverride && c === p(\"#\")) {\n this.url.fragment = \"\";\n this.state = \"fragment\";\n } else if (c !== undefined) {\n this.state = \"path\";\n if (c !== p(\"/\")) {\n --this.pointer;\n }\n } else if (this.stateOverride && this.url.host === null) {\n this.url.path.push(\"\");\n }\n\n return true;\n};\n\nURLStateMachine.prototype[\"parse path\"] = function parsePath(c) {\n if (isNaN(c) || c === p(\"/\") || (isSpecial(this.url) && c === p(\"\\\\\")) ||\n (!this.stateOverride && (c === p(\"?\") || c === p(\"#\")))) {\n if (isSpecial(this.url) && c === p(\"\\\\\")) {\n this.parseError = true;\n }\n\n if (isDoubleDot(this.buffer)) {\n shortenPath(this.url);\n if (c !== p(\"/\") && !(isSpecial(this.url) && c === p(\"\\\\\"))) {\n this.url.path.push(\"\");\n }\n } else if (isSingleDot(this.buffer) && c !== p(\"/\") &&\n !(isSpecial(this.url) && c === p(\"\\\\\"))) {\n this.url.path.push(\"\");\n } else if (!isSingleDot(this.buffer)) {\n if (this.url.scheme === \"file\" && this.url.path.length === 0 && isWindowsDriveLetterString(this.buffer)) {\n this.buffer = `${this.buffer[0]}:`;\n }\n this.url.path.push(this.buffer);\n }\n this.buffer = \"\";\n if (c === p(\"?\")) {\n this.url.query = \"\";\n this.state = \"query\";\n }\n if (c === p(\"#\")) {\n this.url.fragment = \"\";\n this.state = \"fragment\";\n }\n } else {\n // TODO: If c is not a URL code point and not \"%\", parse error.\n\n if (c === p(\"%\") &&\n (!infra.isASCIIHex(this.input[this.pointer + 1]) ||\n !infra.isASCIIHex(this.input[this.pointer + 2]))) {\n this.parseError = true;\n }\n\n this.buffer += utf8PercentEncodeCodePoint(c, isPathPercentEncode);\n }\n\n return true;\n};\n\nURLStateMachine.prototype[\"parse opaque path\"] = function parseOpaquePath(c) {\n if (c === p(\"?\")) {\n this.url.query = \"\";\n this.state = \"query\";\n } else if (c === p(\"#\")) {\n this.url.fragment = \"\";\n this.state = \"fragment\";\n } else {\n // TODO: Add: not a URL code point\n if (!isNaN(c) && c !== p(\"%\")) {\n this.parseError = true;\n }\n\n if (c === p(\"%\") &&\n (!infra.isASCIIHex(this.input[this.pointer + 1]) ||\n !infra.isASCIIHex(this.input[this.pointer + 2]))) {\n this.parseError = true;\n }\n\n if (!isNaN(c)) {\n this.url.path += utf8PercentEncodeCodePoint(c, isC0ControlPercentEncode);\n }\n }\n\n return true;\n};\n\nURLStateMachine.prototype[\"parse query\"] = function parseQuery(c, cStr) {\n if (!isSpecial(this.url) || this.url.scheme === \"ws\" || this.url.scheme === \"wss\") {\n this.encodingOverride = \"utf-8\";\n }\n\n if ((!this.stateOverride && c === p(\"#\")) || isNaN(c)) {\n const queryPercentEncodePredicate = isSpecial(this.url) ? isSpecialQueryPercentEncode : isQueryPercentEncode;\n this.url.query += utf8PercentEncodeString(this.buffer, queryPercentEncodePredicate);\n\n this.buffer = \"\";\n\n if (c === p(\"#\")) {\n this.url.fragment = \"\";\n this.state = \"fragment\";\n }\n } else if (!isNaN(c)) {\n // TODO: If c is not a URL code point and not \"%\", parse error.\n\n if (c === p(\"%\") &&\n (!infra.isASCIIHex(this.input[this.pointer + 1]) ||\n !infra.isASCIIHex(this.input[this.pointer + 2]))) {\n this.parseError = true;\n }\n\n this.buffer += cStr;\n }\n\n return true;\n};\n\nURLStateMachine.prototype[\"parse fragment\"] = function parseFragment(c) {\n if (!isNaN(c)) {\n // TODO: If c is not a URL code point and not \"%\", parse error.\n if (c === p(\"%\") &&\n (!infra.isASCIIHex(this.input[this.pointer + 1]) ||\n !infra.isASCIIHex(this.input[this.pointer + 2]))) {\n this.parseError = true;\n }\n\n this.url.fragment += utf8PercentEncodeCodePoint(c, isFragmentPercentEncode);\n }\n\n return true;\n};\n\nfunction serializeURL(url, excludeFragment) {\n let output = `${url.scheme}:`;\n if (url.host !== null) {\n output += \"//\";\n\n if (url.username !== \"\" || url.password !== \"\") {\n output += url.username;\n if (url.password !== \"\") {\n output += `:${url.password}`;\n }\n output += \"@\";\n }\n\n output += serializeHost(url.host);\n\n if (url.port !== null) {\n output += `:${url.port}`;\n }\n }\n\n if (url.host === null && !hasAnOpaquePath(url) && url.path.length > 1 && url.path[0] === \"\") {\n output += \"/.\";\n }\n output += serializePath(url);\n\n if (url.query !== null) {\n output += `?${url.query}`;\n }\n\n if (!excludeFragment && url.fragment !== null) {\n output += `#${url.fragment}`;\n }\n\n return output;\n}\n\nfunction serializeOrigin(tuple) {\n let result = `${tuple.scheme}://`;\n result += serializeHost(tuple.host);\n\n if (tuple.port !== null) {\n result += `:${tuple.port}`;\n }\n\n return result;\n}\n\nfunction serializePath(url) {\n if (hasAnOpaquePath(url)) {\n return url.path;\n }\n\n let output = \"\";\n for (const segment of url.path) {\n output += `/${segment}`;\n }\n return output;\n}\n\nmodule.exports.serializeURL = serializeURL;\n\nmodule.exports.serializePath = serializePath;\n\nmodule.exports.serializeURLOrigin = function (url) {\n // https://url.spec.whatwg.org/#concept-url-origin\n switch (url.scheme) {\n case \"blob\":\n try {\n return module.exports.serializeURLOrigin(module.exports.parseURL(serializePath(url)));\n } catch (e) {\n // serializing an opaque origin returns \"null\"\n return \"null\";\n }\n case \"ftp\":\n case \"http\":\n case \"https\":\n case \"ws\":\n case \"wss\":\n return serializeOrigin({\n scheme: url.scheme,\n host: url.host,\n port: url.port\n });\n case \"file\":\n // The spec says:\n // > Unfortunate as it is, this is left as an exercise to the reader. When in doubt, return a new opaque origin.\n // Browsers tested so far:\n // - Chrome says \"file://\", but treats file: URLs as cross-origin for most (all?) purposes; see e.g.\n // https://bugs.chromium.org/p/chromium/issues/detail?id=37586\n // - Firefox says \"null\", but treats file: URLs as same-origin sometimes based on directory stuff; see\n // https://developer.mozilla.org/en-US/docs/Archive/Misc_top_level/Same-origin_policy_for_file:_URIs\n return \"null\";\n default:\n // serializing an opaque origin returns \"null\"\n return \"null\";\n }\n};\n\nmodule.exports.basicURLParse = function (input, options) {\n if (options === undefined) {\n options = {};\n }\n\n const usm = new URLStateMachine(input, options.baseURL, options.encodingOverride, options.url, options.stateOverride);\n if (usm.failure) {\n return null;\n }\n\n return usm.url;\n};\n\nmodule.exports.setTheUsername = function (url, username) {\n url.username = utf8PercentEncodeString(username, isUserinfoPercentEncode);\n};\n\nmodule.exports.setThePassword = function (url, password) {\n url.password = utf8PercentEncodeString(password, isUserinfoPercentEncode);\n};\n\nmodule.exports.serializeHost = serializeHost;\n\nmodule.exports.cannotHaveAUsernamePasswordPort = cannotHaveAUsernamePasswordPort;\n\nmodule.exports.hasAnOpaquePath = hasAnOpaquePath;\n\nmodule.exports.serializeInteger = function (integer) {\n return String(integer);\n};\n\nmodule.exports.parseURL = function (input, options) {\n if (options === undefined) {\n options = {};\n }\n\n // We don't handle blobs, so this just delegates:\n return module.exports.basicURLParse(input, { baseURL: options.baseURL, encodingOverride: options.encodingOverride });\n};\n","\"use strict\";\nconst { utf8Encode, utf8DecodeWithoutBOM } = require(\"./encoding\");\nconst { percentDecodeBytes, utf8PercentEncodeString, isURLEncodedPercentEncode } = require(\"./percent-encoding\");\n\nfunction p(char) {\n return char.codePointAt(0);\n}\n\n// https://url.spec.whatwg.org/#concept-urlencoded-parser\nfunction parseUrlencoded(input) {\n const sequences = strictlySplitByteSequence(input, p(\"&\"));\n const output = [];\n for (const bytes of sequences) {\n if (bytes.length === 0) {\n continue;\n }\n\n let name, value;\n const indexOfEqual = bytes.indexOf(p(\"=\"));\n\n if (indexOfEqual >= 0) {\n name = bytes.slice(0, indexOfEqual);\n value = bytes.slice(indexOfEqual + 1);\n } else {\n name = bytes;\n value = new Uint8Array(0);\n }\n\n name = replaceByteInByteSequence(name, 0x2B, 0x20);\n value = replaceByteInByteSequence(value, 0x2B, 0x20);\n\n const nameString = utf8DecodeWithoutBOM(percentDecodeBytes(name));\n const valueString = utf8DecodeWithoutBOM(percentDecodeBytes(value));\n\n output.push([nameString, valueString]);\n }\n return output;\n}\n\n// https://url.spec.whatwg.org/#concept-urlencoded-string-parser\nfunction parseUrlencodedString(input) {\n return parseUrlencoded(utf8Encode(input));\n}\n\n// https://url.spec.whatwg.org/#concept-urlencoded-serializer\nfunction serializeUrlencoded(tuples, encodingOverride = undefined) {\n let encoding = \"utf-8\";\n if (encodingOverride !== undefined) {\n // TODO \"get the output encoding\", i.e. handle encoding labels vs. names.\n encoding = encodingOverride;\n }\n\n let output = \"\";\n for (const [i, tuple] of tuples.entries()) {\n // TODO: handle encoding override\n\n const name = utf8PercentEncodeString(tuple[0], isURLEncodedPercentEncode, true);\n\n let value = tuple[1];\n if (tuple.length > 2 && tuple[2] !== undefined) {\n if (tuple[2] === \"hidden\" && name === \"_charset_\") {\n value = encoding;\n } else if (tuple[2] === \"file\") {\n // value is a File object\n value = value.name;\n }\n }\n\n value = utf8PercentEncodeString(value, isURLEncodedPercentEncode, true);\n\n if (i !== 0) {\n output += \"&\";\n }\n output += `${name}=${value}`;\n }\n return output;\n}\n\nfunction strictlySplitByteSequence(buf, cp) {\n const list = [];\n let last = 0;\n let i = buf.indexOf(cp);\n while (i >= 0) {\n list.push(buf.slice(last, i));\n last = i + 1;\n i = buf.indexOf(cp, last);\n }\n if (last !== buf.length) {\n list.push(buf.slice(last));\n }\n return list;\n}\n\nfunction replaceByteInByteSequence(buf, from, to) {\n let i = buf.indexOf(from);\n while (i >= 0) {\n buf[i] = to;\n i = buf.indexOf(from, i + 1);\n }\n return buf;\n}\n\nmodule.exports = {\n parseUrlencodedString,\n serializeUrlencoded\n};\n","\"use strict\";\n\nconst conversions = require(\"webidl-conversions\");\nconst utils = require(\"./utils.js\");\n\nexports.convert = (globalObject, value, { context = \"The provided value\" } = {}) => {\n if (typeof value !== \"function\") {\n throw new globalObject.TypeError(context + \" is not a function\");\n }\n\n function invokeTheCallbackFunction(...args) {\n const thisArg = utils.tryWrapperForImpl(this);\n let callResult;\n\n for (let i = 0; i < args.length; i++) {\n args[i] = utils.tryWrapperForImpl(args[i]);\n }\n\n callResult = Reflect.apply(value, thisArg, args);\n\n callResult = conversions[\"any\"](callResult, { context: context, globals: globalObject });\n\n return callResult;\n }\n\n invokeTheCallbackFunction.construct = (...args) => {\n for (let i = 0; i < args.length; i++) {\n args[i] = utils.tryWrapperForImpl(args[i]);\n }\n\n let callResult = Reflect.construct(value, args);\n\n callResult = conversions[\"any\"](callResult, { context: context, globals: globalObject });\n\n return callResult;\n };\n\n invokeTheCallbackFunction[utils.wrapperSymbol] = value;\n invokeTheCallbackFunction.objectReference = value;\n\n return invokeTheCallbackFunction;\n};\n","\"use strict\";\nconst urlencoded = require(\"./urlencoded\");\n\nexports.implementation = class URLSearchParamsImpl {\n constructor(globalObject, constructorArgs, { doNotStripQMark = false }) {\n let init = constructorArgs[0];\n this._list = [];\n this._url = null;\n\n if (!doNotStripQMark && typeof init === \"string\" && init[0] === \"?\") {\n init = init.slice(1);\n }\n\n if (Array.isArray(init)) {\n for (const pair of init) {\n if (pair.length !== 2) {\n throw new TypeError(\"Failed to construct 'URLSearchParams': parameter 1 sequence's element does not \" +\n \"contain exactly two elements.\");\n }\n this._list.push([pair[0], pair[1]]);\n }\n } else if (typeof init === \"object\" && Object.getPrototypeOf(init) === null) {\n for (const name of Object.keys(init)) {\n const value = init[name];\n this._list.push([name, value]);\n }\n } else {\n this._list = urlencoded.parseUrlencodedString(init);\n }\n }\n\n _updateSteps() {\n if (this._url !== null) {\n let serializedQuery = urlencoded.serializeUrlencoded(this._list);\n if (serializedQuery === \"\") {\n serializedQuery = null;\n }\n\n this._url._url.query = serializedQuery;\n\n if (serializedQuery === null) {\n this._url._potentiallyStripTrailingSpacesFromAnOpaquePath();\n }\n }\n }\n\n append(name, value) {\n this._list.push([name, value]);\n this._updateSteps();\n }\n\n delete(name) {\n let i = 0;\n while (i < this._list.length) {\n if (this._list[i][0] === name) {\n this._list.splice(i, 1);\n } else {\n i++;\n }\n }\n this._updateSteps();\n }\n\n get(name) {\n for (const tuple of this._list) {\n if (tuple[0] === name) {\n return tuple[1];\n }\n }\n return null;\n }\n\n getAll(name) {\n const output = [];\n for (const tuple of this._list) {\n if (tuple[0] === name) {\n output.push(tuple[1]);\n }\n }\n return output;\n }\n\n has(name) {\n for (const tuple of this._list) {\n if (tuple[0] === name) {\n return true;\n }\n }\n return false;\n }\n\n set(name, value) {\n let found = false;\n let i = 0;\n while (i < this._list.length) {\n if (this._list[i][0] === name) {\n if (found) {\n this._list.splice(i, 1);\n } else {\n found = true;\n this._list[i][1] = value;\n i++;\n }\n } else {\n i++;\n }\n }\n if (!found) {\n this._list.push([name, value]);\n }\n this._updateSteps();\n }\n\n sort() {\n this._list.sort((a, b) => {\n if (a[0] < b[0]) {\n return -1;\n }\n if (a[0] > b[0]) {\n return 1;\n }\n return 0;\n });\n\n this._updateSteps();\n }\n\n [Symbol.iterator]() {\n return this._list[Symbol.iterator]();\n }\n\n toString() {\n return urlencoded.serializeUrlencoded(this._list);\n }\n};\n","\"use strict\";\n\nconst conversions = require(\"webidl-conversions\");\nconst utils = require(\"./utils.js\");\n\nconst Function = require(\"./Function.js\");\nconst newObjectInRealm = utils.newObjectInRealm;\nconst implSymbol = utils.implSymbol;\nconst ctorRegistrySymbol = utils.ctorRegistrySymbol;\n\nconst interfaceName = \"URLSearchParams\";\n\nexports.is = value => {\n return utils.isObject(value) && utils.hasOwn(value, implSymbol) && value[implSymbol] instanceof Impl.implementation;\n};\nexports.isImpl = value => {\n return utils.isObject(value) && value instanceof Impl.implementation;\n};\nexports.convert = (globalObject, value, { context = \"The provided value\" } = {}) => {\n if (exports.is(value)) {\n return utils.implForWrapper(value);\n }\n throw new globalObject.TypeError(`${context} is not of type 'URLSearchParams'.`);\n};\n\nexports.createDefaultIterator = (globalObject, target, kind) => {\n const ctorRegistry = globalObject[ctorRegistrySymbol];\n const iteratorPrototype = ctorRegistry[\"URLSearchParams Iterator\"];\n const iterator = Object.create(iteratorPrototype);\n Object.defineProperty(iterator, utils.iterInternalSymbol, {\n value: { target, kind, index: 0 },\n configurable: true\n });\n return iterator;\n};\n\nfunction makeWrapper(globalObject, newTarget) {\n let proto;\n if (newTarget !== undefined) {\n proto = newTarget.prototype;\n }\n\n if (!utils.isObject(proto)) {\n proto = globalObject[ctorRegistrySymbol][\"URLSearchParams\"].prototype;\n }\n\n return Object.create(proto);\n}\n\nexports.create = (globalObject, constructorArgs, privateData) => {\n const wrapper = makeWrapper(globalObject);\n return exports.setup(wrapper, globalObject, constructorArgs, privateData);\n};\n\nexports.createImpl = (globalObject, constructorArgs, privateData) => {\n const wrapper = exports.create(globalObject, constructorArgs, privateData);\n return utils.implForWrapper(wrapper);\n};\n\nexports._internalSetup = (wrapper, globalObject) => {};\n\nexports.setup = (wrapper, globalObject, constructorArgs = [], privateData = {}) => {\n privateData.wrapper = wrapper;\n\n exports._internalSetup(wrapper, globalObject);\n Object.defineProperty(wrapper, implSymbol, {\n value: new Impl.implementation(globalObject, constructorArgs, privateData),\n configurable: true\n });\n\n wrapper[implSymbol][utils.wrapperSymbol] = wrapper;\n if (Impl.init) {\n Impl.init(wrapper[implSymbol]);\n }\n return wrapper;\n};\n\nexports.new = (globalObject, newTarget) => {\n const wrapper = makeWrapper(globalObject, newTarget);\n\n exports._internalSetup(wrapper, globalObject);\n Object.defineProperty(wrapper, implSymbol, {\n value: Object.create(Impl.implementation.prototype),\n configurable: true\n });\n\n wrapper[implSymbol][utils.wrapperSymbol] = wrapper;\n if (Impl.init) {\n Impl.init(wrapper[implSymbol]);\n }\n return wrapper[implSymbol];\n};\n\nconst exposed = new Set([\"Window\", \"Worker\"]);\n\nexports.install = (globalObject, globalNames) => {\n if (!globalNames.some(globalName => exposed.has(globalName))) {\n return;\n }\n\n const ctorRegistry = utils.initCtorRegistry(globalObject);\n class URLSearchParams {\n constructor() {\n const args = [];\n {\n let curArg = arguments[0];\n if (curArg !== undefined) {\n if (utils.isObject(curArg)) {\n if (curArg[Symbol.iterator] !== undefined) {\n if (!utils.isObject(curArg)) {\n throw new globalObject.TypeError(\n \"Failed to construct 'URLSearchParams': parameter 1\" + \" sequence\" + \" is not an iterable object.\"\n );\n } else {\n const V = [];\n const tmp = curArg;\n for (let nextItem of tmp) {\n if (!utils.isObject(nextItem)) {\n throw new globalObject.TypeError(\n \"Failed to construct 'URLSearchParams': parameter 1\" +\n \" sequence\" +\n \"'s element\" +\n \" is not an iterable object.\"\n );\n } else {\n const V = [];\n const tmp = nextItem;\n for (let nextItem of tmp) {\n nextItem = conversions[\"USVString\"](nextItem, {\n context:\n \"Failed to construct 'URLSearchParams': parameter 1\" +\n \" sequence\" +\n \"'s element\" +\n \"'s element\",\n globals: globalObject\n });\n\n V.push(nextItem);\n }\n nextItem = V;\n }\n\n V.push(nextItem);\n }\n curArg = V;\n }\n } else {\n if (!utils.isObject(curArg)) {\n throw new globalObject.TypeError(\n \"Failed to construct 'URLSearchParams': parameter 1\" + \" record\" + \" is not an object.\"\n );\n } else {\n const result = Object.create(null);\n for (const key of Reflect.ownKeys(curArg)) {\n const desc = Object.getOwnPropertyDescriptor(curArg, key);\n if (desc && desc.enumerable) {\n let typedKey = key;\n\n typedKey = conversions[\"USVString\"](typedKey, {\n context: \"Failed to construct 'URLSearchParams': parameter 1\" + \" record\" + \"'s key\",\n globals: globalObject\n });\n\n let typedValue = curArg[key];\n\n typedValue = conversions[\"USVString\"](typedValue, {\n context: \"Failed to construct 'URLSearchParams': parameter 1\" + \" record\" + \"'s value\",\n globals: globalObject\n });\n\n result[typedKey] = typedValue;\n }\n }\n curArg = result;\n }\n }\n } else {\n curArg = conversions[\"USVString\"](curArg, {\n context: \"Failed to construct 'URLSearchParams': parameter 1\",\n globals: globalObject\n });\n }\n } else {\n curArg = \"\";\n }\n args.push(curArg);\n }\n return exports.setup(Object.create(new.target.prototype), globalObject, args);\n }\n\n append(name, value) {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\n \"'append' called on an object that is not a valid instance of URLSearchParams.\"\n );\n }\n\n if (arguments.length < 2) {\n throw new globalObject.TypeError(\n `Failed to execute 'append' on 'URLSearchParams': 2 arguments required, but only ${arguments.length} present.`\n );\n }\n const args = [];\n {\n let curArg = arguments[0];\n curArg = conversions[\"USVString\"](curArg, {\n context: \"Failed to execute 'append' on 'URLSearchParams': parameter 1\",\n globals: globalObject\n });\n args.push(curArg);\n }\n {\n let curArg = arguments[1];\n curArg = conversions[\"USVString\"](curArg, {\n context: \"Failed to execute 'append' on 'URLSearchParams': parameter 2\",\n globals: globalObject\n });\n args.push(curArg);\n }\n return utils.tryWrapperForImpl(esValue[implSymbol].append(...args));\n }\n\n delete(name) {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\n \"'delete' called on an object that is not a valid instance of URLSearchParams.\"\n );\n }\n\n if (arguments.length < 1) {\n throw new globalObject.TypeError(\n `Failed to execute 'delete' on 'URLSearchParams': 1 argument required, but only ${arguments.length} present.`\n );\n }\n const args = [];\n {\n let curArg = arguments[0];\n curArg = conversions[\"USVString\"](curArg, {\n context: \"Failed to execute 'delete' on 'URLSearchParams': parameter 1\",\n globals: globalObject\n });\n args.push(curArg);\n }\n return utils.tryWrapperForImpl(esValue[implSymbol].delete(...args));\n }\n\n get(name) {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'get' called on an object that is not a valid instance of URLSearchParams.\");\n }\n\n if (arguments.length < 1) {\n throw new globalObject.TypeError(\n `Failed to execute 'get' on 'URLSearchParams': 1 argument required, but only ${arguments.length} present.`\n );\n }\n const args = [];\n {\n let curArg = arguments[0];\n curArg = conversions[\"USVString\"](curArg, {\n context: \"Failed to execute 'get' on 'URLSearchParams': parameter 1\",\n globals: globalObject\n });\n args.push(curArg);\n }\n return esValue[implSymbol].get(...args);\n }\n\n getAll(name) {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\n \"'getAll' called on an object that is not a valid instance of URLSearchParams.\"\n );\n }\n\n if (arguments.length < 1) {\n throw new globalObject.TypeError(\n `Failed to execute 'getAll' on 'URLSearchParams': 1 argument required, but only ${arguments.length} present.`\n );\n }\n const args = [];\n {\n let curArg = arguments[0];\n curArg = conversions[\"USVString\"](curArg, {\n context: \"Failed to execute 'getAll' on 'URLSearchParams': parameter 1\",\n globals: globalObject\n });\n args.push(curArg);\n }\n return utils.tryWrapperForImpl(esValue[implSymbol].getAll(...args));\n }\n\n has(name) {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'has' called on an object that is not a valid instance of URLSearchParams.\");\n }\n\n if (arguments.length < 1) {\n throw new globalObject.TypeError(\n `Failed to execute 'has' on 'URLSearchParams': 1 argument required, but only ${arguments.length} present.`\n );\n }\n const args = [];\n {\n let curArg = arguments[0];\n curArg = conversions[\"USVString\"](curArg, {\n context: \"Failed to execute 'has' on 'URLSearchParams': parameter 1\",\n globals: globalObject\n });\n args.push(curArg);\n }\n return esValue[implSymbol].has(...args);\n }\n\n set(name, value) {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'set' called on an object that is not a valid instance of URLSearchParams.\");\n }\n\n if (arguments.length < 2) {\n throw new globalObject.TypeError(\n `Failed to execute 'set' on 'URLSearchParams': 2 arguments required, but only ${arguments.length} present.`\n );\n }\n const args = [];\n {\n let curArg = arguments[0];\n curArg = conversions[\"USVString\"](curArg, {\n context: \"Failed to execute 'set' on 'URLSearchParams': parameter 1\",\n globals: globalObject\n });\n args.push(curArg);\n }\n {\n let curArg = arguments[1];\n curArg = conversions[\"USVString\"](curArg, {\n context: \"Failed to execute 'set' on 'URLSearchParams': parameter 2\",\n globals: globalObject\n });\n args.push(curArg);\n }\n return utils.tryWrapperForImpl(esValue[implSymbol].set(...args));\n }\n\n sort() {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'sort' called on an object that is not a valid instance of URLSearchParams.\");\n }\n\n return utils.tryWrapperForImpl(esValue[implSymbol].sort());\n }\n\n toString() {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\n \"'toString' called on an object that is not a valid instance of URLSearchParams.\"\n );\n }\n\n return esValue[implSymbol].toString();\n }\n\n keys() {\n if (!exports.is(this)) {\n throw new globalObject.TypeError(\"'keys' called on an object that is not a valid instance of URLSearchParams.\");\n }\n return exports.createDefaultIterator(globalObject, this, \"key\");\n }\n\n values() {\n if (!exports.is(this)) {\n throw new globalObject.TypeError(\n \"'values' called on an object that is not a valid instance of URLSearchParams.\"\n );\n }\n return exports.createDefaultIterator(globalObject, this, \"value\");\n }\n\n entries() {\n if (!exports.is(this)) {\n throw new globalObject.TypeError(\n \"'entries' called on an object that is not a valid instance of URLSearchParams.\"\n );\n }\n return exports.createDefaultIterator(globalObject, this, \"key+value\");\n }\n\n forEach(callback) {\n if (!exports.is(this)) {\n throw new globalObject.TypeError(\n \"'forEach' called on an object that is not a valid instance of URLSearchParams.\"\n );\n }\n if (arguments.length < 1) {\n throw new globalObject.TypeError(\n \"Failed to execute 'forEach' on 'iterable': 1 argument required, but only 0 present.\"\n );\n }\n callback = Function.convert(globalObject, callback, {\n context: \"Failed to execute 'forEach' on 'iterable': The callback provided as parameter 1\"\n });\n const thisArg = arguments[1];\n let pairs = Array.from(this[implSymbol]);\n let i = 0;\n while (i < pairs.length) {\n const [key, value] = pairs[i].map(utils.tryWrapperForImpl);\n callback.call(thisArg, value, key, this);\n pairs = Array.from(this[implSymbol]);\n i++;\n }\n }\n }\n Object.defineProperties(URLSearchParams.prototype, {\n append: { enumerable: true },\n delete: { enumerable: true },\n get: { enumerable: true },\n getAll: { enumerable: true },\n has: { enumerable: true },\n set: { enumerable: true },\n sort: { enumerable: true },\n toString: { enumerable: true },\n keys: { enumerable: true },\n values: { enumerable: true },\n entries: { enumerable: true },\n forEach: { enumerable: true },\n [Symbol.toStringTag]: { value: \"URLSearchParams\", configurable: true },\n [Symbol.iterator]: { value: URLSearchParams.prototype.entries, configurable: true, writable: true }\n });\n ctorRegistry[interfaceName] = URLSearchParams;\n\n ctorRegistry[\"URLSearchParams Iterator\"] = Object.create(ctorRegistry[\"%IteratorPrototype%\"], {\n [Symbol.toStringTag]: {\n configurable: true,\n value: \"URLSearchParams Iterator\"\n }\n });\n utils.define(ctorRegistry[\"URLSearchParams Iterator\"], {\n next() {\n const internal = this && this[utils.iterInternalSymbol];\n if (!internal) {\n throw new globalObject.TypeError(\"next() called on a value that is not a URLSearchParams iterator object\");\n }\n\n const { target, kind, index } = internal;\n const values = Array.from(target[implSymbol]);\n const len = values.length;\n if (index >= len) {\n return newObjectInRealm(globalObject, { value: undefined, done: true });\n }\n\n const pair = values[index];\n internal.index = index + 1;\n return newObjectInRealm(globalObject, utils.iteratorResult(pair.map(utils.tryWrapperForImpl), kind));\n }\n });\n\n Object.defineProperty(globalObject, interfaceName, {\n configurable: true,\n writable: true,\n value: URLSearchParams\n });\n};\n\nconst Impl = require(\"./URLSearchParams-impl.js\");\n","\"use strict\";\nconst usm = require(\"./url-state-machine\");\nconst urlencoded = require(\"./urlencoded\");\nconst URLSearchParams = require(\"./URLSearchParams\");\n\nexports.implementation = class URLImpl {\n constructor(globalObject, constructorArgs) {\n const url = constructorArgs[0];\n const base = constructorArgs[1];\n\n let parsedBase = null;\n if (base !== undefined) {\n parsedBase = usm.basicURLParse(base);\n if (parsedBase === null) {\n throw new TypeError(`Invalid base URL: ${base}`);\n }\n }\n\n const parsedURL = usm.basicURLParse(url, { baseURL: parsedBase });\n if (parsedURL === null) {\n throw new TypeError(`Invalid URL: ${url}`);\n }\n\n const query = parsedURL.query !== null ? parsedURL.query : \"\";\n\n this._url = parsedURL;\n\n // We cannot invoke the \"new URLSearchParams object\" algorithm without going through the constructor, which strips\n // question mark by default. Therefore the doNotStripQMark hack is used.\n this._query = URLSearchParams.createImpl(globalObject, [query], { doNotStripQMark: true });\n this._query._url = this;\n }\n\n get href() {\n return usm.serializeURL(this._url);\n }\n\n set href(v) {\n const parsedURL = usm.basicURLParse(v);\n if (parsedURL === null) {\n throw new TypeError(`Invalid URL: ${v}`);\n }\n\n this._url = parsedURL;\n\n this._query._list.splice(0);\n const { query } = parsedURL;\n if (query !== null) {\n this._query._list = urlencoded.parseUrlencodedString(query);\n }\n }\n\n get origin() {\n return usm.serializeURLOrigin(this._url);\n }\n\n get protocol() {\n return `${this._url.scheme}:`;\n }\n\n set protocol(v) {\n usm.basicURLParse(`${v}:`, { url: this._url, stateOverride: \"scheme start\" });\n }\n\n get username() {\n return this._url.username;\n }\n\n set username(v) {\n if (usm.cannotHaveAUsernamePasswordPort(this._url)) {\n return;\n }\n\n usm.setTheUsername(this._url, v);\n }\n\n get password() {\n return this._url.password;\n }\n\n set password(v) {\n if (usm.cannotHaveAUsernamePasswordPort(this._url)) {\n return;\n }\n\n usm.setThePassword(this._url, v);\n }\n\n get host() {\n const url = this._url;\n\n if (url.host === null) {\n return \"\";\n }\n\n if (url.port === null) {\n return usm.serializeHost(url.host);\n }\n\n return `${usm.serializeHost(url.host)}:${usm.serializeInteger(url.port)}`;\n }\n\n set host(v) {\n if (usm.hasAnOpaquePath(this._url)) {\n return;\n }\n\n usm.basicURLParse(v, { url: this._url, stateOverride: \"host\" });\n }\n\n get hostname() {\n if (this._url.host === null) {\n return \"\";\n }\n\n return usm.serializeHost(this._url.host);\n }\n\n set hostname(v) {\n if (usm.hasAnOpaquePath(this._url)) {\n return;\n }\n\n usm.basicURLParse(v, { url: this._url, stateOverride: \"hostname\" });\n }\n\n get port() {\n if (this._url.port === null) {\n return \"\";\n }\n\n return usm.serializeInteger(this._url.port);\n }\n\n set port(v) {\n if (usm.cannotHaveAUsernamePasswordPort(this._url)) {\n return;\n }\n\n if (v === \"\") {\n this._url.port = null;\n } else {\n usm.basicURLParse(v, { url: this._url, stateOverride: \"port\" });\n }\n }\n\n get pathname() {\n return usm.serializePath(this._url);\n }\n\n set pathname(v) {\n if (usm.hasAnOpaquePath(this._url)) {\n return;\n }\n\n this._url.path = [];\n usm.basicURLParse(v, { url: this._url, stateOverride: \"path start\" });\n }\n\n get search() {\n if (this._url.query === null || this._url.query === \"\") {\n return \"\";\n }\n\n return `?${this._url.query}`;\n }\n\n set search(v) {\n const url = this._url;\n\n if (v === \"\") {\n url.query = null;\n this._query._list = [];\n this._potentiallyStripTrailingSpacesFromAnOpaquePath();\n return;\n }\n\n const input = v[0] === \"?\" ? v.substring(1) : v;\n url.query = \"\";\n usm.basicURLParse(input, { url, stateOverride: \"query\" });\n this._query._list = urlencoded.parseUrlencodedString(input);\n }\n\n get searchParams() {\n return this._query;\n }\n\n get hash() {\n if (this._url.fragment === null || this._url.fragment === \"\") {\n return \"\";\n }\n\n return `#${this._url.fragment}`;\n }\n\n set hash(v) {\n if (v === \"\") {\n this._url.fragment = null;\n this._potentiallyStripTrailingSpacesFromAnOpaquePath();\n return;\n }\n\n const input = v[0] === \"#\" ? v.substring(1) : v;\n this._url.fragment = \"\";\n usm.basicURLParse(input, { url: this._url, stateOverride: \"fragment\" });\n }\n\n toJSON() {\n return this.href;\n }\n\n _potentiallyStripTrailingSpacesFromAnOpaquePath() {\n if (!usm.hasAnOpaquePath(this._url)) {\n return;\n }\n\n if (this._url.fragment !== null) {\n return;\n }\n\n if (this._url.query !== null) {\n return;\n }\n\n this._url.path = this._url.path.replace(/\\u0020+$/u, \"\");\n }\n};\n","\"use strict\";\n\nconst conversions = require(\"webidl-conversions\");\nconst utils = require(\"./utils.js\");\n\nconst implSymbol = utils.implSymbol;\nconst ctorRegistrySymbol = utils.ctorRegistrySymbol;\n\nconst interfaceName = \"URL\";\n\nexports.is = value => {\n return utils.isObject(value) && utils.hasOwn(value, implSymbol) && value[implSymbol] instanceof Impl.implementation;\n};\nexports.isImpl = value => {\n return utils.isObject(value) && value instanceof Impl.implementation;\n};\nexports.convert = (globalObject, value, { context = \"The provided value\" } = {}) => {\n if (exports.is(value)) {\n return utils.implForWrapper(value);\n }\n throw new globalObject.TypeError(`${context} is not of type 'URL'.`);\n};\n\nfunction makeWrapper(globalObject, newTarget) {\n let proto;\n if (newTarget !== undefined) {\n proto = newTarget.prototype;\n }\n\n if (!utils.isObject(proto)) {\n proto = globalObject[ctorRegistrySymbol][\"URL\"].prototype;\n }\n\n return Object.create(proto);\n}\n\nexports.create = (globalObject, constructorArgs, privateData) => {\n const wrapper = makeWrapper(globalObject);\n return exports.setup(wrapper, globalObject, constructorArgs, privateData);\n};\n\nexports.createImpl = (globalObject, constructorArgs, privateData) => {\n const wrapper = exports.create(globalObject, constructorArgs, privateData);\n return utils.implForWrapper(wrapper);\n};\n\nexports._internalSetup = (wrapper, globalObject) => {};\n\nexports.setup = (wrapper, globalObject, constructorArgs = [], privateData = {}) => {\n privateData.wrapper = wrapper;\n\n exports._internalSetup(wrapper, globalObject);\n Object.defineProperty(wrapper, implSymbol, {\n value: new Impl.implementation(globalObject, constructorArgs, privateData),\n configurable: true\n });\n\n wrapper[implSymbol][utils.wrapperSymbol] = wrapper;\n if (Impl.init) {\n Impl.init(wrapper[implSymbol]);\n }\n return wrapper;\n};\n\nexports.new = (globalObject, newTarget) => {\n const wrapper = makeWrapper(globalObject, newTarget);\n\n exports._internalSetup(wrapper, globalObject);\n Object.defineProperty(wrapper, implSymbol, {\n value: Object.create(Impl.implementation.prototype),\n configurable: true\n });\n\n wrapper[implSymbol][utils.wrapperSymbol] = wrapper;\n if (Impl.init) {\n Impl.init(wrapper[implSymbol]);\n }\n return wrapper[implSymbol];\n};\n\nconst exposed = new Set([\"Window\", \"Worker\"]);\n\nexports.install = (globalObject, globalNames) => {\n if (!globalNames.some(globalName => exposed.has(globalName))) {\n return;\n }\n\n const ctorRegistry = utils.initCtorRegistry(globalObject);\n class URL {\n constructor(url) {\n if (arguments.length < 1) {\n throw new globalObject.TypeError(\n `Failed to construct 'URL': 1 argument required, but only ${arguments.length} present.`\n );\n }\n const args = [];\n {\n let curArg = arguments[0];\n curArg = conversions[\"USVString\"](curArg, {\n context: \"Failed to construct 'URL': parameter 1\",\n globals: globalObject\n });\n args.push(curArg);\n }\n {\n let curArg = arguments[1];\n if (curArg !== undefined) {\n curArg = conversions[\"USVString\"](curArg, {\n context: \"Failed to construct 'URL': parameter 2\",\n globals: globalObject\n });\n }\n args.push(curArg);\n }\n return exports.setup(Object.create(new.target.prototype), globalObject, args);\n }\n\n toJSON() {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'toJSON' called on an object that is not a valid instance of URL.\");\n }\n\n return esValue[implSymbol].toJSON();\n }\n\n get href() {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'get href' called on an object that is not a valid instance of URL.\");\n }\n\n return esValue[implSymbol][\"href\"];\n }\n\n set href(V) {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'set href' called on an object that is not a valid instance of URL.\");\n }\n\n V = conversions[\"USVString\"](V, {\n context: \"Failed to set the 'href' property on 'URL': The provided value\",\n globals: globalObject\n });\n\n esValue[implSymbol][\"href\"] = V;\n }\n\n toString() {\n const esValue = this;\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'toString' called on an object that is not a valid instance of URL.\");\n }\n\n return esValue[implSymbol][\"href\"];\n }\n\n get origin() {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'get origin' called on an object that is not a valid instance of URL.\");\n }\n\n return esValue[implSymbol][\"origin\"];\n }\n\n get protocol() {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'get protocol' called on an object that is not a valid instance of URL.\");\n }\n\n return esValue[implSymbol][\"protocol\"];\n }\n\n set protocol(V) {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'set protocol' called on an object that is not a valid instance of URL.\");\n }\n\n V = conversions[\"USVString\"](V, {\n context: \"Failed to set the 'protocol' property on 'URL': The provided value\",\n globals: globalObject\n });\n\n esValue[implSymbol][\"protocol\"] = V;\n }\n\n get username() {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'get username' called on an object that is not a valid instance of URL.\");\n }\n\n return esValue[implSymbol][\"username\"];\n }\n\n set username(V) {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'set username' called on an object that is not a valid instance of URL.\");\n }\n\n V = conversions[\"USVString\"](V, {\n context: \"Failed to set the 'username' property on 'URL': The provided value\",\n globals: globalObject\n });\n\n esValue[implSymbol][\"username\"] = V;\n }\n\n get password() {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'get password' called on an object that is not a valid instance of URL.\");\n }\n\n return esValue[implSymbol][\"password\"];\n }\n\n set password(V) {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'set password' called on an object that is not a valid instance of URL.\");\n }\n\n V = conversions[\"USVString\"](V, {\n context: \"Failed to set the 'password' property on 'URL': The provided value\",\n globals: globalObject\n });\n\n esValue[implSymbol][\"password\"] = V;\n }\n\n get host() {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'get host' called on an object that is not a valid instance of URL.\");\n }\n\n return esValue[implSymbol][\"host\"];\n }\n\n set host(V) {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'set host' called on an object that is not a valid instance of URL.\");\n }\n\n V = conversions[\"USVString\"](V, {\n context: \"Failed to set the 'host' property on 'URL': The provided value\",\n globals: globalObject\n });\n\n esValue[implSymbol][\"host\"] = V;\n }\n\n get hostname() {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'get hostname' called on an object that is not a valid instance of URL.\");\n }\n\n return esValue[implSymbol][\"hostname\"];\n }\n\n set hostname(V) {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'set hostname' called on an object that is not a valid instance of URL.\");\n }\n\n V = conversions[\"USVString\"](V, {\n context: \"Failed to set the 'hostname' property on 'URL': The provided value\",\n globals: globalObject\n });\n\n esValue[implSymbol][\"hostname\"] = V;\n }\n\n get port() {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'get port' called on an object that is not a valid instance of URL.\");\n }\n\n return esValue[implSymbol][\"port\"];\n }\n\n set port(V) {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'set port' called on an object that is not a valid instance of URL.\");\n }\n\n V = conversions[\"USVString\"](V, {\n context: \"Failed to set the 'port' property on 'URL': The provided value\",\n globals: globalObject\n });\n\n esValue[implSymbol][\"port\"] = V;\n }\n\n get pathname() {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'get pathname' called on an object that is not a valid instance of URL.\");\n }\n\n return esValue[implSymbol][\"pathname\"];\n }\n\n set pathname(V) {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'set pathname' called on an object that is not a valid instance of URL.\");\n }\n\n V = conversions[\"USVString\"](V, {\n context: \"Failed to set the 'pathname' property on 'URL': The provided value\",\n globals: globalObject\n });\n\n esValue[implSymbol][\"pathname\"] = V;\n }\n\n get search() {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'get search' called on an object that is not a valid instance of URL.\");\n }\n\n return esValue[implSymbol][\"search\"];\n }\n\n set search(V) {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'set search' called on an object that is not a valid instance of URL.\");\n }\n\n V = conversions[\"USVString\"](V, {\n context: \"Failed to set the 'search' property on 'URL': The provided value\",\n globals: globalObject\n });\n\n esValue[implSymbol][\"search\"] = V;\n }\n\n get searchParams() {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'get searchParams' called on an object that is not a valid instance of URL.\");\n }\n\n return utils.getSameObject(this, \"searchParams\", () => {\n return utils.tryWrapperForImpl(esValue[implSymbol][\"searchParams\"]);\n });\n }\n\n get hash() {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'get hash' called on an object that is not a valid instance of URL.\");\n }\n\n return esValue[implSymbol][\"hash\"];\n }\n\n set hash(V) {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'set hash' called on an object that is not a valid instance of URL.\");\n }\n\n V = conversions[\"USVString\"](V, {\n context: \"Failed to set the 'hash' property on 'URL': The provided value\",\n globals: globalObject\n });\n\n esValue[implSymbol][\"hash\"] = V;\n }\n }\n Object.defineProperties(URL.prototype, {\n toJSON: { enumerable: true },\n href: { enumerable: true },\n toString: { enumerable: true },\n origin: { enumerable: true },\n protocol: { enumerable: true },\n username: { enumerable: true },\n password: { enumerable: true },\n host: { enumerable: true },\n hostname: { enumerable: true },\n port: { enumerable: true },\n pathname: { enumerable: true },\n search: { enumerable: true },\n searchParams: { enumerable: true },\n hash: { enumerable: true },\n [Symbol.toStringTag]: { value: \"URL\", configurable: true }\n });\n ctorRegistry[interfaceName] = URL;\n\n Object.defineProperty(globalObject, interfaceName, {\n configurable: true,\n writable: true,\n value: URL\n });\n\n if (globalNames.includes(\"Window\")) {\n Object.defineProperty(globalObject, \"webkitURL\", {\n configurable: true,\n writable: true,\n value: URL\n });\n }\n};\n\nconst Impl = require(\"./URL-impl.js\");\n","\"use strict\";\n\nconst URL = require(\"./lib/URL\");\nconst URLSearchParams = require(\"./lib/URLSearchParams\");\n\nexports.URL = URL;\nexports.URLSearchParams = URLSearchParams;\n","\"use strict\";\n\nconst { URL, URLSearchParams } = require(\"./webidl2js-wrapper\");\nconst urlStateMachine = require(\"./lib/url-state-machine\");\nconst percentEncoding = require(\"./lib/percent-encoding\");\n\nconst sharedGlobalObject = { Array, Object, Promise, String, TypeError };\nURL.install(sharedGlobalObject, [\"Window\"]);\nURLSearchParams.install(sharedGlobalObject, [\"Window\"]);\n\nexports.URL = sharedGlobalObject.URL;\nexports.URLSearchParams = sharedGlobalObject.URLSearchParams;\n\nexports.parseURL = urlStateMachine.parseURL;\nexports.basicURLParse = urlStateMachine.basicURLParse;\nexports.serializeURL = urlStateMachine.serializeURL;\nexports.serializePath = urlStateMachine.serializePath;\nexports.serializeHost = urlStateMachine.serializeHost;\nexports.serializeInteger = urlStateMachine.serializeInteger;\nexports.serializeURLOrigin = urlStateMachine.serializeURLOrigin;\nexports.setTheUsername = urlStateMachine.setTheUsername;\nexports.setThePassword = urlStateMachine.setThePassword;\nexports.cannotHaveAUsernamePasswordPort = urlStateMachine.cannotHaveAUsernamePasswordPort;\nexports.hasAnOpaquePath = urlStateMachine.hasAnOpaquePath;\n\nexports.percentDecodeString = percentEncoding.percentDecodeString;\nexports.percentDecodeBytes = percentEncoding.percentDecodeBytes;\n","'use strict';\n\nmodule.exports = class SymbolTreeNode {\n constructor() {\n this.parent = null;\n this.previousSibling = null;\n this.nextSibling = null;\n\n this.firstChild = null;\n this.lastChild = null;\n\n /** This value is incremented anytime a children is added or removed */\n this.childrenVersion = 0;\n /** The last child object which has a cached index */\n this.childIndexCachedUpTo = null;\n\n /** This value represents the cached node index, as long as\n * cachedIndexVersion matches with the childrenVersion of the parent */\n this.cachedIndex = -1;\n this.cachedIndexVersion = NaN; // NaN is never equal to anything\n }\n\n get isAttached() {\n return Boolean(this.parent || this.previousSibling || this.nextSibling);\n }\n\n get hasChildren() {\n return Boolean(this.firstChild);\n }\n\n childrenChanged() {\n /* jshint -W016 */\n // integer wrap around\n this.childrenVersion = (this.childrenVersion + 1) & 0xFFFFFFFF;\n this.childIndexCachedUpTo = null;\n }\n\n getCachedIndex(parentNode) {\n // (assumes parentNode is actually the parent)\n if (this.cachedIndexVersion !== parentNode.childrenVersion) {\n this.cachedIndexVersion = NaN;\n // cachedIndex is no longer valid\n return -1;\n }\n\n return this.cachedIndex; // -1 if not cached\n }\n\n setCachedIndex(parentNode, index) {\n // (assumes parentNode is actually the parent)\n this.cachedIndexVersion = parentNode.childrenVersion;\n this.cachedIndex = index;\n }\n};\n","'use strict';\n\n/* eslint-disable sort-keys */\nmodule.exports = Object.freeze({\n // same as DOM DOCUMENT_POSITION_\n DISCONNECTED: 1,\n PRECEDING: 2,\n FOLLOWING: 4,\n CONTAINS: 8,\n CONTAINED_BY: 16,\n});\n","'use strict';\n\nconst TREE = Symbol();\nconst ROOT = Symbol();\nconst NEXT = Symbol();\nconst ITERATE_FUNC = Symbol();\n\nclass TreeIterator {\n constructor(tree, root, firstResult, iterateFunction) {\n this[TREE] = tree;\n this[ROOT] = root;\n this[NEXT] = firstResult;\n this[ITERATE_FUNC] = iterateFunction;\n }\n\n next() {\n const tree = this[TREE];\n const iterateFunc = this[ITERATE_FUNC];\n const root = this[ROOT];\n\n if (!this[NEXT]) {\n return {\n done: true,\n value: root,\n };\n }\n\n const value = this[NEXT];\n\n if (iterateFunc === 1) {\n this[NEXT] = tree._node(value).previousSibling;\n }\n else if (iterateFunc === 2) {\n this[NEXT] = tree._node(value).nextSibling;\n }\n else if (iterateFunc === 3) {\n this[NEXT] = tree._node(value).parent;\n }\n else if (iterateFunc === 4) {\n this[NEXT] = tree.preceding(value, {root: root});\n }\n else /* if (iterateFunc === 5)*/ {\n this[NEXT] = tree.following(value, {root: root});\n }\n\n return {\n done: false,\n value: value,\n };\n }\n}\n\nObject.defineProperty(TreeIterator.prototype, Symbol.iterator, {\n value: function() {\n return this;\n },\n writable: false,\n});\n\nTreeIterator.PREV = 1;\nTreeIterator.NEXT = 2;\nTreeIterator.PARENT = 3;\nTreeIterator.PRECEDING = 4;\nTreeIterator.FOLLOWING = 5;\n\nObject.freeze(TreeIterator);\nObject.freeze(TreeIterator.prototype);\n\nmodule.exports = TreeIterator;\n","'use strict';\n\n/**\n * @module symbol-tree\n * @author Joris van der Wel \n */\n\nconst SymbolTreeNode = require('./SymbolTreeNode');\nconst TreePosition = require('./TreePosition');\nconst TreeIterator = require('./TreeIterator');\n\nfunction returnTrue() {\n return true;\n}\n\nfunction reverseArrayIndex(array, reverseIndex) {\n return array[array.length - 1 - reverseIndex]; // no need to check `index >= 0`\n}\n\nclass SymbolTree {\n\n /**\n * @constructor\n * @alias module:symbol-tree\n * @param {string} [description='SymbolTree data'] Description used for the Symbol\n */\n constructor(description) {\n this.symbol = Symbol(description || 'SymbolTree data');\n }\n\n /**\n * You can use this function to (optionally) initialize an object right after its creation,\n * to take advantage of V8's fast properties. Also useful if you would like to\n * freeze your object.\n *\n * `O(1)`\n *\n * @method\n * @alias module:symbol-tree#initialize\n * @param {Object} object\n * @return {Object} object\n */\n initialize(object) {\n this._node(object);\n\n return object;\n }\n\n _node(object) {\n if (!object) {\n return null;\n }\n\n const node = object[this.symbol];\n\n if (node) {\n return node;\n }\n\n return (object[this.symbol] = new SymbolTreeNode());\n }\n\n /**\n * Returns `true` if the object has any children. Otherwise it returns `false`.\n *\n * * `O(1)`\n *\n * @method hasChildren\n * @memberOf module:symbol-tree#\n * @param {Object} object\n * @return {Boolean}\n */\n hasChildren(object) {\n return this._node(object).hasChildren;\n }\n\n /**\n * Returns the first child of the given object.\n *\n * * `O(1)`\n *\n * @method firstChild\n * @memberOf module:symbol-tree#\n * @param {Object} object\n * @return {Object}\n */\n firstChild(object) {\n return this._node(object).firstChild;\n }\n\n /**\n * Returns the last child of the given object.\n *\n * * `O(1)`\n *\n * @method lastChild\n * @memberOf module:symbol-tree#\n * @param {Object} object\n * @return {Object}\n */\n lastChild(object) {\n return this._node(object).lastChild;\n }\n\n /**\n * Returns the previous sibling of the given object.\n *\n * * `O(1)`\n *\n * @method previousSibling\n * @memberOf module:symbol-tree#\n * @param {Object} object\n * @return {Object}\n */\n previousSibling(object) {\n return this._node(object).previousSibling;\n }\n\n /**\n * Returns the next sibling of the given object.\n *\n * * `O(1)`\n *\n * @method nextSibling\n * @memberOf module:symbol-tree#\n * @param {Object} object\n * @return {Object}\n */\n nextSibling(object) {\n return this._node(object).nextSibling;\n }\n\n /**\n * Return the parent of the given object.\n *\n * * `O(1)`\n *\n * @method parent\n * @memberOf module:symbol-tree#\n * @param {Object} object\n * @return {Object}\n */\n parent(object) {\n return this._node(object).parent;\n }\n\n /**\n * Find the inclusive descendant that is last in tree order of the given object.\n *\n * * `O(n)` (worst case) where `n` is the depth of the subtree of `object`\n *\n * @method lastInclusiveDescendant\n * @memberOf module:symbol-tree#\n * @param {Object} object\n * @return {Object}\n */\n lastInclusiveDescendant(object) {\n let lastChild;\n let current = object;\n\n while ((lastChild = this._node(current).lastChild)) {\n current = lastChild;\n }\n\n return current;\n }\n\n /**\n * Find the preceding object (A) of the given object (B).\n * An object A is preceding an object B if A and B are in the same tree\n * and A comes before B in tree order.\n *\n * * `O(n)` (worst case)\n * * `O(1)` (amortized when walking the entire tree)\n *\n * @method preceding\n * @memberOf module:symbol-tree#\n * @param {Object} object\n * @param {Object} [options]\n * @param {Object} [options.root] If set, `root` must be an inclusive ancestor\n * of the return value (or else null is returned). This check _assumes_\n * that `root` is also an inclusive ancestor of the given `object`\n * @return {?Object}\n */\n preceding(object, options) {\n const treeRoot = options && options.root;\n\n if (object === treeRoot) {\n return null;\n }\n\n const previousSibling = this._node(object).previousSibling;\n\n if (previousSibling) {\n return this.lastInclusiveDescendant(previousSibling);\n }\n\n // if there is no previous sibling return the parent (might be null)\n return this._node(object).parent;\n }\n\n /**\n * Find the following object (A) of the given object (B).\n * An object A is following an object B if A and B are in the same tree\n * and A comes after B in tree order.\n *\n * * `O(n)` (worst case) where `n` is the amount of objects in the entire tree\n * * `O(1)` (amortized when walking the entire tree)\n *\n * @method following\n * @memberOf module:symbol-tree#\n * @param {!Object} object\n * @param {Object} [options]\n * @param {Object} [options.root] If set, `root` must be an inclusive ancestor\n * of the return value (or else null is returned). This check _assumes_\n * that `root` is also an inclusive ancestor of the given `object`\n * @param {Boolean} [options.skipChildren=false] If set, ignore the children of `object`\n * @return {?Object}\n */\n following(object, options) {\n const treeRoot = options && options.root;\n const skipChildren = options && options.skipChildren;\n\n const firstChild = !skipChildren && this._node(object).firstChild;\n\n if (firstChild) {\n return firstChild;\n }\n\n let current = object;\n\n do {\n if (current === treeRoot) {\n return null;\n }\n\n const nextSibling = this._node(current).nextSibling;\n\n if (nextSibling) {\n return nextSibling;\n }\n\n current = this._node(current).parent;\n } while (current);\n\n return null;\n }\n\n /**\n * Append all children of the given object to an array.\n *\n * * `O(n)` where `n` is the amount of children of the given `parent`\n *\n * @method childrenToArray\n * @memberOf module:symbol-tree#\n * @param {Object} parent\n * @param {Object} [options]\n * @param {Object[]} [options.array=[]]\n * @param {Function} [options.filter] Function to test each object before it is added to the array.\n * Invoked with arguments (object). Should return `true` if an object\n * is to be included.\n * @param {*} [options.thisArg] Value to use as `this` when executing `filter`.\n * @return {Object[]}\n */\n childrenToArray(parent, options) {\n const array = (options && options.array) || [];\n const filter = (options && options.filter) || returnTrue;\n const thisArg = (options && options.thisArg) || undefined;\n\n const parentNode = this._node(parent);\n let object = parentNode.firstChild;\n let index = 0;\n\n while (object) {\n const node = this._node(object);\n node.setCachedIndex(parentNode, index);\n\n if (filter.call(thisArg, object)) {\n array.push(object);\n }\n\n object = node.nextSibling;\n ++index;\n }\n\n return array;\n }\n\n /**\n * Append all inclusive ancestors of the given object to an array.\n *\n * * `O(n)` where `n` is the amount of ancestors of the given `object`\n *\n * @method ancestorsToArray\n * @memberOf module:symbol-tree#\n * @param {Object} object\n * @param {Object} [options]\n * @param {Object[]} [options.array=[]]\n * @param {Function} [options.filter] Function to test each object before it is added to the array.\n * Invoked with arguments (object). Should return `true` if an object\n * is to be included.\n * @param {*} [options.thisArg] Value to use as `this` when executing `filter`.\n * @return {Object[]}\n */\n ancestorsToArray(object, options) {\n const array = (options && options.array) || [];\n const filter = (options && options.filter) || returnTrue;\n const thisArg = (options && options.thisArg) || undefined;\n\n let ancestor = object;\n\n while (ancestor) {\n if (filter.call(thisArg, ancestor)) {\n array.push(ancestor);\n }\n ancestor = this._node(ancestor).parent;\n }\n\n return array;\n }\n\n /**\n * Append all descendants of the given object to an array (in tree order).\n *\n * * `O(n)` where `n` is the amount of objects in the sub-tree of the given `object`\n *\n * @method treeToArray\n * @memberOf module:symbol-tree#\n * @param {Object} root\n * @param {Object} [options]\n * @param {Object[]} [options.array=[]]\n * @param {Function} [options.filter] Function to test each object before it is added to the array.\n * Invoked with arguments (object). Should return `true` if an object\n * is to be included.\n * @param {*} [options.thisArg] Value to use as `this` when executing `filter`.\n * @return {Object[]}\n */\n treeToArray(root, options) {\n const array = (options && options.array) || [];\n const filter = (options && options.filter) || returnTrue;\n const thisArg = (options && options.thisArg) || undefined;\n\n let object = root;\n\n while (object) {\n if (filter.call(thisArg, object)) {\n array.push(object);\n }\n object = this.following(object, {root: root});\n }\n\n return array;\n }\n\n /**\n * Iterate over all children of the given object\n *\n * * `O(1)` for a single iteration\n *\n * @method childrenIterator\n * @memberOf module:symbol-tree#\n * @param {Object} parent\n * @param {Object} [options]\n * @param {Boolean} [options.reverse=false]\n * @return {Object} An iterable iterator (ES6)\n */\n childrenIterator(parent, options) {\n const reverse = options && options.reverse;\n const parentNode = this._node(parent);\n\n return new TreeIterator(\n this,\n parent,\n reverse ? parentNode.lastChild : parentNode.firstChild,\n reverse ? TreeIterator.PREV : TreeIterator.NEXT\n );\n }\n\n /**\n * Iterate over all the previous siblings of the given object. (in reverse tree order)\n *\n * * `O(1)` for a single iteration\n *\n * @method previousSiblingsIterator\n * @memberOf module:symbol-tree#\n * @param {Object} object\n * @return {Object} An iterable iterator (ES6)\n */\n previousSiblingsIterator(object) {\n return new TreeIterator(\n this,\n object,\n this._node(object).previousSibling,\n TreeIterator.PREV\n );\n }\n\n /**\n * Iterate over all the next siblings of the given object. (in tree order)\n *\n * * `O(1)` for a single iteration\n *\n * @method nextSiblingsIterator\n * @memberOf module:symbol-tree#\n * @param {Object} object\n * @return {Object} An iterable iterator (ES6)\n */\n nextSiblingsIterator(object) {\n return new TreeIterator(\n this,\n object,\n this._node(object).nextSibling,\n TreeIterator.NEXT\n );\n }\n\n /**\n * Iterate over all inclusive ancestors of the given object\n *\n * * `O(1)` for a single iteration\n *\n * @method ancestorsIterator\n * @memberOf module:symbol-tree#\n * @param {Object} object\n * @return {Object} An iterable iterator (ES6)\n */\n ancestorsIterator(object) {\n return new TreeIterator(\n this,\n object,\n object,\n TreeIterator.PARENT\n );\n }\n\n /**\n * Iterate over all descendants of the given object (in tree order).\n *\n * Where `n` is the amount of objects in the sub-tree of the given `root`:\n *\n * * `O(n)` (worst case for a single iteration)\n * * `O(n)` (amortized, when completing the iterator)\n *\n * @method treeIterator\n * @memberOf module:symbol-tree#\n * @param {Object} root\n * @param {Object} options\n * @param {Boolean} [options.reverse=false]\n * @return {Object} An iterable iterator (ES6)\n */\n treeIterator(root, options) {\n const reverse = options && options.reverse;\n\n return new TreeIterator(\n this,\n root,\n reverse ? this.lastInclusiveDescendant(root) : root,\n reverse ? TreeIterator.PRECEDING : TreeIterator.FOLLOWING\n );\n }\n\n /**\n * Find the index of the given object (the number of preceding siblings).\n *\n * * `O(n)` where `n` is the amount of preceding siblings\n * * `O(1)` (amortized, if the tree is not modified)\n *\n * @method index\n * @memberOf module:symbol-tree#\n * @param {Object} child\n * @return {Number} The number of preceding siblings, or -1 if the object has no parent\n */\n index(child) {\n const childNode = this._node(child);\n const parentNode = this._node(childNode.parent);\n\n if (!parentNode) {\n // In principal, you could also find out the number of preceding siblings\n // for objects that do not have a parent. This method limits itself only to\n // objects that have a parent because that lets us optimize more.\n return -1;\n }\n\n let currentIndex = childNode.getCachedIndex(parentNode);\n\n if (currentIndex >= 0) {\n return currentIndex;\n }\n\n currentIndex = 0;\n let object = parentNode.firstChild;\n\n if (parentNode.childIndexCachedUpTo) {\n const cachedUpToNode = this._node(parentNode.childIndexCachedUpTo);\n object = cachedUpToNode.nextSibling;\n currentIndex = cachedUpToNode.getCachedIndex(parentNode) + 1;\n }\n\n while (object) {\n const node = this._node(object);\n node.setCachedIndex(parentNode, currentIndex);\n\n if (object === child) {\n break;\n }\n\n ++currentIndex;\n object = node.nextSibling;\n }\n\n parentNode.childIndexCachedUpTo = child;\n\n return currentIndex;\n }\n\n /**\n * Calculate the number of children.\n *\n * * `O(n)` where `n` is the amount of children\n * * `O(1)` (amortized, if the tree is not modified)\n *\n * @method childrenCount\n * @memberOf module:symbol-tree#\n * @param {Object} parent\n * @return {Number}\n */\n childrenCount(parent) {\n const parentNode = this._node(parent);\n\n if (!parentNode.lastChild) {\n return 0;\n }\n\n return this.index(parentNode.lastChild) + 1;\n }\n\n /**\n * Compare the position of an object relative to another object. A bit set is returned:\n *\n *
    \n *
  • DISCONNECTED : 1
  • \n *
  • PRECEDING : 2
  • \n *
  • FOLLOWING : 4
  • \n *
  • CONTAINS : 8
  • \n *
  • CONTAINED_BY : 16
  • \n *
\n *\n * The semantics are the same as compareDocumentPosition in DOM, with the exception that\n * DISCONNECTED never occurs with any other bit.\n *\n * where `n` and `m` are the amount of ancestors of `left` and `right`;\n * where `o` is the amount of children of the lowest common ancestor of `left` and `right`:\n *\n * * `O(n + m + o)` (worst case)\n * * `O(n + m)` (amortized, if the tree is not modified)\n *\n * @method compareTreePosition\n * @memberOf module:symbol-tree#\n * @param {Object} left\n * @param {Object} right\n * @return {Number}\n */\n compareTreePosition(left, right) {\n // In DOM terms:\n // left = reference / context object\n // right = other\n\n if (left === right) {\n return 0;\n }\n\n /* jshint -W016 */\n\n const leftAncestors = []; { // inclusive\n let leftAncestor = left;\n\n while (leftAncestor) {\n if (leftAncestor === right) {\n return TreePosition.CONTAINS | TreePosition.PRECEDING;\n // other is ancestor of reference\n }\n\n leftAncestors.push(leftAncestor);\n leftAncestor = this.parent(leftAncestor);\n }\n }\n\n\n const rightAncestors = []; {\n let rightAncestor = right;\n\n while (rightAncestor) {\n if (rightAncestor === left) {\n return TreePosition.CONTAINED_BY | TreePosition.FOLLOWING;\n }\n\n rightAncestors.push(rightAncestor);\n rightAncestor = this.parent(rightAncestor);\n }\n }\n\n\n const root = reverseArrayIndex(leftAncestors, 0);\n\n if (!root || root !== reverseArrayIndex(rightAncestors, 0)) {\n // note: unlike DOM, preceding / following is not set here\n return TreePosition.DISCONNECTED;\n }\n\n // find the lowest common ancestor\n let commonAncestorIndex = 0;\n const ancestorsMinLength = Math.min(leftAncestors.length, rightAncestors.length);\n\n for (let i = 0; i < ancestorsMinLength; ++i) {\n const leftAncestor = reverseArrayIndex(leftAncestors, i);\n const rightAncestor = reverseArrayIndex(rightAncestors, i);\n\n if (leftAncestor !== rightAncestor) {\n break;\n }\n\n commonAncestorIndex = i;\n }\n\n // indexes within the common ancestor\n const leftIndex = this.index(reverseArrayIndex(leftAncestors, commonAncestorIndex + 1));\n const rightIndex = this.index(reverseArrayIndex(rightAncestors, commonAncestorIndex + 1));\n\n return rightIndex < leftIndex\n ? TreePosition.PRECEDING\n : TreePosition.FOLLOWING;\n }\n\n /**\n * Remove the object from this tree.\n * Has no effect if already removed.\n *\n * * `O(1)`\n *\n * @method remove\n * @memberOf module:symbol-tree#\n * @param {Object} removeObject\n * @return {Object} removeObject\n */\n remove(removeObject) {\n const removeNode = this._node(removeObject);\n const parentNode = this._node(removeNode.parent);\n const prevNode = this._node(removeNode.previousSibling);\n const nextNode = this._node(removeNode.nextSibling);\n\n if (parentNode) {\n if (parentNode.firstChild === removeObject) {\n parentNode.firstChild = removeNode.nextSibling;\n }\n\n if (parentNode.lastChild === removeObject) {\n parentNode.lastChild = removeNode.previousSibling;\n }\n }\n\n if (prevNode) {\n prevNode.nextSibling = removeNode.nextSibling;\n }\n\n if (nextNode) {\n nextNode.previousSibling = removeNode.previousSibling;\n }\n\n removeNode.parent = null;\n removeNode.previousSibling = null;\n removeNode.nextSibling = null;\n removeNode.cachedIndex = -1;\n removeNode.cachedIndexVersion = NaN;\n\n if (parentNode) {\n parentNode.childrenChanged();\n }\n\n return removeObject;\n }\n\n /**\n * Insert the given object before the reference object.\n * `newObject` is now the previous sibling of `referenceObject`.\n *\n * * `O(1)`\n *\n * @method insertBefore\n * @memberOf module:symbol-tree#\n * @param {Object} referenceObject\n * @param {Object} newObject\n * @throws {Error} If the newObject is already present in this SymbolTree\n * @return {Object} newObject\n */\n insertBefore(referenceObject, newObject) {\n const referenceNode = this._node(referenceObject);\n const prevNode = this._node(referenceNode.previousSibling);\n const newNode = this._node(newObject);\n const parentNode = this._node(referenceNode.parent);\n\n if (newNode.isAttached) {\n throw Error('Given object is already present in this SymbolTree, remove it first');\n }\n\n newNode.parent = referenceNode.parent;\n newNode.previousSibling = referenceNode.previousSibling;\n newNode.nextSibling = referenceObject;\n referenceNode.previousSibling = newObject;\n\n if (prevNode) {\n prevNode.nextSibling = newObject;\n }\n\n if (parentNode && parentNode.firstChild === referenceObject) {\n parentNode.firstChild = newObject;\n }\n\n if (parentNode) {\n parentNode.childrenChanged();\n }\n\n return newObject;\n }\n\n /**\n * Insert the given object after the reference object.\n * `newObject` is now the next sibling of `referenceObject`.\n *\n * * `O(1)`\n *\n * @method insertAfter\n * @memberOf module:symbol-tree#\n * @param {Object} referenceObject\n * @param {Object} newObject\n * @throws {Error} If the newObject is already present in this SymbolTree\n * @return {Object} newObject\n */\n insertAfter(referenceObject, newObject) {\n const referenceNode = this._node(referenceObject);\n const nextNode = this._node(referenceNode.nextSibling);\n const newNode = this._node(newObject);\n const parentNode = this._node(referenceNode.parent);\n\n if (newNode.isAttached) {\n throw Error('Given object is already present in this SymbolTree, remove it first');\n }\n\n newNode.parent = referenceNode.parent;\n newNode.previousSibling = referenceObject;\n newNode.nextSibling = referenceNode.nextSibling;\n referenceNode.nextSibling = newObject;\n\n if (nextNode) {\n nextNode.previousSibling = newObject;\n }\n\n if (parentNode && parentNode.lastChild === referenceObject) {\n parentNode.lastChild = newObject;\n }\n\n if (parentNode) {\n parentNode.childrenChanged();\n }\n\n return newObject;\n }\n\n /**\n * Insert the given object as the first child of the given reference object.\n * `newObject` is now the first child of `referenceObject`.\n *\n * * `O(1)`\n *\n * @method prependChild\n * @memberOf module:symbol-tree#\n * @param {Object} referenceObject\n * @param {Object} newObject\n * @throws {Error} If the newObject is already present in this SymbolTree\n * @return {Object} newObject\n */\n prependChild(referenceObject, newObject) {\n const referenceNode = this._node(referenceObject);\n const newNode = this._node(newObject);\n\n if (newNode.isAttached) {\n throw Error('Given object is already present in this SymbolTree, remove it first');\n }\n\n if (referenceNode.hasChildren) {\n this.insertBefore(referenceNode.firstChild, newObject);\n }\n else {\n newNode.parent = referenceObject;\n referenceNode.firstChild = newObject;\n referenceNode.lastChild = newObject;\n referenceNode.childrenChanged();\n }\n\n return newObject;\n }\n\n /**\n * Insert the given object as the last child of the given reference object.\n * `newObject` is now the last child of `referenceObject`.\n *\n * * `O(1)`\n *\n * @method appendChild\n * @memberOf module:symbol-tree#\n * @param {Object} referenceObject\n * @param {Object} newObject\n * @throws {Error} If the newObject is already present in this SymbolTree\n * @return {Object} newObject\n */\n appendChild(referenceObject, newObject) {\n const referenceNode = this._node(referenceObject);\n const newNode = this._node(newObject);\n\n if (newNode.isAttached) {\n throw Error('Given object is already present in this SymbolTree, remove it first');\n }\n\n if (referenceNode.hasChildren) {\n this.insertAfter(referenceNode.lastChild, newObject);\n }\n else {\n newNode.parent = referenceObject;\n referenceNode.firstChild = newObject;\n referenceNode.lastChild = newObject;\n referenceNode.childrenChanged();\n }\n\n return newObject;\n }\n}\n\nmodule.exports = SymbolTree;\nSymbolTree.TreePosition = TreePosition;\n","\"use strict\";\nconst SymbolTree = require(\"symbol-tree\");\n\nexports.cloningSteps = Symbol(\"cloning steps\");\n\n// TODO: the many underscore-prefixed hooks should move here\n// E.g. _attrModified (which maybe should be split into its per-spec variants)\n\n/**\n * This SymbolTree is used to build the tree for all Node in a document\n */\nexports.domSymbolTree = new SymbolTree(\"DOM SymbolTree\");\n","export default {}","\"use strict\";\nconst path = require(\"path\");\nconst whatwgURL = require(\"whatwg-url\");\nconst { domSymbolTree } = require(\"./living/helpers/internal-constants\");\nconst SYMBOL_TREE_POSITION = require(\"symbol-tree\").TreePosition;\n\nexports.toFileUrl = function (fileName) {\n // Beyond just the `path.resolve`, this is mostly for the benefit of Windows,\n // where we need to convert \"\\\" to \"/\" and add an extra \"/\" prefix before the\n // drive letter.\n let pathname = path.resolve(process.cwd(), fileName).replace(/\\\\/g, \"/\");\n if (pathname[0] !== \"/\") {\n pathname = \"/\" + pathname;\n }\n\n // path might contain spaces, so convert those to %20\n return \"file://\" + encodeURI(pathname);\n};\n\n/**\n * Define a set of properties on an object, by copying the property descriptors\n * from the original object.\n *\n * - `object` {Object} the target object\n * - `properties` {Object} the source from which to copy property descriptors\n */\nexports.define = function define(object, properties) {\n for (const name of Object.getOwnPropertyNames(properties)) {\n const propDesc = Object.getOwnPropertyDescriptor(properties, name);\n Object.defineProperty(object, name, propDesc);\n }\n};\n\n/**\n * Define a list of constants on a constructor and its .prototype\n *\n * - `Constructor` {Function} the constructor to define the constants on\n * - `propertyMap` {Object} key/value map of properties to define\n */\nexports.addConstants = function addConstants(Constructor, propertyMap) {\n for (const property in propertyMap) {\n const value = propertyMap[property];\n addConstant(Constructor, property, value);\n addConstant(Constructor.prototype, property, value);\n }\n};\n\nfunction addConstant(object, property, value) {\n Object.defineProperty(object, property, {\n configurable: false,\n enumerable: true,\n writable: false,\n value\n });\n}\n\nexports.mixin = (target, source) => {\n const keys = Reflect.ownKeys(source);\n for (let i = 0; i < keys.length; ++i) {\n if (keys[i] in target) {\n continue;\n }\n\n Object.defineProperty(target, keys[i], Object.getOwnPropertyDescriptor(source, keys[i]));\n }\n};\n\nlet memoizeQueryTypeCounter = 0;\n\n/**\n * Returns a version of a method that memoizes specific types of calls on the object\n *\n * - `fn` {Function} the method to be memozied\n */\nexports.memoizeQuery = function memoizeQuery(fn) {\n // Only memoize query functions with arity <= 2\n if (fn.length > 2) {\n return fn;\n }\n\n const type = memoizeQueryTypeCounter++;\n\n return function (...args) {\n if (!this._memoizedQueries) {\n return fn.apply(this, args);\n }\n\n if (!this._memoizedQueries[type]) {\n this._memoizedQueries[type] = Object.create(null);\n }\n\n let key;\n if (args.length === 1 && typeof args[0] === \"string\") {\n key = args[0];\n } else if (args.length === 2 && typeof args[0] === \"string\" && typeof args[1] === \"string\") {\n key = args[0] + \"::\" + args[1];\n } else {\n return fn.apply(this, args);\n }\n\n if (!(key in this._memoizedQueries[type])) {\n this._memoizedQueries[type][key] = fn.apply(this, args);\n }\n return this._memoizedQueries[type][key];\n };\n};\n\nfunction isValidAbsoluteURL(str) {\n return whatwgURL.parseURL(str) !== null;\n}\n\nexports.isValidTargetOrigin = function (str) {\n return str === \"*\" || str === \"/\" || isValidAbsoluteURL(str);\n};\n\nexports.simultaneousIterators = function* (first, second) {\n for (;;) {\n const firstResult = first.next();\n const secondResult = second.next();\n\n if (firstResult.done && secondResult.done) {\n return;\n }\n\n yield [\n firstResult.done ? null : firstResult.value,\n secondResult.done ? null : secondResult.value\n ];\n }\n};\n\nexports.treeOrderSorter = function (a, b) {\n const compare = domSymbolTree.compareTreePosition(a, b);\n\n if (compare & SYMBOL_TREE_POSITION.PRECEDING) { // b is preceding a\n return 1;\n }\n\n if (compare & SYMBOL_TREE_POSITION.FOLLOWING) {\n return -1;\n }\n\n // disconnected or equal:\n return 0;\n};\n\n/* eslint-disable global-require */\ntry {\n exports.Canvas = require(\"canvas\");\n} catch {\n exports.Canvas = null;\n}\n","import {nodeDetachedFromDocument} from 'jsdom/lib/jsdom/living/named-properties-window.js';\n\nexport default class Utils {\n static repeat (times, iterator) {\n return Array(times).fill('').map((val, index) => iterator(index)).join('');\n }\n\n static setCssVariable(css, name, value) {\n const cssString = String(css);\n if (cssString.indexOf(`${name}:`) > -1) {\n return cssString.replace(new RegExp(`${name}:.*?(;|})`), `${name}: ${value}$1`);\n } else {\n return `* {${name}: ${value};} ${cssString}`;\n }\n }\n\n static classes(...list) {\n let classNames = [];\n let className;\n while (className = list.shift()) {\n if (!!list.shift()) classNames.push(className);\n }\n return classNames.join(' ');\n }\n\n static range(start, stop, step) {\n if (stop === null) {\n stop = start || 0;\n start = 0;\n }\n if (!step) {\n step = stop < start ? -1 : 1;\n }\n\n const length = Math.max(Math.ceil((stop - start) / step), 0);\n const range = Array(length);\n\n for (let idx = 0; idx < length; idx++, start += step) {\n range[idx] = start;\n }\n\n return range;\n }\n\n static isBetween (num1, num2, num3) {\n if (num2 > num3) {\n return num1 <= num2 && num1 >= num3;\n } else {\n return num1 >= num2 && num1 <= num3;\n }\n }\n\n static makeDataUrl(data) {\n return `data:image/svg+xml,${encodeURIComponent(data)}`;\n }\n\n static xmlToObject(xmlString, options = {}) {\n const { arrays = [], exclude = [], booleans = [], numbers = [], preserveCapitals = false } = options;\n\n function formatName(name) {\n return preserveCapitals ? name : name.charAt(0).toLowerCase() + name.slice(1);\n }\n\n function convertType(name, value) {\n if (booleans.includes(name)) {\n return value.toLowerCase() === 'true';\n }\n if (numbers.includes(name)) {\n return Number(value);\n }\n return value;\n }\n\n const parser = new DOMParser();\n let dom;\n try {\n dom = parser.parseFromString(xmlString, 'application/xml');\n } catch (error) {\n console.log('ERROR: XmlToObject failed to parse XML');\n return null;\n }\n\n function parseNode(xmlNode, result) {\n let nodeName = xmlNode.nodeName;\n if (nodeName === \"#text\") {\n let v = xmlNode.nodeValue;\n if (v.trim()) result['#text'] = v;\n return;\n }\n\n if (exclude.indexOf(nodeName) !== -1) {\n return;\n }\n\n name = formatName(nodeName);\n\n let jsonNode = {},\n existing = result[name];\n if (existing) {\n if (!Array.isArray(existing)) result[name] = [existing, jsonNode];\n else result[name].push(jsonNode);\n }\n else {\n if (arrays.indexOf(nodeName) !== -1) result[name] = [jsonNode];\n else result[name] = jsonNode;\n }\n\n if (xmlNode.attributes) for (let attribute of xmlNode.attributes) jsonNode[formatName(attribute.nodeName)] = convertType(attribute.nodeName, attribute.nodeValue);\n\n for (let node of xmlNode.childNodes) parseNode(node, jsonNode);\n }\n\n let result = {};\n for (let node of dom.childNodes) parseNode(node, result);\n\n return result;\n }\n\n static doAndResizeSmoothly(element, action, endAnimationCallback = () => {}) {\n const startWidth = element.offsetWidth;\n const startHeight = element.offsetHeight;\n action();\n const childElement = element.firstElementChild;\n const childRect = childElement.getBoundingClientRect();\n const endWidth = element.offsetWidth;\n const endHeight = element.offsetHeight;\n const styleWidth = element.style.width;\n const styleHeight = element.style.height;\n const childStyleWidth = childElement.style.width;\n const childStyleHeight = childElement.style.height;\n const styleOverflow = element.style.overflow;\n element.style.overflow = 'hidden';\n element.style.width = startWidth + 'px';\n element.style.height = startHeight + 'px';\n element.style.transition = 'width 200ms, height 200ms';\n childElement.style.width = childRect.width + 'px';\n childElement.style.height = childRect.height + 'px';\n setTimeout(() => {\n element.style.width = endWidth + 'px';\n element.style.height = endHeight + 'px';\n });\n setTimeout(() => {\n element.style.width = styleWidth;\n element.style.height = styleHeight;\n element.style.overflow = styleOverflow;\n element.style.transition = 'none';\n childElement.style.width = childStyleWidth;\n childElement.style.height = childStyleHeight;\n endAnimationCallback();\n }, 201);\n }\n\n static makeDraggable(element, referenceElement = document.body) {\n class PositionInfo {\n constructor(dataObject) {\n this.pageX = dataObject.pageX;\n this.pageY = dataObject.pageY;\n this.screenX = dataObject.pageX;\n this.screenY = dataObject.pageY;\n this.clientX = dataObject.clientX;\n this.clientY = dataObject.clientY;\n this.target = dataObject.target;\n }\n }\n\n class dragController {\n constructor(element, referenceElement) {\n this._element = element;\n this._referenceElement = referenceElement;\n this._element.addEventListener('mousedown', this._onMouseDown);\n this._element.addEventListener('touchstart', this._onTouchStart, {passive: false});\n }\n\n _onMouseDown = (e) => {\n if (this._startHandler && this._startHandler(e, new PositionInfo(e), this) !== false) {\n this._referenceElement.addEventListener('mousemove', this._onMouseMove);\n this._referenceElement.addEventListener('mouseup', this._onMouseUp);\n this._referenceElement.addEventListener('mouseleave', this._onMouseLeave);\n }\n }\n\n _onMouseMove = (e) => {\n this._moveHandler && this._moveHandler(e, new PositionInfo(e), this);\n }\n\n _onMouseUp = (e) => {\n this._removeMouseEvents();\n this._endHandler && this._endHandler(e, this);\n }\n\n _onMouseLeave = (e) => {\n this._removeMouseEvents();\n this._exceptionHandler && this._exceptionHandler(e, this);\n }\n\n _removeMouseEvents() {\n this._referenceElement.removeEventListener('mousemove', this._onMouseMove);\n this._referenceElement.removeEventListener('mouseup', this._onMouseUp);\n this._referenceElement.removeEventListener('mouseleave', this._onMouseLeave);\n }\n\n\n _onTouchStart = (e) => {\n if (this._startHandler && this._startHandler(e, new PositionInfo(e.touches[0]), this) !== false) {\n this._referenceElement.addEventListener('touchmove', this._onTouchMove, {passive: false});\n this._referenceElement.addEventListener('touchend', this._onTouchEnd);\n this._referenceElement.addEventListener('touchcancel', this._onTouchCancel);\n }\n }\n\n _onTouchMove = (e) => {\n this._moveHandler && this._moveHandler(e, new PositionInfo(e.touches[0]), this);\n }\n\n _onTouchEnd = (e) => {\n this._removeTouchEvents();\n this._endHandler && this._endHandler(e, this);\n }\n\n _onTouchCancel = (e) => {\n this._removeTouchEvents();\n this._exceptionHandler && this._exceptionHandler(e, this);\n }\n\n _removeTouchEvents() {\n this._referenceElement.removeEventListener('touchmove', this._onTouchMove);\n this._referenceElement.removeEventListener('touchend', this._onTouchEnd);\n this._referenceElement.removeEventListener('touchcancel', this._onTouchCancel);\n }\n\n onStart(startHandler = (event, positionInfo, controller) => {return this}) {\n this._startHandler = startHandler;\n return this;\n }\n\n onMove(moveHandler = (event, positionInfo, controller) => {return this}) {\n this._moveHandler = moveHandler;\n return this;\n }\n\n onEnd(endHandler = (event, controller) => {return this}) {\n this._endHandler = endHandler;\n return this;\n }\n\n onException(exceptionHandler = (event, controller) => {return this}) {\n this._exceptionHandler = exceptionHandler;\n return this;\n }\n\n stopListening() {\n this._element.removeEventListener('mousedown', this._onMouseDown);\n this._element.removeEventListener('touchstart', this._onTouchStart);\n delete this._element;\n delete this._referenceElement;\n }\n }\n\n return new dragController(element, referenceElement);\n }\n\n static makeMovable(popupElement, dragHandleElement) {\n let startMousePos, startPopupPos;\n const handlers = {};\n this.makeDraggable(dragHandleElement)\n .onStart((evt, positionInfo) => {\n if (positionInfo.target === dragHandleElement) {\n evt.preventDefault();\n popupElement.style.top = popupElement.offsetTop + 'px';\n popupElement.style.left = popupElement.offsetLeft + 'px';\n popupElement.style.position = 'absolute';\n startMousePos = {\n x: positionInfo.pageX,\n y: positionInfo.pageY,\n };\n startPopupPos = {\n x: popupElement.offsetLeft,\n y: popupElement.offsetTop,\n };\n if (handlers.startHandler) {\n handlers.startHandler(evt, positionInfo);\n }\n return true;\n } else {\n return false;\n }\n })\n .onMove((evt, positionInfo) => {\n evt.preventDefault();\n const currentMousePos = {\n x: positionInfo.pageX,\n y: positionInfo.pageY,\n };\n const delta = {\n x: currentMousePos.x - startMousePos.x,\n y: currentMousePos.y - startMousePos.y,\n };\n popupElement.style.left = (startPopupPos.x + delta.x) + 'px';\n popupElement.style.top = (startPopupPos.y + delta.y) + 'px';\n if (handlers.moveHandler) {\n handlers.moveHandler(evt, positionInfo);\n }\n });\n return {\n onStart: handler => handlers.startHandler = handler,\n onMove: handler => handlers.moveHandler = handler,\n }\n }\n}\n","import { Model } from 'myassays-global';\n\nexport default class MainState extends Model {\n static defaults = {\n canSave: true,\n canClear: true,\n canUndo: false,\n canRedo: false,\n mode: '',\n selectedSampleType: null,\n flagMode: false,\n busy: false,\n };\n}\n","import { Model } from 'myassays-global';\n\nexport default class FillSettings extends Model {\n static defaults = {\n groupNumber: 0,\n autoIncrement: true,\n replicates: 1,\n replicateDirection: \"row\",\n fillDirection: \"row\",\n rectangularFill: false,\n displaySettingsOnNextFill: true,\n };\n}\n","import { Model } from 'myassays-global';\n\nexport default class Cell extends Model {\n static defaults = {\n id: 0,\n number: 0,\n sampleTypeId: 0,\n selected: false,\n flagged: false,\n };\n}\n","import {Utils} from 'myassays-global';\n\nexport default class FillSettingsView extends EventTarget {\n constructor(rootElement, fillSettingsModel, options) {\n super();\n\n this.model = fillSettingsModel;\n this.options = options || {};\n this.saveState = this.model.attributes;\n\n this.root = rootElement;\n this.root.innerHTML = FillSettingsView.template(`${this.options.idPrefix}-fill-settings-`, {\n modal: !!this.options.modal,\n cellsLength: this.options.cellsLength,\n });\n this.update();\n const popupElem = this.root.querySelector('.--mle-fillSettingsView');\n popupElem.style.top = (this.root.offsetHeight/2 - popupElem.offsetHeight/2) + 'px';\n if (this.options.left) {\n popupElem.style.left = Math.min(this.options.left, this.root.offsetWidth - popupElem.offsetWidth) + 'px';\n } else {\n popupElem.style.left = (this.root.offsetWidth/2 - popupElem.offsetWidth/2) + 'px';\n }\n this.model.addEventListener('change', this.update);\n this.addControlEventListeners();\n }\n\n close() {\n this.model.removeEventListener('change', this.update);\n this.root.innerHTML = '';\n }\n\n addControlEventListeners() {\n this.root.querySelectorAll('button.option').forEach(elem => elem.addEventListener('click', this.onOptionClick));\n this.root.querySelector('[name=\"resetGroupNumber\"]').addEventListener('click', this.onResetGroupNumberClick);\n this.root.querySelector('[name=\"groupNumber\"]').addEventListener('change', this.onGroupNumberChange);\n this.root.querySelector('[name=\"autoIncrement\"]').addEventListener('change', this.onAutoIncrementChange);\n this.root.querySelector('[name=\"replicates\"]').addEventListener('change', this.onReplicatesChange);\n this.root.querySelectorAll('input[name=replicateDirection]').forEach(elem => elem.addEventListener('change', this.onReplicateDirectionChange));\n this.root.querySelectorAll('input[name=fillDirection]').forEach(elem => elem.addEventListener('change', this.onFillDirectionChange));\n this.root.querySelector('[name=\"rectangularFill\"]').addEventListener('change', this.onRectangularFillChange);\n this.root.querySelector('[name=\"displaySettingsOnNextFill\"]').addEventListener('change', this.onDisplaySettingsOnNextFillChange);\n\n Utils.makeMovable(this.root.querySelector('.--mle-fillSettingsView'), this.root.querySelector('.--mle-dragHandle')).onStart(() => {\n this.options.onDragStart && this.options.onDragStart();\n });\n\n if (this.options.modal) {\n this.root.querySelector('.--mle-modalMask').addEventListener('click', evt => evt.preventDefault());\n }\n }\n\n onOptionClick = evt => {\n const index = parseInt(evt.currentTarget.getAttribute(\"data-index\"));\n switch (index) {\n case 0:\n this.onOkClick();\n break;\n case 1:\n this.onCancelClick();\n break;\n case 2:\n this.onCloseClick();\n break;\n }\n }\n\n onOkClick() {\n this.close();\n if (this.options.callBack) {\n this.options.callBack(0);\n }\n }\n\n onCancelClick() {\n this.model.set(this.saveState);\n this.close();\n if (this.options.callBack) {\n this.options.callBack(1);\n }\n }\n\n onCloseClick() {\n this.close();\n if (this.options.callBack) {\n this.options.callBack(2);\n }\n }\n\n onResetGroupNumberClick = evt => {\n this.model.set({groupNumber: 1});\n evt.preventDefault();\n }\n\n onGroupNumberChange = evt => {\n const input = evt.currentTarget;\n if (input.value < 1) input.value = 1;\n if (input.value > this.options.cellsLength) input.value = this.options.cellsLength;\n this.model.set({\n groupNumber: parseInt(input.value)\n });\n }\n\n onAutoIncrementChange = evt => {\n this.model.set({autoIncrement: evt.currentTarget.matches(':checked')});\n }\n\n onReplicatesChange = evt => {\n const input = evt.currentTarget;\n if (input.value < 1) input.value = 1;\n if (input.value > this.options.cellsLength) input.value = this.options.cellsLength;\n this.model.set({\n replicates: parseInt(input.value)\n });\n }\n\n onReplicateDirectionChange = evt => {\n const target = evt.currentTarget;\n if (target.matches(':checked')) {\n this.model.set({replicateDirection: target.value});\n }\n }\n\n onFillDirectionChange = evt => {\n const target = evt.currentTarget;\n if (target.matches(':checked')) {\n this.model.set({fillDirection: target.value});\n }\n }\n\n onRectangularFillChange = evt => {\n this.model.set({rectangularFill: evt.currentTarget.matches(':checked')});\n }\n\n onDisplaySettingsOnNextFillChange = evt => {\n this.model.set({displaySettingsOnNextFill: evt.currentTarget.matches(':checked')});\n }\n\n updateOptions(options) {\n this.options = {\n ...this.options,\n ...options,\n };\n this.update();\n }\n\n update = evt => {\n const data = this.model.attributes;\n data.showGroupNumber = this.options.callBack && !this.options.isNullSampleType;\n data.showAutoIncrement = !this.options.isNullSampleType;\n data.showReplicates = data.autoIncrement && !this.options.isNullSampleType;\n data.showReplicateDirection = data.showReplicates && data.rectangularFill && data.replicates > 1;\n data.showFillDirection = true;\n if (this.options.startRowCol && this.options.endRowCol) {\n const singleRowOrColumn = this.options.startRowCol.row === this.options.endRowCol.row || this.options.startRowCol.column === this.options.endRowCol.column;\n if (singleRowOrColumn && data.rectangularFill) {\n data.showFillDirection = false;\n }\n }\n\n const groupNumberInput = this.root.querySelector('[name=\"groupNumber\"]');\n const groupNumberLabel = this.root.querySelector(`[for=\"${groupNumberInput.id}\"]`);\n groupNumberInput.value = data.groupNumber;\n groupNumberLabel.innerHTML = data.autoIncrement ? 'Group Start:' : 'Group:';\n this.root.querySelector('[name=\"autoIncrement\"]').checked = data.autoIncrement;\n this.root.querySelector('[name=\"replicates\"]').value = data.replicates;\n this.root.querySelectorAll('input[name=replicateDirection]').forEach(elem => elem.checked = elem.value === data.replicateDirection);\n this.root.querySelectorAll('input[name=fillDirection]').forEach(elem => elem.checked = elem.value === data.fillDirection);\n this.root.querySelector('[name=\"rectangularFill\"]').checked = data.rectangularFill;\n this.root.querySelector('[name=\"displaySettingsOnNextFill\"]').checked = data.displaySettingsOnNextFill;\n this.root.querySelector('.--mle-showGroupNumber').classList.toggle('--mle-hide', !data.showGroupNumber);\n this.root.querySelector('.--mle-showAutoIncrement').classList.toggle('--mle-hide', !data.showAutoIncrement);\n this.root.querySelector('.--mle-showReplicates').classList.toggle('--mle-hide', !data.showReplicates);\n this.root.querySelector('.--mle-showReplicateDirection').classList.toggle('--mle-hide', !data.showReplicateDirection);\n this.root.querySelector('.--mle-showFillDirection').classList.toggle('--mle-hide', !data.showFillDirection);\n }\n\n static template = (id, data) => `\n${data.modal ? '
' : ''}\n
\n
\n
\n
Fill Settings
\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n
\n \n \n
\n
 \n \n \n
\n \n \n \n
\n \n \n \n  \n \n \n
\n \n \n \n  \n \n \n
 \n \n \n
\n
\n
\n
\n ${data.modal ? `\n \n \n ` : `\n \n `}\n
\n
\n \n \n
\n
\n
\n
\n `\n}\n","export default \".myassays-layout-editor .modal-content {\\n height: unset;\\n user-select: none;\\n -webkit-user-select: none;\\n}\\n.myassays-layout-editor > .modal-dialog {\\n max-width: 100%;\\n width: 100%;\\n}\\n.myassays-layout-editor > .modal-dialog > .modal-content {\\n margin: auto;\\n max-width: 100%;\\n width: 750px;\\n}\\n.myassays-layout-editor .--mle-hide {\\n display: none;\\n}\\n.myassays-layout-editor .--mle-invisible {\\n visibility: hidden;\\n}\\n.myassays-layout-editor .--mle-btn-icon i::before {\\n transform: scale(130%);\\n}\\n.myassays-layout-editor .btn-close:not(.--mle-btn-help) {\\n margin-left: 1em;\\n}\\n.myassays-layout-editor .--mle-btn-help {\\n --bs-btn-close-bg: url('data:image/svg+xml,');\\n background-size: 1.2em;\\n}\\n.myassays-layout-editor .--mle-plate-wrapper {\\n position: relative;\\n}\\n.myassays-layout-editor .--mle-plate-wrapper table {\\n padding: 0;\\n table-layout: fixed;\\n border-spacing: 0;\\n border-collapse: collapse;\\n}\\n.myassays-layout-editor .--mle-plate-wrapper td {\\n text-align: center;\\n padding: 1px;\\n width: var(--mle-cell-size);\\n height: var(--mle-cell-size);\\n max-width: var(--mle-cell-size);\\n max-height: var(--mle-cell-size);\\n min-width: var(--mle-cell-size);\\n min-height: var(--mle-cell-size);\\n font-size: calc(var(--mle-cell-size) / 3);\\n box-sizing: border-box;\\n}\\n.myassays-layout-editor .--mle-plate-wrapper .--mle-cell {\\n color: black;\\n position: relative;\\n}\\n.myassays-layout-editor .--mle-plate-wrapper .--mle-cell * {\\n pointer-events: none;\\n}\\n.myassays-layout-editor .--mle-plate-wrapper .--mle-circle {\\n width: 100%;\\n height: 100%;\\n border-radius: 100%;\\n font-size: calc(var(--mle-cell-size) / 2.3);\\n line-height: calc(var(--mle-cell-size) - 2px);\\n margin: 0;\\n box-sizing: border-box;\\n overflow: hidden;\\n}\\n.myassays-layout-editor .--mle-plate-wrapper .--mle-flag {\\n position: absolute;\\n top: 15%;\\n left: 15%;\\n width: 70%;\\n height: 70%;\\n display: none;\\n background-repeat: no-repeat;\\n}\\n.myassays-layout-editor .--mle-plate-wrapper .--mle-cell.--mle-flagged .--mle-flag {\\n display: block;\\n}\\n.myassays-layout-editor .--mle-plate-wrapper .--mle-cell.--mle-selected {\\n background-color: blue;\\n}\\n.myassays-layout-editor .--mle-plate-wrapper .--mle-cell.--mle-selected .--mle-circle {\\n background-color: blue;\\n}\\n.myassays-layout-editor .--mle-plate-wrapper .--mle-arrow {\\n position: absolute;\\n top: 0;\\n left: 0;\\n width: 100%;\\n height: 100%;\\n pointer-events: none;\\n}\\n.myassays-layout-editor .--mle-plate-wrapper .--mle-arrow svg {\\n width: 100%;\\n height: 100%;\\n}\\n.myassays-layout-editor .modal-header *, .myassays-layout-editor .modal-footer * {\\n white-space: nowrap;\\n flex-wrap: nowrap;\\n}\\n.myassays-layout-editor .modal-header.--mle-compact .--mle-wide-only, .myassays-layout-editor .modal-footer.--mle-compact .--mle-wide-only {\\n display: none;\\n}\\n.myassays-layout-editor .modal-header:not(.--mle-compact) .--mle-compact-only, .myassays-layout-editor .modal-footer:not(.--mle-compact) .--mle-compact-only {\\n display: none;\\n}\\n.myassays-layout-editor .modal-header {\\n cursor: move;\\n}\\n.myassays-layout-editor .modal-header .btn-toolbar, .myassays-layout-editor .modal-header h1, .myassays-layout-editor .modal-header h2, .myassays-layout-editor .modal-header h3, .myassays-layout-editor .modal-header h4, .myassays-layout-editor .modal-header h5, .myassays-layout-editor .modal-header p {\\n pointer-events: none;\\n}\\n.myassays-layout-editor .modal-header .btn-toolbar *, .myassays-layout-editor .modal-header h1 *, .myassays-layout-editor .modal-header h2 *, .myassays-layout-editor .modal-header h3 *, .myassays-layout-editor .modal-header h4 *, .myassays-layout-editor .modal-header h5 *, .myassays-layout-editor .modal-header p * {\\n pointer-events: all;\\n}\\n.myassays-layout-editor .modal-header .btn-toolbar *:disabled, .myassays-layout-editor .modal-header h1 *:disabled, .myassays-layout-editor .modal-header h2 *:disabled, .myassays-layout-editor .modal-header h3 *:disabled, .myassays-layout-editor .modal-header h4 *:disabled, .myassays-layout-editor .modal-header h5 *:disabled, .myassays-layout-editor .modal-header p *:disabled {\\n cursor: not-allowed;\\n}\\n.myassays-layout-editor .modal-header .btn-toolbar *:disabled *, .myassays-layout-editor .modal-header h1 *:disabled *, .myassays-layout-editor .modal-header h2 *:disabled *, .myassays-layout-editor .modal-header h3 *:disabled *, .myassays-layout-editor .modal-header h4 *:disabled *, .myassays-layout-editor .modal-header h5 *:disabled *, .myassays-layout-editor .modal-header p *:disabled * {\\n pointer-events: none;\\n}\\n.myassays-layout-editor .modal-footer {\\n position: relative;\\n display: block;\\n}\\n.myassays-layout-editor .modal-footer .--mle-group-number-group {\\n width: 130px;\\n min-width: 130px;\\n}\\n.myassays-layout-editor .modal-footer .--mle-corner-drag-handle {\\n position: absolute;\\n width: 30px;\\n height: 30px;\\n right: 0;\\n bottom: 0;\\n color: white;\\n cursor: se-resize;\\n}\\n.myassays-layout-editor .modal-footer .dropdown ul label {\\n width: 100%;\\n text-align: left;\\n border-radius: 0;\\n}\\n.myassays-layout-editor .modal-footer .dropdown ul input:checked + label {\\n border: 0;\\n background: var(--bs-secondary-bg);\\n}\\n.myassays-layout-editor.--mle-hide-group-number .--mle-group-number-group {\\n visibility: hidden;\\n}\\n.myassays-layout-editor .modal-footer .--mle-circle {\\n display: inline-block;\\n width: 1em;\\n height: 1em;\\n vertical-align: -0.15em;\\n margin-right: 5px;\\n border: 1px solid var(--bs-gray-800);\\n border-radius: 0.5em;\\n}\\n.myassays-layout-editor .modal-footer li > .--mle-circle {\\n margin-left: 1em;\\n}\\n.myassays-layout-editor .--mle-sample-type-label {\\n margin: 0 10px;\\n}\\n.myassays-layout-editor .--mle-validation-message {\\n position: fixed;\\n top: 0;\\n left: 0;\\n width: 100%;\\n height: 100%;\\n pointer-events: none;\\n z-index: 999999;\\n}\\n.myassays-layout-editor .--mle-validation-message .--mle-modalMask {\\n width: 100%;\\n height: 100%;\\n background: rgba(0, 0, 0, 0.3);\\n pointer-events: all;\\n}\\n.myassays-layout-editor .--mle-validation-message .modal-footer {\\n display: flex;\\n justify-content: center;\\n}\\n.myassays-layout-editor .--mle-validation-message .--mle-alertView {\\n pointer-events: all;\\n position: absolute;\\n margin: 0;\\n}\\n.myassays-layout-editor .--mle-fill-settings {\\n position: fixed;\\n top: 0;\\n left: 0;\\n width: 100%;\\n height: 100%;\\n pointer-events: none;\\n z-index: 999999;\\n}\\n.myassays-layout-editor .--mle-fill-settings .--mle-modalMask {\\n height: 100%;\\n background: rgba(0, 0, 0, 0.3);\\n pointer-events: all;\\n}\\n.myassays-layout-editor .--mle-fill-settings * {\\n box-sizing: border-box;\\n}\\n.myassays-layout-editor .--mle-fill-settings .--mle-fillSettingsView {\\n pointer-events: all;\\n position: absolute;\\n margin: 0;\\n}\\n.myassays-layout-editor .--mle-fill-settings .--mle-fillSettingsView form * {\\n font-size: small;\\n}\\n.myassays-layout-editor .--mle-fill-settings .--mle-fillSettingsView form .form-label {\\n margin-bottom: 0;\\n}\\n.myassays-layout-editor .--mle-fill-settings .--mle-fillSettingsView form table {\\n border-collapse: separate;\\n border-spacing: 0.5em;\\n}\\n.myassays-layout-editor .--mle-fill-settings .--mle-fillSettingsView form table td {\\n vertical-align: middle;\\n margin-bottom: 0.5em;\\n white-space: nowrap;\\n}\\n.myassays-layout-editor .--mle-fill-settings .--mle-fillSettingsView form table td:first-child {\\n text-align: right;\\n}\\n.myassays-layout-editor .--mle-fill-settings .--mle-fillSettingsView form input[type=number] {\\n width: 5.5em !important;\\n flex-grow: 0;\\n}\\n.myassays-layout-editor .--mle-fill-settings .--mle-fillSettingsView .modal-content {\\n box-shadow: 0 0 30px black;\\n}\\n.myassays-layout-editor .--mle-fill-settings .--mle-fillSettingsView .modal-footer {\\n display: flex;\\n flex-direction: column;\\n}\\n.myassays-layout-editor .--mle-fill-settings .--mle-fillSettingsView .modal-footer > div {\\n display: flex;\\n gap: 0.5em;\\n}\\n.myassays-layout-editor .--mle-fill-settings .--mle-fillSettingsView .modal-footer .--mle-supplementary {\\n font-size: smaller !important;\\n text-align: center;\\n}\\n.myassays-layout-editor .--mle-fill-settings .--mle-fillSettingsView .--mle-dragHandle {\\n text-align: center;\\n cursor: move;\\n}\\n\\n/*# sourceMappingURL=myassays-layout-editor.css.map */\\n\"","export default \"\\n\"","export default \"\\n\"","export default \"\\n\"","export default \"\\n\\n\\n\\n\"","import {Utils} from 'myassays-global';\n\nexport default class AlertView extends EventTarget {\n constructor(rootElement, titleText, messageText, onDragStart = () => {}) {\n super();\n\n this._onDragStart = onDragStart;\n this.root = rootElement;\n this.root.innerHTML = AlertView.template({\n titleText,\n messageText,\n });\n\n const popupElem = this.root.querySelector('.--mle-alertView');\n popupElem.style.top = (this.root.offsetHeight/2 - popupElem.offsetHeight/2) + 'px';\n popupElem.style.left = (this.root.offsetWidth/2 - popupElem.offsetWidth/2) + 'px';\n this.addControlEventListeners();\n }\n\n close() {\n this.root.innerHTML = '';\n }\n\n addControlEventListeners() {\n this.root.querySelectorAll('button.option').forEach(elem => elem.addEventListener('click', this.onOkClick));\n\n Utils.makeMovable(this.root.querySelector('.--mle-alertView'), this.root.querySelector('.--mle-dragHandle')).onStart(() => this._onDragStart());\n\n this.root.querySelector('.--mle-modalMask').addEventListener('click', evt => evt.preventDefault());\n }\n\n onOkClick = () => {\n this.close();\n }\n\n static template = data => `\n
\n
\n
\n
\n
${data.titleText}
\n
${data.messageText}
\n
\n \n
\n
\n
\n `\n}\n","\n// TODO: Implement busy overlay\n\nimport {Utils, HistoryManager} from 'myassays-global';\n\nconst { repeat, range, isBetween, makeDataUrl } = Utils;\n\nimport MainState from './model/MainState';\nimport FillSettings from './model/FillSettings';\nimport Cell from './model/Cell';\nimport FillSettingsView from './views/FillSettingsView';\nimport styles from './myassays-layout-editor.css?raw';\nimport cursorErase from './media/icons.getbootstrap.com/eraser.cursor.svg?raw';\nimport cursorPaint from './media/icons.getbootstrap.com/paint-bucket.cursor.svg?raw';\nimport flagGraphic from './media/flag.svg?raw';\nimport cornerDragHandleGraphic from './media/handle-corner.svg?raw';\nimport AlertView from './views/AlertView.js';\n\nconst MODE_PAINT = 'paint';\nconst MODE_ERASE = 'erase';\nconst MODE_FLAGS = 'flags';\nconst NULL_SAMPLE_TYPE = 1;\n\nfunction spaceIfZero(text) {\n return String(text) === '0' ? ' ' : text;\n}\n\nfunction drawSvgArrow(x1, y1, x2, y2) {\n return `\n \n \n \n \n \n \n \n \n\n \n \n `\n}\n\nexport default class MyassaysLayoutEditor extends HTMLElement {\n static serialNo = 1;\n\n constructor(options) {\n super();\n\n if (options) {\n if (options.id !== undefined && typeof options.id !== 'string') {\n throw new Error('options.id should be a string');\n }\n if (options.config !== undefined) {\n if (typeof options.config !== 'object') {\n throw new Error('options.config should be an object');\n }\n } else {\n throw new Error('options.config is missing');\n }\n if (options.flagMode !== undefined && typeof options.flagMode !== 'boolean') {\n throw new Error('options.flagMode should be boolean');\n }\n if (options.appendToElement !== undefined && !(options.appendToElement instanceof HTMLElement)) {\n throw new Error('options.appendToElement should be and HTML element');\n }\n if (options.validator !== undefined && typeof options.validator !== 'function') {\n throw new Error('options.validator should be a function');\n }\n this.options = options;\n this._id = options.id;\n this.flagMode = !!options.flagMode;\n this.config = this.options.config;\n this.validation = this.options.validation;\n }\n\n this._id = this._id || `layout-editor-${this.constructor.serialNo++}`;\n\n this.state = new MainState();\n this.addStateEventListeners();\n\n this.fillSettings = new FillSettings();\n this.addFillSettingsEventListeners();\n\n this.cells = [];\n\n this.startCell = null;\n this.endCell = null;\n this.numbersReplicated = 0;\n\n this.historyManager = new HistoryManager();\n this.historyManager.addEventListener(HistoryManager.EVENT_HISTORY_CHANGE, this.onHistoryChange);\n\n if (options) {\n const parentElem = options.appendToElement;\n if (parentElem) {\n parentElem.appendChild(this);\n }\n }\n }\n\n static get observedAttributes() {\n return ['data-config', 'data-flag-mode', 'data-validation'];\n }\n\n static template = (id, data) => `\n\n
\n \n
\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n \n \n
\n ${data.flagMode ? '' : `\n
\n \n \n \n \n
\n
\n \n \n
`}\n
\n \n \n
\n
\n
\n
\n \n \n \n \n ${repeat(data.columns, col => ``)}\n \n ${repeat(data.rows, row => `${repeat(data.columns, col => {\n const cell = data.getCellAtRowColumn(row, col)\n return ``\n})}`)}\n \n
 ${col + 1}
${data.toRowCode(row + 1)}
${spaceIfZero(cell.get('number'))}
${data.flagMode ? `
` : ''}
\n
\n
\n
\n
\n
\n
\n ${data.flagMode ? `\n
${data.sampleTypes.map(item => `${item.Name}`).join('')}
\n
\n \n
    \n ${data.sampleTypes.map(item => `
  • \n ${item.Name}\n
  • `).join('')}\n
\n
\n ` : `\n
${data.sampleTypes.map(item => `\n \n \n `).join('')}
\n
\n \n
    \n ${data.sampleTypes.map(item => `
  • \n \n \n
  • `).join('')}\n
\n
\n
\n \n \n
\n `}\n
\n
 
\n
\n
\n
\n
\n
\n `\n\n invalidate() {\n if (!this._invalidateTimeoutId) {\n this._invalidateTimeoutId = setTimeout(() => {\n this.configure();\n delete this._invalidateTimeoutId;\n });\n }\n }\n\n configure(config, flagMode = false, validation = undefined) {\n this.style.display = 'none';\n this.state.reset();\n this.fillSettings.reset();\n this.cells = [];\n\n if (config) {\n this.config = config;\n this.flagMode = flagMode;\n this.validation = validation;\n } else if (!this.options) {\n this.config = JSON.parse(this.getAttribute('data-config'));\n this.flagMode = this.getAttribute('data-flag-mode') === 'true';\n const validationName = this.getAttribute('data-validation');\n if (validationName) {\n this.validationName = validationName;\n this.validation = window[validationName];\n if (this.validation && (typeof this.validation !== 'function')) {\n throw new Error('the \"data-validator\" attribute should be the name of a function in the \"window\" namespace');\n }\n } else {\n this.validation = undefined;\n }\n }\n\n if (! this.config) return;\n\n this.columns = parseInt(this.config.Width);\n this.rows = parseInt(this.config.Height);\n\n const defaultData = this.config.Default.split(',').map(item => Number(item));\n let id = 1;\n for (let row = 0; row < this.rows; row++) {\n for (let column = 0; column < this.columns; column++) {\n const cell = new Cell({\n id: id++,\n sampleTypeId: defaultData.shift(),\n number: defaultData.shift(),\n });\n this.cells.push(cell);\n cell.addEventListener('change', this.onCellChange);\n }\n }\n\n const data = {\n columns: this.columns,\n rows: this.rows,\n cells: this.cells,\n sampleTypes: this.config.SampleTypes,\n toRowCode: row => row > 26 ? String.fromCharCode(64 + Math.floor(row / 26)) + String.fromCharCode(64 + row % 26) : String.fromCharCode(64 + row),\n state: this.state.attributes,\n getCellAtRowColumn: this.getCellAtRowColumn,\n groupNumber: this.fillSettings.get('groupNumber'),\n flagMode: this.flagMode,\n }\n const div = document.createElement('div');\n div.innerHTML = this.constructor.template(this._id, data);\n this._editor = div.firstElementChild;\n\n this.state.set({\n mode: this.flagMode ? MODE_FLAGS : MODE_ERASE,\n selectedSampleType: this.config.SampleTypes[this.config.SampleTypes.length - 1].Id,\n });\n\n this.addControlEventListeners();\n this.setGroupNumberAndVisibility();\n\n this._modal = new bootstrap.Modal(this._editor, {});\n this._editor.addEventListener('shown.bs.modal', () => {\n const modalContent = this._editor.querySelector('.modal-content');\n const modalHeader = this._editor.querySelector('.modal-header');\n const modalFooter = this._editor.querySelector('.modal-footer');\n modalContent.style.width = '10px';\n this._headerCompactMaxWidth = modalHeader.scrollWidth + 32;\n this._footerCompactMaxWidth = modalFooter.scrollWidth + 42;\n modalHeader.classList.toggle('--mle-compact', true);\n this._minModalWidth = modalHeader.scrollWidth + 32;\n modalHeader.classList.toggle('--mle-compact', false);\n modalContent.style.removeProperty('width');\n });\n this._modal.show();\n this.calcCellSize(750);\n }\n\n connectedCallback() {\n this.invalidate();\n }\n\n disconnectedCallback() {\n delete this.config;\n delete this.validation;\n }\n\n attributeChangedCallback(attrName, oldVal, newVal) {\n if (!this._editor) {\n this.invalidate();\n }\n }\n\n calcCellSize(pixelWidth) {\n this.cellSize = (pixelWidth - 32) / (this.columns + 1);\n this._editor.style.setProperty('--mle-cell-size', this.cellSize + 'px')\n }\n\n addStateEventListeners = () => {\n const getBySelector = (selector, doIfFound) => {\n const elem = this._editor.querySelector(selector);\n elem && doIfFound(elem);\n }\n const getByName = (name, doIfFound) => {\n getBySelector(`[name=\"${name}\"]`, doIfFound);\n }\n\n this.state.addEventListener('change:canSave', evt => {\n getByName('save-and-close', elem => elem.toggleAttribute('disabled', !evt.data.newValue));\n });\n this.state.addEventListener('change:canClear', evt => {\n getByName('clear', elem => elem.toggleAttribute('disabled', !evt.data.newValue));\n });\n this.state.addEventListener('change:canUndo', evt => {\n getByName('undo', elem => elem.toggleAttribute('disabled', !evt.data.newValue));\n });\n this.state.addEventListener('change:canRedo', evt => {\n getByName('redo', elem => elem.toggleAttribute('disabled', !evt.data.newValue));\n });\n this.state.addEventListener('change:mode', evt => {\n if (evt.data.newValue !== MODE_FLAGS) {\n getBySelector(`[name=\"edit-mode\"][data-mode=\"${evt.data.newValue}\"]`, elem => {\n elem.checked = true;\n });\n getByName('fill-settings', elem => {\n elem.parentElement.classList.toggle('--mle-invisible', evt.data.newValue !== MODE_PAINT);\n });\n }\n if (evt.data.newValue === MODE_ERASE) {\n getBySelector('[name=\"sample-type\"]:checked', elem => elem.checked = false);\n if (this._fillSettings) {\n this.hideFillSettings();\n getByName('fill-settings', elem => {\n elem.checked = false;\n });\n }\n } else if (evt.data.newValue === MODE_PAINT) {\n let sampleType = this.state.get('selectedSampleType');\n if (sampleType === NULL_SAMPLE_TYPE && this.layoutIsClear) {\n sampleType = Number(this.config.SampleTypes.find(item => Number(item.Id) !== NULL_SAMPLE_TYPE).Id);\n this.state.set({selectedSampleType: sampleType});\n } else {\n getBySelector(`[name=\"sample-type\"][data-sample-type=\"${sampleType}\"]`, elem => {\n elem.checked = true;\n });\n getBySelector(`[name=\"sample-type-dropdown\"][data-sample-type=\"${sampleType}\"]`, elem => {\n elem.checked = true;\n });\n }\n }\n getBySelector('.--mle-plate', elem => {\n elem.classList.toggle(`--mle-${MODE_ERASE}`, evt.data.newValue === MODE_ERASE);\n elem.classList.toggle(`--mle-${MODE_PAINT}`, evt.data.newValue === MODE_PAINT);\n elem.classList.toggle(`--mle-${MODE_FLAGS}`, evt.data.newValue === MODE_FLAGS);\n })\n this.setGroupNumberAndVisibility();\n });\n this.state.addEventListener('change:selectedSampleType', evt => {\n getBySelector(`[name=\"sample-type\"][data-sample-type=\"${evt.data.newValue}\"]`, elem => elem.checked = this.state.get('mode') === MODE_PAINT);\n getBySelector(`[name=\"sample-type-dropdown\"][data-sample-type=\"${evt.data.newValue}\"]`, elem => elem.checked = this.state.get('mode') === MODE_PAINT);\n getBySelector('.--mle-sample-type-dropdown-button', elem => elem.setAttribute('data-sample-type', evt.data.newValue));\n getBySelector('.--mle-sample-type-dropdown-text', elem => elem.innerHTML = this.config.SampleTypes.find(item => item.Id === evt.data.newValue).Name);\n getBySelector('.--mle-plate', elem => elem.setAttribute('data-selected-sample-type', evt.data.newValue));\n this.setGroupNumberAndVisibility();\n this.updateFillSettingsDialog();\n });\n this.state.addEventListener('change:busy', this.onBusyChange);\n }\n\n addFillSettingsEventListeners() {\n this.fillSettings.addEventListener('change:groupNumber', evt => {\n this.flagMode || (this._editor.querySelector('[name=\"group-number\"]').value = evt.data.newValue);\n });\n }\n\n setGroupNumberAndVisibility() {\n const paintMode = this.state.get('mode') === MODE_PAINT;\n const sampleTypeId = this.state.get('selectedSampleType');\n let groupNumber = 0;\n if (sampleTypeId !== null && sampleTypeId !== 1) {\n this.cells.filter(cell => (cell.get('sampleTypeId') === sampleTypeId)).forEach(cell => {\n groupNumber = Math.max(groupNumber, cell.get('number'));\n });\n groupNumber++;\n }\n this.fillSettings.set({groupNumber: groupNumber});\n this._editor.classList.toggle('--mle-hide-group-number', !paintMode || sampleTypeId === null || sampleTypeId === 1);\n }\n\n addControlEventListeners() {\n this._editor.querySelector('[name=\"save-and-close\"]').addEventListener('click', this.onSaveAndCloseClick);\n this._editor.querySelector('[name=\"clear\"]').addEventListener('click', this.onClearClick);\n this._editor.querySelector('[name=\"undo\"]').addEventListener('click', this.onUndoClick);\n this._editor.querySelector('[name=\"redo\"]').addEventListener('click', this.onRedoClick);\n Array.from(this._editor.querySelectorAll('[name=\"edit-mode\"]')).forEach(item => item.addEventListener('click', this.onEditModeClick));\n this.flagMode || this._editor.querySelector('[name=\"fill-settings\"]').addEventListener('click', this.onFillSettingsClick);\n Array.from(this._editor.querySelectorAll('[name=\"sample-type\"]')).forEach(item => item.addEventListener('click', this.onSampleTypeClick));\n\n if (! this.flagMode) {\n const groupNumberInput = this._editor.querySelector('[name=\"group-number\"]');\n groupNumberInput.addEventListener('change', this.onGroupNumberChange);\n this._editor.querySelector(`label[for=\"${groupNumberInput.id}\"]`).addEventListener('dblclick', this.onGroupNumberDoubleClick)\n }\n\n this._editor.querySelector('[name=\"close\"]').addEventListener('click', this.onCloseClick);\n this._editor.querySelector('[name=\"help\"]').addEventListener('click', this.onHelpClick);\n\n const tooltipTriggerList = this._editor.querySelectorAll('[data-bs-toggle=\"tooltip\"]');\n this._tooltipList = [...tooltipTriggerList].map(this.createTooltip);\n\n Utils.makeDraggable(this._editor.querySelector('.--mle-plate'))\n .onStart(this.dragStart)\n .onMove(this.dragMove)\n .onEnd(this.dragEnd)\n .onException(this.dragEnd);\n\n Utils.makeMovable(this._editor.querySelector('.modal-content'), this._editor.querySelector('.modal-header')).onStart(() => this.hideTooltips());\n\n Utils.makeDraggable(this._editor.querySelector('.--mle-corner-drag-handle'))\n .onStart(this.resizeStart);\n }\n\n createTooltip = element => {\n const tooltip = new bootstrap.Tooltip(element, {\n trigger: 'hover',\n delay: {\n show: 750,\n hide: 100,\n },\n });\n element.addEventListener('mouseout', evt => tooltip.hide());\n return tooltip;\n }\n\n hideTooltips() {\n this._tooltipList.forEach(tooltip => tooltip.hide());\n }\n\n resizeStart = (evt, positionInfo, controller) => {\n evt.preventDefault();\n const modalContent = this._editor.querySelector('.modal-content');\n const header = modalContent.querySelector('.modal-header');\n const footer = modalContent.querySelector('.modal-footer');\n modalContent.style.top = modalContent.offsetTop + 'px';\n modalContent.style.left = modalContent.offsetLeft + 'px';\n modalContent.style.position = 'absolute';\n\n const startX = positionInfo.pageX;\n const startWidth = modalContent.offsetWidth;\n\n let headerCompact = header.classList.contains('--mle-compact');\n let footerCompact = footer.classList.contains('--mle-compact');\n let currentWidth = startWidth;\n let newWidth = currentWidth;\n\n const resize = () => {\n currentWidth = newWidth;\n modalContent.style.width = newWidth + 'px';\n this.calcCellSize(newWidth);\n const newHeaderCompact = newWidth <= this._headerCompactMaxWidth;\n const newFooterCompact = newWidth <= this._footerCompactMaxWidth;\n if (newHeaderCompact !== headerCompact) {\n header.classList.toggle('--mle-compact', newHeaderCompact);\n headerCompact = newHeaderCompact;\n }\n if (newFooterCompact !== footerCompact) {\n footer.classList.toggle('--mle-compact', newFooterCompact);\n footerCompact = newFooterCompact;\n }\n }\n\n const onMove = (evt, positionInfo) => {\n evt.preventDefault();\n newWidth = Math.max(startWidth - startX + positionInfo.pageX, this._minModalWidth);\n if (newWidth !== currentWidth) {\n if (this._resizeTimeoutId === undefined) {\n this._resizeTimeoutId = setTimeout(() => {\n resize();\n delete this._resizeTimeoutId;\n }, 20);\n }\n }\n };\n\n controller\n .onMove(onMove)\n .onEnd(resize)\n .onException(resize);\n }\n\n onSaveAndCloseClick = evt => {\n this.saveAndClose();\n }\n\n onClearClick = evt => {\n this.flagMode ? this.clearFlags() : this.clear();\n }\n\n onUndoClick = evt => {\n this.undo();\n }\n\n onRedoClick = evt => {\n this.redo();\n }\n\n onEditModeClick = evt => {\n const elem = evt.currentTarget;\n this.state.set({\n mode: elem.getAttribute('data-mode'),\n });\n }\n\n onFillSettingsClick = evt => {\n if (evt.currentTarget.checked) {\n this.showFillSettings(option => {\n this._editor.querySelector('[name=\"fill-settings\"]').checked = false;\n }, false);\n } else {\n this.hideFillSettings();\n }\n }\n\n get fillSettingsShowing() {\n return this._editor.querySelector('[name=\"fill-settings\"]').checked;\n }\n\n onHelpClick = evt => {\n this.showHelp();\n }\n\n onCloseClick = evt => {\n this.close();\n }\n\n onGroupNumberChange = evt => {\n const input = evt.currentTarget;\n if (input.value < 1) input.value = 1;\n const maxGroupNumber = this.columns * this.rows;\n if (input.value > maxGroupNumber) input.value = maxGroupNumber;\n this.fillSettings.set({\n groupNumber: parseInt(input.value)\n });\n }\n\n onGroupNumberDoubleClick = evt => {\n this.fillSettings.set({\n groupNumber: 1,\n });\n }\n\n onSampleTypeClick = evt => {\n const button = evt.currentTarget;\n this.state.set({\n selectedSampleType: parseInt(button.getAttribute('data-sample-type')),\n mode: MODE_PAINT,\n });\n }\n\n\n toggleClassByName(elementName, className, truth) {\n const elem = this._editor.querySelector(`[name=\"${elementName}\"]`);\n elem && elem.classList.toggle(className, truth);\n }\n\n toggleAttributeByName(elementName, attributeName, truth) {\n const elem = this._editor.querySelector(`[name=\"${elementName}\"]`);\n elem && elem.toggleAttribute(attributeName, truth);\n }\n\n toggleClassBySelector(selector, className, truth) {\n const elem = this._editor.querySelector(selector);\n elem && elem.classList.toggle(className, truth);\n }\n\n getCellAtRowColumn(row, column) {\n return this.cells[row * this.columns + column];\n }\n\n getCellById(id) {\n return this.cells[id - 1];\n }\n\n getCellRowColumn(cell) {\n if (cell) {\n const cellIndex = cell.get('id') - 1;\n const row = Math.floor(cellIndex / this.columns);\n const column = cellIndex - (row * this.columns);\n return {row, column};\n } else {\n return null;\n }\n }\n\n close() {\n const evt = new CustomEvent('closelayouteditor', {bubbles: true});\n this.dispatchEvent(evt);\n this._removeModal();\n }\n\n _removeModal() {\n this._editor.addEventListener('hidden.bs.modal', evt => {\n this._editor.remove();\n delete this._editor;\n this._modal.dispose();\n delete this._modal;\n });\n this._modal.hide();\n this._cleanUp();\n\n }\n\n saveAndClose() {\n const data = this.getData();\n const doIt = () => {\n const evt = new CustomEvent('saveandclose', {bubbles: true, detail: data});\n this.dispatchEvent(evt);\n this._removeModal();\n }\n if (!!this.validationName && !this.validation) {\n this.validation = window[this.validationName];\n if (typeof this.validation !== 'function') {\n throw new Error('the \"data-validator\" attribute should be the name of a function in the \"window\" namespace');\n }\n }\n if (!!this.validation) {\n this.validation(JSON.stringify(this.config), data).then(errors => {\n if (errors && errors.length) {\n new AlertView(\n this._editor.querySelector('.--mle-validation-message'),\n 'Validation Errors',\n `

The layout does not meet the requirements of this assay, specifically:

    ${errors.map(error => `
  • ${error}
  • `).join('')}

Please update the layout.

`,\n () => this.hideTooltips(),\n );\n } else {\n doIt();\n }\n });\n } else {\n doIt();\n }\n }\n\n _cleanUp() {\n if (this.options && this.options.appendToElement) {\n this.remove();\n } else {\n this.removeAttribute('data-config');\n }\n }\n\n showFillSettings(callBack, modal = true) {\n const modalContent = this._editor.querySelector('.modal-content');\n const rect = modalContent.getBoundingClientRect();\n const left = rect.left + rect.width;\n this._fillSettings = new FillSettingsView(this._editor.querySelector('.--mle-fill-settings'), this.fillSettings, {\n isNullSampleType: this.state.get('selectedSampleType') === NULL_SAMPLE_TYPE,\n startRowCol: this.getCellRowColumn(this.startCell),\n endRowCol: this.getCellRowColumn(this.endCell),\n cellsLength: this.cells.length,\n callBack: callBack,\n modal: modal,\n left: left,\n idPrefix: this._id,\n onDragStart: () => this.hideTooltips(),\n });\n }\n\n updateFillSettingsDialog() {\n if (this._fillSettings) {\n this._fillSettings.updateOptions({\n isNullSampleType: this.state.get('selectedSampleType') === NULL_SAMPLE_TYPE,\n });\n }\n }\n\n hideFillSettings() {\n this._fillSettings && this._fillSettings.close();\n delete this._fillSettings;\n }\n\n showHelp() {\n const evt = new CustomEvent('help', {bubbles: true});\n this.dispatchEvent(evt);\n }\n\n getData() {\n if (this.flagMode) {\n return this.cells.filter(item => item.get('flagged')).map(item => item.get('id'));\n } else {\n return this.cells.map(item => item.get('sampleTypeId') + ',' + item.get('number')).join(',');\n }\n }\n\n setConfig(config, flagMode = false, validation = undefined) {\n if (typeof config !== 'object') {\n throw new Error('config should be an object');\n }\n if (typeof flagMode !== 'boolean') {\n throw new Error('flagMode should be a boolean');\n }\n if (!!validation && (typeof validation !== 'function')) {\n throw new Error('validation should be a function');\n }\n this.configure(config, flagMode, validation);\n }\n\n\n setBusy(busy) {\n this.state.set({busy});\n }\n\n onBusyChange() {\n\n }\n\n onCellClick = evt => {\n const cellElement = evt.currentTarget;\n const cell = this.getCellById(cellElement.getAttribute('data-id'));\n this.toggleCellFlagged(cell);\n }\n\n dragStart = (evt, positionInfo) => {\n evt.preventDefault();\n const cellElement = document.elementFromPoint(positionInfo.clientX, positionInfo.clientY);\n if (cellElement.classList.contains('--mle-cell')) {\n const cell = this.getCellById(cellElement.getAttribute('data-id'));\n if (this.startCell) return; // on windows an extra mousedown event is triggered\n\n this.historyManager.startTransaction();\n this.startCell = this.endCell = cell;\n if (this.state.get('mode') === MODE_ERASE) {\n this.eraseCell(cell);\n } else {\n this.onCellSelectionChange();\n }\n this.currentRowCol = this.getCellRowColumn(cell);\n }\n }\n\n dragMove = (evt, positionInfo) => {\n evt.preventDefault();\n const cellElement = document.elementFromPoint(positionInfo.clientX, positionInfo.clientY);\n if (cellElement.classList.contains('--mle-cell')) {\n const cell = this.getCellById(cellElement.getAttribute('data-id'));\n this.endCell = cell;\n if (this.state.get('mode') === MODE_ERASE) {\n this.eraseCell(cell);\n } else {\n this.onCellSelectionChange();\n }\n }\n }\n\n dragEnd = (evt) => {\n evt.preventDefault();\n let groupNumber;\n const autoIncrement = this.fillSettings.get('autoIncrement');\n if (this.state.get('mode') === MODE_PAINT) {\n groupNumber = this.fillCellRange();\n this.historyManager.endTransaction();\n if (this.startCell !== this.endCell && this.fillSettings.get('displaySettingsOnNextFill') && !this.fillSettingsShowing) {\n const onSettingsChange = () => {\n this.undo();\n this.historyManager.startTransaction();\n groupNumber = this.fillCellRange();\n this.historyManager.endTransaction();\n };\n this.fillSettings.addEventListener('change', onSettingsChange);\n this.state.addEventListener('change:selectedSampleType', onSettingsChange);\n this.enableBottomToolbarOnly(true);\n this.showFillSettings(option => {\n this.fillSettings.removeEventListener('change', onSettingsChange);\n this.state.removeEventListener('change:selectedSampleType', onSettingsChange);\n this.enableBottomToolbarOnly(false);\n this.startCell = this.endCell = null;\n switch (option) {\n case 0:\n if (autoIncrement) {\n this.fillSettings.set({\n groupNumber: groupNumber\n });\n }\n break;\n case 1:\n this.undo();\n break;\n }\n });\n } else {\n if (autoIncrement) {\n this.fillSettings.set({\n groupNumber: groupNumber\n });\n }\n this.startCell = this.endCell = null;\n }\n this.removeArrow();\n } else {\n this.historyManager.endTransaction();\n this.startCell = this.endCell = null;\n }\n }\n\n onHistoryChange = () => {\n this.state.set({\n canUndo: this.historyManager.canUndo(),\n canRedo: this.historyManager.canRedo(),\n canSave: !this.isAllUnused(),\n });\n }\n\n isAllUnused() {\n const unusedCells = this.cells.filter(item => item.get('sampleTypeId') === NULL_SAMPLE_TYPE);\n return unusedCells.length === this.cells.length;\n }\n\n onCellChange = evt => {\n const cell = evt.currentTarget;\n const before = cell.previousAttributes;\n before.selected = false;\n const after = cell.attributes;\n const cellElem = this._editor.querySelector(`.--mle-cell[data-id=\"${after.id}\"]`);\n cellElem.setAttribute('data-sample-type', after.sampleTypeId);\n cellElem.setAttribute('data-value', after.number);\n cellElem.classList.toggle('--mle-selected', after.selected);\n cellElem.classList.toggle('--mle-flagged', after.flagged);\n cellElem.querySelector('.--mle-circle').innerHTML = spaceIfZero(after.number);\n\n after.selected = false;\n this.historyManager.addChange(before, after);\n\n }\n\n undo() {\n const changes = this.historyManager.undo() || [];\n changes.forEach(change => {\n const cell = this.getCellById(change.before.id);\n cell.set(change.before);\n });\n }\n\n redo() {\n const changes = this.historyManager.redo() || [];\n changes.forEach(change => {\n const cell = this.getCellById(change.after.id);\n cell.set(change.after);\n });\n }\n\n clear() {\n this.historyManager.startTransaction();\n this.cells.forEach(cell => {\n cell.set({\n sampleTypeId: NULL_SAMPLE_TYPE,\n number: 0\n });\n });\n this.historyManager.endTransaction();\n this.numbersReplicated = 0;\n this.fillSettings.set({\n groupNumber: 1\n });\n this.state.set({\n mode: MODE_PAINT\n });\n }\n\n get layoutIsClear() {\n return this.cells.filter(cell => cell.get('sampleTypeId') !== NULL_SAMPLE_TYPE).length === 0;\n }\n\n clearFlags() {\n const flaggedCells = this.cells.filter(cell => cell.get(\"flagged\"));\n\n if (flaggedCells.length) {\n this.historyManager.startTransaction();\n flaggedCells.forEach(cell => cell.set({flagged: false}));\n this.historyManager.endTransaction();\n }\n }\n\n toggleCellFlagged(cell) {\n this.historyManager.startTransaction();\n const previousFlagged = cell.get(\"flagged\");\n cell.set({\n flagged: !previousFlagged,\n });\n this.historyManager.endTransaction()\n }\n\n eraseCell(cell) {\n const previousTypeId = cell.get(\"sampleTypeId\");\n if (previousTypeId !== NULL_SAMPLE_TYPE) {\n const previousNumber = cell.get(\"number\");\n cell.set({\n sampleTypeId: NULL_SAMPLE_TYPE,\n number: 0,\n });\n this.cells.forEach(otherCell => {\n if (otherCell.get(\"sampleTypeId\") === previousTypeId) {\n const number = otherCell.get(\"number\");\n if (number === previousNumber) {\n otherCell.set({\n sampleTypeId: NULL_SAMPLE_TYPE,\n number: 0,\n });\n } else if (number > previousNumber) {\n otherCell.set({\n number: number - 1,\n });\n }\n }\n });\n }\n }\n\n removeArrow() {\n if (this.arrowElem) {\n this.arrowElem.innerHTML = '';\n delete this.arrowElem;\n }\n }\n\n onCellSelectionChange = () => {\n if (this.fillSettings.get(\"displaySettingsOnNextFill\") && !this.fillSettingsShowing) {\n this.cells.forEach(cell => {\n cell.set({\n selected: (cell === this.startCell || cell === this.endCell),\n });\n });\n if (this.startCell !== this.endCell) {\n if (!this.arrowElem) {\n this.arrowElem = this._editor.querySelector(\".--mle-arrow\");\n }\n\n const cellRadius = this.cellSize / 2;\n const startCellElem = this._editor.querySelector(`.--mle-cell[data-id=\"${this.startCell.get('id')}\"]`);\n const endCellElem = this._editor.querySelector(`.--mle-cell[data-id=\"${this.endCell.get('id')}\"]`);\n\n this.arrowElem.innerHTML = drawSvgArrow(\n startCellElem.offsetLeft + cellRadius,\n startCellElem.offsetTop + cellRadius,\n endCellElem.offsetLeft + cellRadius,\n endCellElem.offsetTop + cellRadius\n )\n } else {\n this.removeArrow();\n }\n } else {\n const startCoords = this.getCellRowColumn(this.startCell);\n const endCoords = this.getCellRowColumn(this.endCell);\n this.cells.forEach(cell => {\n const cellCoords = this.getCellRowColumn(cell);\n let selected = false;\n if (this.fillSettings.get('rectangularFill')) {\n selected = isBetween(cellCoords.row, startCoords.row, endCoords.row)\n && isBetween(cellCoords.column, startCoords.column, endCoords.column);\n } else if (this.fillSettings.get('fillDirection') === 'row') {\n selected = isBetween(cell.get('id'), this.startCell.get('id'), this.endCell.get(\"id\"));\n } else {\n if (startCoords.column === endCoords.column) {\n selected = cellCoords.column === startCoords.column && isBetween(cellCoords.row, startCoords.row, endCoords.row)\n } else if (cellCoords.column === startCoords.column) {\n selected = startCoords.column < endCoords.column ? cellCoords.row >= startCoords.row : cellCoords.row <= startCoords.row;\n } else if (cellCoords.column === endCoords.column) {\n selected = startCoords.column < endCoords.column ? cellCoords.row <= endCoords.row : cellCoords.row >= endCoords.row;\n } else {\n selected = isBetween(cellCoords.column, startCoords.column, endCoords.column);\n }\n }\n cell.set({selected});\n });\n }\n }\n\n fillCellRange() {\n let i, start, end, rowRange, columnRange, replicateRange, n;\n const sampleTypeId = this.state.get('selectedSampleType');\n let {\n groupNumber,\n autoIncrement,\n replicates,\n rectangularFill,\n fillDirection,\n replicateDirection\n } = this.fillSettings.attributes;\n\n const startCoords = this.getCellRowColumn(this.startCell);\n const endCoords = this.getCellRowColumn(this.endCell);\n\n const getGroupNumber = () => {\n const returnValue = groupNumber;\n if (autoIncrement) {\n this.numbersReplicated++;\n if (this.numbersReplicated >= replicates) {\n groupNumber++;\n this.numbersReplicated = 0;\n }\n }\n return returnValue;\n };\n\n const finishGroup = () => {\n if (this.numbersReplicated > 0) {\n groupNumber++;\n this.numbersReplicated = 0;\n }\n };\n\n const getRange = (start, end, step) => {\n step = step || 1;\n if (start > end) {\n end--;\n } else {\n end++;\n }\n return range(start, end, start > end ? -step : step);\n };\n\n const setCell = (cell, number) => {\n const setData = {\n selected: false,\n sampleTypeId: sampleTypeId,\n number: sampleTypeId === NULL_SAMPLE_TYPE ? 0 : number\n };\n cell.set(setData);\n };\n\n const setCellByRowColumn = (row, column, number) => {\n const cell = this.getCellById(row * this.columns + column + 1);\n setCell(cell, number);\n };\n\n const getAlternativeCellSequenceNumber = cell => {\n const rowCol = this.getCellRowColumn(cell);\n return rowCol.row + rowCol.column * this.rows + 1;\n };\n\n const getCellByAlternativeSequenceNumber = number => {\n const rows = this.rows;\n const columns = this.columns;\n const column = Math.floor((number - 1) / rows);\n const row = (number - 1) - rows * column;\n const id = column + row * columns + 1;\n return this.getCellById(id);\n };\n\n if (this.startCell === this.endCell) {\n setCell(this.startCell, getGroupNumber());\n } else {\n this.numbersReplicated = 0;\n if (rectangularFill) {\n // create a lookup table for numbering.\n switch (true) {\n case fillDirection === 'row' && replicateDirection === 'row':\n rowRange = getRange(startCoords.row, endCoords.row);\n columnRange = getRange(startCoords.column, endCoords.column);\n rowRange.forEach(row => {\n columnRange.forEach(column => {\n setCellByRowColumn(row, column, getGroupNumber());\n });\n finishGroup();\n });\n break;\n case fillDirection === 'row' && replicateDirection === 'column':\n rowRange = getRange(startCoords.row, endCoords.row, replicates);\n columnRange = getRange(startCoords.column, endCoords.column);\n replicateRange = getRange(0, replicates - 1);\n rowRange.forEach(row => {\n columnRange.forEach(column => {\n replicateRange.forEach(replicate => {\n n = row + replicate;\n if (!isBetween(n, startCoords.row, endCoords.row)) {\n finishGroup();\n } else {\n setCellByRowColumn(n, column, getGroupNumber());\n }\n });\n });\n });\n break;\n case fillDirection === 'column' && replicateDirection === 'row':\n rowRange = getRange(startCoords.row, endCoords.row);\n columnRange = getRange(startCoords.column, endCoords.column, replicates);\n replicateRange = getRange(0, replicates - 1);\n columnRange.forEach(column => {\n rowRange.forEach(row => {\n replicateRange.forEach(replicate => {\n n = column + replicate;\n if (!isBetween(n, startCoords.column, endCoords.column)) {\n finishGroup();\n } else {\n setCellByRowColumn(row, n, getGroupNumber());\n }\n });\n });\n });\n break;\n case fillDirection === 'column' && replicateDirection === 'column':\n rowRange = getRange(startCoords.row, endCoords.row);\n columnRange = getRange(startCoords.column, endCoords.column);\n columnRange.forEach(column => {\n rowRange.forEach(row => {\n setCellByRowColumn(row, column, getGroupNumber());\n });\n finishGroup();\n });\n break;\n }\n } else {\n switch (fillDirection) {\n case 'row':\n start = this.startCell.get('id');\n end = this.endCell.get('id');\n if (start < end) {\n for (i = start; i <= end; i++) {\n setCell(this.getCellById(i), getGroupNumber());\n }\n } else {\n for (i = start; i >= end; i--) {\n setCell(this.getCellById(i), getGroupNumber());\n }\n }\n break;\n case 'column':\n start = getAlternativeCellSequenceNumber(this.startCell);\n end = getAlternativeCellSequenceNumber(this.endCell);\n if (start < end) {\n for (i = start; i <= end; i++) {\n setCell(getCellByAlternativeSequenceNumber(i), getGroupNumber());\n }\n } else {\n for (i = start; i >= end; i--) {\n setCell(getCellByAlternativeSequenceNumber(i), getGroupNumber());\n }\n }\n break;\n }\n }\n }\n\n return groupNumber;\n }\n\n enableBottomToolbarOnly(trueFalse) {\n this._editor.classList.toggle(\"enable-bottom-toolbar-only\", trueFalse);\n }\n\n}\n\n","import MyassaysLayoutEditor from './MyassaysLayoutEditor';\n\ncustomElements.define('myassays-layout-editor', MyassaysLayoutEditor);\n\nexport default MyassaysLayoutEditor;\n"],"names":["_HistoryManager","before","after","index","__publicField","HistoryManager","cloneValue","value","Model","returnValue","key","_Model","initialAttributes","newAttributes","noTrigger","previousAttributes","newAttribute","evt","attributes","attributeName","handler","prevValue","newValue","changed","previousValue","makeException","ErrorType","message","options","toNumber","evenRound","x","censorNegativeZero","integerPart","n","sign","modulo","y","signMightNotMatch","createIntegerConversion","bitLength","unsigned","lowerBound","upperBound","twoToTheBitLength","twoToOneLessThanTheBitLength","createLongLongConversion","asBigIntN","xBigInt","exports","c","i","S","U","d","a","b","abByteLengthGetter","sabByteLengthGetter","isNonSharedArrayBuffer","isSharedArrayBuffer","isArrayBufferDetached","dvByteLengthGetter","typedArrayNameGetter","func","name","article","isObject","hasOwn","define","target","source","descriptor","newObjectInRealm","globalObject","object","ctorRegistry","initCtorRegistry","wrapperSymbol","implSymbol","sameObjectCaches","ctorRegistrySymbol","AsyncIteratorPrototype","getSameObject","wrapper","prop","creator","wrapperForImpl","impl","implForWrapper","tryWrapperForImpl","tryImplForWrapper","iterInternalSymbol","isArrayIndexPropName","P","s","byteLengthGetter","isArrayBuffer","iteratorResult","kind","result","supportsPropertyIndex","supportedPropertyIndices","supportsPropertyName","supportedPropertyNames","indexedGet","indexedSetNew","indexedSetExisting","namedGet","namedSetNew","namedSetExisting","namedDelete","asyncIteratorNext","asyncIteratorReturn","asyncIteratorInit","asyncIteratorEOI","module","namespaces","idlUtils","require$$0","HTML_NS","require$$1","HTMLCollectionImpl_1","args","privateData","element","snapshot","id","conversions","utils","interfaceName","Impl","context","makeWrapper","newTarget","proto","makeProxy","proxyHandler","proxyHandlerCache","ProxyHandler","constructorArgs","exposed","globalNames","globalName","HTMLCollection","esValue","curArg","receiver","desc","getter","parent","keys","ignoreNamedProps","indexedValue","namedValue","V","ownDesc","existingDesc","valueDesc","require$$2","maxInt","base","tMin","tMax","skew","damp","initialBias","initialN","delimiter","regexPunycode","regexNonASCII","regexSeparators","errors","baseMinusTMin","floor","stringFromCharCode","error","type","map","array","callback","length","mapDomain","domain","parts","labels","encoded","ucs2decode","string","output","counter","extra","ucs2encode","codePoints","basicToDigit","codePoint","digitToBasic","digit","flag","adapt","delta","numPoints","firstTime","k","decode","input","inputLength","bias","basic","j","oldi","w","t","baseMinusT","out","encode","currentValue","basicLength","handledCPCount","m","handledCPCountPlusOne","q","qMinusT","toUnicode","toASCII","regexes","statusMapping","punycode","mappingTable","STATUS_MAPPING","require$$3","containsNonASCII","str","findStatus","val","useSTD3ASCIIRules","start","end","mid","min","max","mapChars","domainName","processingOption","hasError","processed","ch","status","mapping","validateLabel","label","checkHyphens","checkBidi","checkJoiners","last","next","test","rtl","isBidiDomain","processing","isBidi","origLabel","curProcessing","verifyDNSLength","l","total","tr46","isASCIIDigit","isASCIIAlpha","isASCIIAlphanumeric","isASCIIHex","infra","utf8Encoder","utf8Decoder","utf8Encode","utf8DecodeWithoutBOM","bytes","encoding","p","char","percentEncode","hex","percentDecodeBytes","outputIndex","byte","bytePoint","percentDecodeString","isC0ControlPercentEncode","extraFragmentPercentEncodeSet","isFragmentPercentEncode","extraQueryPercentEncodeSet","isQueryPercentEncode","isSpecialQueryPercentEncode","extraPathPercentEncodeSet","isPathPercentEncode","extraUserinfoPercentEncodeSet","isUserinfoPercentEncode","extraComponentPercentEncodeSet","isComponentPercentEncode","extraURLEncodedPercentEncodeSet","isURLEncodedPercentEncode","utf8PercentEncodeCodePointInternal","percentEncodePredicate","utf8PercentEncodeCodePoint","utf8PercentEncodeString","spaceAsPlus","percentEncoding","specialSchemes","failure","countSymbols","at","idx","isSingleDot","buffer","isDoubleDot","isWindowsDriveLetterCodePoints","cp1","cp2","isWindowsDriveLetterString","isNormalizedWindowsDriveLetterString","containsForbiddenHostCodePoint","containsForbiddenDomainCodePoint","isSpecialScheme","scheme","isSpecial","url","isNotSpecial","defaultPort","parseIPv4Number","R","regex","parseIPv4","numbers","part","ipv4","serializeIPv4","address","parseIPv6","pieceIndex","compress","pointer","numbersSeen","ipv4Piece","number","swaps","temp","serializeIPv6","findLongestZeroSequence","ignore0","parseHost","isNotSpecialArg","parseOpaqueHost","asciiDomain","domainToASCII","endsInANumber","arr","maxIdx","maxLen","currStart","currLen","serializeHost","host","beStrict","trimControlChars","trimTabAndNewline","shortenPath","path","isNormalizedWindowsDriveLetter","includesCredentials","cannotHaveAUsernamePasswordPort","hasAnOpaquePath","URLStateMachine","encodingOverride","stateOverride","res","cStr","ret","len","encodedCodePoints","port","fileOtherwiseCodePoints","startsWithWindowsDriveLetter","queryPercentEncodePredicate","serializeURL","excludeFragment","serializePath","serializeOrigin","tuple","segment","usm","username","password","integer","parseUrlencoded","sequences","strictlySplitByteSequence","indexOfEqual","replaceByteInByteSequence","nameString","valueString","parseUrlencodedString","serializeUrlencoded","tuples","buf","cp","list","from","to","urlencoded","_Function","invokeTheCallbackFunction","thisArg","callResult","URLSearchParamsImpl_1","doNotStripQMark","init","pair","serializedQuery","found","Function","iteratorPrototype","iterator","URLSearchParams","tmp","nextItem","typedKey","typedValue","pairs","internal","values","URLImpl_1","parsedBase","parsedURL","query","v","URL","webidl2jsWrapper","urlStateMachine","sharedGlobalObject","whatwgUrl","SymbolTreeNode_1","parentNode","TreePosition","TREE","ROOT","NEXT","ITERATE_FUNC","TreeIterator$1","tree","root","firstResult","iterateFunction","iterateFunc","TreeIterator","TreeIterator_1","SymbolTreeNode","returnTrue","reverseArrayIndex","reverseIndex","SymbolTree$1","description","node","lastChild","current","treeRoot","previousSibling","firstChild","nextSibling","filter","ancestor","reverse","child","childNode","currentIndex","cachedUpToNode","left","right","leftAncestors","leftAncestor","rightAncestors","rightAncestor","commonAncestorIndex","ancestorsMinLength","leftIndex","removeObject","removeNode","prevNode","nextNode","referenceObject","newObject","referenceNode","newNode","SymbolTree_1","SymbolTree","internalConstants","whatwgURL","domSymbolTree","SYMBOL_TREE_POSITION","fileName","pathname","utils$2","properties","propDesc","Constructor","propertyMap","property","addConstant","memoizeQueryTypeCounter","fn","isValidAbsoluteURL","first","second","secondResult","compare","Canvas","require$$4","Utils","times","css","cssString","classNames","className","stop","step","range","num1","num2","num3","data","xmlString","arrays","exclude","booleans","preserveCapitals","formatName","convertType","parser","dom","parseNode","xmlNode","nodeName","jsonNode","existing","attribute","action","endAnimationCallback","startWidth","startHeight","childElement","childRect","endWidth","endHeight","styleWidth","styleHeight","childStyleWidth","childStyleHeight","styleOverflow","referenceElement","PositionInfo","dataObject","dragController","e","startHandler","event","positionInfo","controller","moveHandler","endHandler","exceptionHandler","popupElement","dragHandleElement","startMousePos","startPopupPos","handlers","currentMousePos","MainState","FillSettings","Cell","_FillSettingsView","rootElement","fillSettingsModel","groupNumberInput","groupNumberLabel","elem","popupElem","FillSettingsView","styles","cursorErase","cursorPaint","flagGraphic","cornerDragHandleGraphic","_AlertView","titleText","messageText","onDragStart","AlertView","repeat","isBetween","makeDataUrl","MODE_PAINT","MODE_ERASE","MODE_FLAGS","NULL_SAMPLE_TYPE","spaceIfZero","text","drawSvgArrow","x1","y1","x2","y2","MyassaysLayoutEditor","getBySelector","selector","doIfFound","getByName","sampleType","item","tooltip","modalContent","header","footer","startX","headerCompact","footerCompact","currentWidth","newWidth","resize","newHeaderCompact","newFooterCompact","onMove","option","maxGroupNumber","button","cellElement","cell","groupNumber","autoIncrement","onSettingsChange","cellElem","cellRadius","startCellElem","endCellElem","startCoords","endCoords","cellCoords","selected","parentElem","config","flagMode","validation","validationName","defaultData","row","column","div","modalHeader","modalFooter","attrName","oldVal","newVal","pixelWidth","paintMode","sampleTypeId","tooltipTriggerList","elementName","truth","cellIndex","doIt","callBack","modal","rect","busy","change","flaggedCells","previousFlagged","previousTypeId","previousNumber","otherCell","rowRange","columnRange","replicateRange","replicates","rectangularFill","fillDirection","replicateDirection","getGroupNumber","finishGroup","getRange","setCell","setData","setCellByRowColumn","getAlternativeCellSequenceNumber","rowCol","getCellByAlternativeSequenceNumber","rows","columns","replicate","trueFalse","col"],"mappings":"6NACe,MAAMA,GAAN,MAAMA,WAAuB,WAAY,CACpD,aAAc,CACV,QAEA,KAAK,OAAS,EACd,KAAK,MAAQ,EACb,KAAK,QAAU,GACf,KAAK,mBAAqB,IAC7B,CAED,kBAAmB,CACf,KAAK,mBAAqB,EAC7B,CAED,UAAUC,EAAQC,EAAO,CACjB,KAAK,oBACL,KAAK,mBAAmB,KAAK,CACzB,OAAQD,EACR,MAAOC,CACvB,CAAa,CAER,CAED,gBAAiB,CACT,KAAK,qBACL,KAAK,QAAU,KAAK,QAAQ,MAAM,EAAG,KAAK,KAAK,EAAE,OAAO,CAAC,KAAK,kBAAkB,CAAC,EACjF,KAAK,OAAS,KAAK,MAAQ,KAAK,QAAQ,OACxC,KAAK,oBAAmB,EACxB,KAAK,mBAAqB,KAEjC,CAED,qBAAsB,CAClB,KAAK,cAAc,IAAI,MAAMF,GAAe,oBAAoB,CAAC,CACpE,CAED,MAAO,CACH,MAAMG,EAAQ,KAAK,MAAQ,EAC3B,OAAIA,GAAS,GACT,KAAK,MAAQA,EAEb,WAAW,IAAM,CACb,KAAK,oBAAmB,CAC3B,EAAE,CAAC,EACG,KAAK,QAAQA,CAAK,EAAE,MAAK,EAAG,WAE5B,IAEd,CAED,MAAO,CACH,OAAI,KAAK,MAAQ,KAAK,QAClB,KAAK,QAEL,WAAW,IAAM,CACb,KAAK,oBAAmB,CAC3B,EAAE,CAAC,EACG,KAAK,QAAQ,KAAK,MAAM,CAAC,GAEzB,IAEd,CAED,SAAU,CACN,OAAO,KAAK,MAAQ,CACvB,CAED,SAAU,CACN,OAAO,KAAK,MAAQ,KAAK,MAC5B,CAGL,EADIC,EAvEiBJ,GAuEV,uBAAuB,kBAvEnB,IAAMK,EAANL,GCAf,SAASM,EAAWC,EAAO,CACvB,GAAIA,aAAiBC,EACjB,OAAOD,EAAM,WACV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