{"version":3,"file":"html2canvas.js","sources":["../node_modules/tslib/tslib.es6.js","../../src/css/layout/bounds.ts","../node_modules/src/Util.ts","../node_modules/css-line-break/node_modules/src/Util.ts","../node_modules/css-line-break/node_modules/src/Trie.ts","../node_modules/css-line-break/node_modules/utrie/node_modules/src/index.ts","../node_modules/src/linebreak-trie.ts","../node_modules/src/LineBreak.ts","../../src/css/syntax/tokenizer.ts","../../src/css/syntax/parser.ts","../../src/css/types/length.ts","../../src/css/types/length-percentage.ts","../../src/css/types/angle.ts","../../src/css/types/color.ts","../../src/css/property-descriptors/background-clip.ts","../../src/css/property-descriptors/background-color.ts","../../src/css/types/functions/gradient.ts","../../src/css/types/functions/linear-gradient.ts","../../src/css/types/functions/-prefix-linear-gradient.ts","../../src/css/types/functions/-webkit-gradient.ts","../../src/css/types/functions/radial-gradient.ts","../../src/css/types/functions/-prefix-radial-gradient.ts","../../src/css/types/image.ts","../../src/css/property-descriptors/background-image.ts","../../src/css/property-descriptors/background-origin.ts","../../src/css/property-descriptors/background-position.ts","../../src/css/property-descriptors/background-repeat.ts","../../src/css/property-descriptors/background-size.ts","../../src/css/property-descriptors/border-color.ts","../../src/css/property-descriptors/border-radius.ts","../../src/css/property-descriptors/border-style.ts","../../src/css/property-descriptors/border-width.ts","../../src/css/property-descriptors/color.ts","../../src/css/property-descriptors/direction.ts","../../src/css/property-descriptors/display.ts","../../src/css/property-descriptors/float.ts","../../src/css/property-descriptors/letter-spacing.ts","../../src/css/property-descriptors/line-break.ts","../../src/css/property-descriptors/line-height.ts","../../src/css/property-descriptors/list-style-image.ts","../../src/css/property-descriptors/list-style-position.ts","../../src/css/property-descriptors/list-style-type.ts","../../src/css/property-descriptors/margin.ts","../../src/css/property-descriptors/overflow.ts","../../src/css/property-descriptors/overflow-wrap.ts","../../src/css/property-descriptors/padding.ts","../../src/css/property-descriptors/text-align.ts","../../src/css/property-descriptors/position.ts","../../src/css/property-descriptors/text-shadow.ts","../../src/css/property-descriptors/text-transform.ts","../../src/css/property-descriptors/transform.ts","../../src/css/property-descriptors/transform-origin.ts","../../src/css/property-descriptors/visibility.ts","../../src/css/property-descriptors/word-break.ts","../../src/css/property-descriptors/z-index.ts","../../src/css/types/time.ts","../../src/css/property-descriptors/opacity.ts","../../src/css/property-descriptors/text-decoration-color.ts","../../src/css/property-descriptors/text-decoration-line.ts","../../src/css/property-descriptors/font-family.ts","../../src/css/property-descriptors/font-size.ts","../../src/css/property-descriptors/font-weight.ts","../../src/css/property-descriptors/font-variant.ts","../../src/css/property-descriptors/font-style.ts","../../src/core/bitwise.ts","../../src/css/property-descriptors/content.ts","../../src/css/property-descriptors/counter-increment.ts","../../src/css/property-descriptors/counter-reset.ts","../../src/css/property-descriptors/duration.ts","../../src/css/property-descriptors/quotes.ts","../../src/css/property-descriptors/box-shadow.ts","../../src/css/property-descriptors/paint-order.ts","../../src/css/property-descriptors/webkit-text-stroke-color.ts","../../src/css/property-descriptors/webkit-text-stroke-width.ts","../../src/css/index.ts","../../src/core/debugger.ts","../../src/dom/element-container.ts","../node_modules/src/grapheme-break-trie.ts","../node_modules/text-segmentation/node_modules/src/Util.ts","../node_modules/text-segmentation/node_modules/src/Trie.ts","../node_modules/text-segmentation/node_modules/utrie/node_modules/src/index.ts","../node_modules/src/GraphemeBreak.ts","../../src/core/features.ts","../../src/css/layout/text.ts","../../src/dom/text-container.ts","../../src/dom/replaced-elements/image-element-container.ts","../../src/dom/replaced-elements/canvas-element-container.ts","../../src/dom/replaced-elements/svg-element-container.ts","../../src/dom/elements/li-element-container.ts","../../src/dom/elements/ol-element-container.ts","../../src/dom/replaced-elements/input-element-container.ts","../../src/dom/elements/select-element-container.ts","../../src/dom/elements/textarea-element-container.ts","../../src/dom/replaced-elements/iframe-element-container.ts","../../src/dom/node-parser.ts","../../src/css/types/functions/counter.ts","../../src/dom/document-cloner.ts","../../src/core/cache-storage.ts","../../src/render/vector.ts","../../src/render/bezier-curve.ts","../../src/render/bound-curves.ts","../../src/render/effects.ts","../../src/render/path.ts","../../src/render/stacking-context.ts","../../src/render/border.ts","../../src/render/box-sizing.ts","../../src/render/background.ts","../../src/core/util.ts","../../src/render/font-metrics.ts","../../src/render/renderer.ts","../../src/render/canvas/canvas-renderer.ts","../../src/render/canvas/foreignobject-renderer.ts","../../src/core/logger.ts","../../src/core/context.ts","../../src/index.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || from);\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","import {Context} from '../../core/context';\n\nexport class Bounds {\n constructor(readonly left: number, readonly top: number, readonly width: number, readonly height: number) {}\n\n add(x: number, y: number, w: number, h: number): Bounds {\n return new Bounds(this.left + x, this.top + y, this.width + w, this.height + h);\n }\n\n static fromClientRect(context: Context, clientRect: ClientRect): Bounds {\n return new Bounds(\n clientRect.left + context.windowBounds.left,\n clientRect.top + context.windowBounds.top,\n clientRect.width,\n clientRect.height\n );\n }\n\n static fromDOMRectList(context: Context, domRectList: DOMRectList): Bounds {\n const domRect = Array.from(domRectList).find((rect) => rect.width !== 0);\n return domRect\n ? new Bounds(\n domRect.left + context.windowBounds.left,\n domRect.top + context.windowBounds.top,\n domRect.width,\n domRect.height\n )\n : Bounds.EMPTY;\n }\n\n static EMPTY = new Bounds(0, 0, 0, 0);\n}\n\nexport const parseBounds = (context: Context, node: Element): Bounds => {\n return Bounds.fromClientRect(context, node.getBoundingClientRect());\n};\n\nexport const parseDocumentSize = (document: Document): Bounds => {\n const body = document.body;\n const documentElement = document.documentElement;\n\n if (!body || !documentElement) {\n throw new Error(`Unable to get document size`);\n }\n const width = Math.max(\n Math.max(body.scrollWidth, documentElement.scrollWidth),\n Math.max(body.offsetWidth, documentElement.offsetWidth),\n Math.max(body.clientWidth, documentElement.clientWidth)\n );\n\n const height = Math.max(\n Math.max(body.scrollHeight, documentElement.scrollHeight),\n Math.max(body.offsetHeight, documentElement.offsetHeight),\n Math.max(body.clientHeight, documentElement.clientHeight)\n );\n\n return new Bounds(0, 0, width, height);\n};\n","export const toCodePoints = (str: string): number[] => {\n const codePoints = [];\n let i = 0;\n const length = str.length;\n while (i < length) {\n const value = str.charCodeAt(i++);\n if (value >= 0xd800 && value <= 0xdbff && i < length) {\n const extra = str.charCodeAt(i++);\n if ((extra & 0xfc00) === 0xdc00) {\n codePoints.push(((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000);\n } else {\n codePoints.push(value);\n i--;\n }\n } else {\n codePoints.push(value);\n }\n }\n return codePoints;\n};\n\nexport const fromCodePoint = (...codePoints: number[]): string => {\n if (String.fromCodePoint) {\n return String.fromCodePoint(...codePoints);\n }\n\n const length = codePoints.length;\n if (!length) {\n return '';\n }\n\n const codeUnits = [];\n\n let index = -1;\n let result = '';\n while (++index < length) {\n let codePoint = codePoints[index];\n if (codePoint <= 0xffff) {\n codeUnits.push(codePoint);\n } else {\n codePoint -= 0x10000;\n codeUnits.push((codePoint >> 10) + 0xd800, (codePoint % 0x400) + 0xdc00);\n }\n if (index + 1 === length || codeUnits.length > 0x4000) {\n result += String.fromCharCode(...codeUnits);\n codeUnits.length = 0;\n }\n }\n return result;\n};\n\nconst chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\n// Use a lookup table to find the index.\nconst lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);\nfor (let i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n}\n\nexport const decode = (base64: string): ArrayBuffer | number[] => {\n let bufferLength = base64.length * 0.75,\n len = base64.length,\n i,\n p = 0,\n encoded1,\n encoded2,\n encoded3,\n encoded4;\n\n if (base64[base64.length - 1] === '=') {\n bufferLength--;\n if (base64[base64.length - 2] === '=') {\n bufferLength--;\n }\n }\n\n const buffer =\n typeof ArrayBuffer !== 'undefined' &&\n typeof Uint8Array !== 'undefined' &&\n typeof Uint8Array.prototype.slice !== 'undefined'\n ? new ArrayBuffer(bufferLength)\n : new Array(bufferLength);\n const bytes = Array.isArray(buffer) ? buffer : new Uint8Array(buffer);\n\n for (i = 0; i < len; i += 4) {\n encoded1 = lookup[base64.charCodeAt(i)];\n encoded2 = lookup[base64.charCodeAt(i + 1)];\n encoded3 = lookup[base64.charCodeAt(i + 2)];\n encoded4 = lookup[base64.charCodeAt(i + 3)];\n\n bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\n bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\n bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\n }\n\n return buffer;\n};\n\nexport const polyUint16Array = (buffer: number[]): number[] => {\n const length = buffer.length;\n const bytes = [];\n for (let i = 0; i < length; i += 2) {\n bytes.push((buffer[i + 1] << 8) | buffer[i]);\n }\n return bytes;\n};\n\nexport const polyUint32Array = (buffer: number[]): number[] => {\n const length = buffer.length;\n const bytes = [];\n for (let i = 0; i < length; i += 4) {\n bytes.push((buffer[i + 3] << 24) | (buffer[i + 2] << 16) | (buffer[i + 1] << 8) | buffer[i]);\n }\n return bytes;\n};\n","const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\n// Use a lookup table to find the index.\nconst lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);\nfor (let i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n}\n\nexport const decode = (base64: string): ArrayBuffer | number[] => {\n let bufferLength = base64.length * 0.75,\n len = base64.length,\n i,\n p = 0,\n encoded1,\n encoded2,\n encoded3,\n encoded4;\n\n if (base64[base64.length - 1] === '=') {\n bufferLength--;\n if (base64[base64.length - 2] === '=') {\n bufferLength--;\n }\n }\n\n const buffer =\n typeof ArrayBuffer !== 'undefined' &&\n typeof Uint8Array !== 'undefined' &&\n typeof Uint8Array.prototype.slice !== 'undefined'\n ? new ArrayBuffer(bufferLength)\n : new Array(bufferLength);\n const bytes = Array.isArray(buffer) ? buffer : new Uint8Array(buffer);\n\n for (i = 0; i < len; i += 4) {\n encoded1 = lookup[base64.charCodeAt(i)];\n encoded2 = lookup[base64.charCodeAt(i + 1)];\n encoded3 = lookup[base64.charCodeAt(i + 2)];\n encoded4 = lookup[base64.charCodeAt(i + 3)];\n\n bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\n bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\n bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\n }\n\n return buffer;\n};\n\nexport const polyUint16Array = (buffer: number[]): number[] => {\n const length = buffer.length;\n const bytes = [];\n for (let i = 0; i < length; i += 2) {\n bytes.push((buffer[i + 1] << 8) | buffer[i]);\n }\n return bytes;\n};\n\nexport const polyUint32Array = (buffer: number[]): number[] => {\n const length = buffer.length;\n const bytes = [];\n for (let i = 0; i < length; i += 4) {\n bytes.push((buffer[i + 3] << 24) | (buffer[i + 2] << 16) | (buffer[i + 1] << 8) | buffer[i]);\n }\n return bytes;\n};\n","import {decode, polyUint16Array, polyUint32Array} from './Util';\n\nexport type int = number;\n\n/** Shift size for getting the index-2 table offset. */\nexport const UTRIE2_SHIFT_2 = 5;\n\n/** Shift size for getting the index-1 table offset. */\nexport const UTRIE2_SHIFT_1 = 6 + 5;\n\n/**\n * Shift size for shifting left the index array values.\n * Increases possible data size with 16-bit index values at the cost\n * of compactability.\n * This requires data blocks to be aligned by UTRIE2_DATA_GRANULARITY.\n */\nexport const UTRIE2_INDEX_SHIFT = 2;\n\n/**\n * Difference between the two shift sizes,\n * for getting an index-1 offset from an index-2 offset. 6=11-5\n */\nexport const UTRIE2_SHIFT_1_2 = UTRIE2_SHIFT_1 - UTRIE2_SHIFT_2;\n\n/**\n * The part of the index-2 table for U+D800..U+DBFF stores values for\n * lead surrogate code _units_ not code _points_.\n * Values for lead surrogate code _points_ are indexed with this portion of the table.\n * Length=32=0x20=0x400>>UTRIE2_SHIFT_2. (There are 1024=0x400 lead surrogates.)\n */\nexport const UTRIE2_LSCP_INDEX_2_OFFSET = 0x10000 >> UTRIE2_SHIFT_2;\n\n/** Number of entries in a data block. 32=0x20 */\nexport const UTRIE2_DATA_BLOCK_LENGTH = 1 << UTRIE2_SHIFT_2;\n/** Mask for getting the lower bits for the in-data-block offset. */\nexport const UTRIE2_DATA_MASK = UTRIE2_DATA_BLOCK_LENGTH - 1;\n\nexport const UTRIE2_LSCP_INDEX_2_LENGTH = 0x400 >> UTRIE2_SHIFT_2;\n/** Count the lengths of both BMP pieces. 2080=0x820 */\nexport const UTRIE2_INDEX_2_BMP_LENGTH = UTRIE2_LSCP_INDEX_2_OFFSET + UTRIE2_LSCP_INDEX_2_LENGTH;\n/**\n * The 2-byte UTF-8 version of the index-2 table follows at offset 2080=0x820.\n * Length 32=0x20 for lead bytes C0..DF, regardless of UTRIE2_SHIFT_2.\n */\nexport const UTRIE2_UTF8_2B_INDEX_2_OFFSET = UTRIE2_INDEX_2_BMP_LENGTH;\nexport const UTRIE2_UTF8_2B_INDEX_2_LENGTH = 0x800 >> 6; /* U+0800 is the first code point after 2-byte UTF-8 */\n/**\n * The index-1 table, only used for supplementary code points, at offset 2112=0x840.\n * Variable length, for code points up to highStart, where the last single-value range starts.\n * Maximum length 512=0x200=0x100000>>UTRIE2_SHIFT_1.\n * (For 0x100000 supplementary code points U+10000..U+10ffff.)\n *\n * The part of the index-2 table for supplementary code points starts\n * after this index-1 table.\n *\n * Both the index-1 table and the following part of the index-2 table\n * are omitted completely if there is only BMP data.\n */\nexport const UTRIE2_INDEX_1_OFFSET = UTRIE2_UTF8_2B_INDEX_2_OFFSET + UTRIE2_UTF8_2B_INDEX_2_LENGTH;\n\n/**\n * Number of index-1 entries for the BMP. 32=0x20\n * This part of the index-1 table is omitted from the serialized form.\n */\nexport const UTRIE2_OMITTED_BMP_INDEX_1_LENGTH = 0x10000 >> UTRIE2_SHIFT_1;\n\n/** Number of entries in an index-2 block. 64=0x40 */\nexport const UTRIE2_INDEX_2_BLOCK_LENGTH = 1 << UTRIE2_SHIFT_1_2;\n/** Mask for getting the lower bits for the in-index-2-block offset. */\nexport const UTRIE2_INDEX_2_MASK = UTRIE2_INDEX_2_BLOCK_LENGTH - 1;\n\nconst slice16 = (view: number[] | Uint16Array, start: number, end?: number) => {\n if (view.slice) {\n return view.slice(start, end);\n }\n\n return new Uint16Array(Array.prototype.slice.call(view, start, end));\n};\n\nconst slice32 = (view: number[] | Uint32Array, start: number, end?: number) => {\n if (view.slice) {\n return view.slice(start, end);\n }\n\n return new Uint32Array(Array.prototype.slice.call(view, start, end));\n};\n\nexport const createTrieFromBase64 = (base64: string, _byteLength: number): Trie => {\n const buffer = decode(base64);\n const view32 = Array.isArray(buffer) ? polyUint32Array(buffer) : new Uint32Array(buffer);\n const view16 = Array.isArray(buffer) ? polyUint16Array(buffer) : new Uint16Array(buffer);\n const headerLength = 24;\n\n const index = slice16(view16, headerLength / 2, view32[4] / 2);\n const data =\n view32[5] === 2\n ? slice16(view16, (headerLength + view32[4]) / 2)\n : slice32(view32, Math.ceil((headerLength + view32[4]) / 4));\n\n return new Trie(view32[0], view32[1], view32[2], view32[3], index, data);\n};\n\nexport class Trie {\n initialValue: int;\n errorValue: int;\n highStart: int;\n highValueIndex: int;\n index: Uint16Array | number[];\n data: Uint32Array | Uint16Array | number[];\n\n constructor(\n initialValue: int,\n errorValue: int,\n highStart: int,\n highValueIndex: int,\n index: Uint16Array | number[],\n data: Uint32Array | Uint16Array | number[]\n ) {\n this.initialValue = initialValue;\n this.errorValue = errorValue;\n this.highStart = highStart;\n this.highValueIndex = highValueIndex;\n this.index = index;\n this.data = data;\n }\n\n /**\n * Get the value for a code point as stored in the Trie.\n *\n * @param codePoint the code point\n * @return the value\n */\n get(codePoint: number): number {\n let ix;\n if (codePoint >= 0) {\n if (codePoint < 0x0d800 || (codePoint > 0x0dbff && codePoint <= 0x0ffff)) {\n // Ordinary BMP code point, excluding leading surrogates.\n // BMP uses a single level lookup. BMP index starts at offset 0 in the Trie2 index.\n // 16 bit data is stored in the index array itself.\n ix = this.index[codePoint >> UTRIE2_SHIFT_2];\n ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);\n return this.data[ix];\n }\n\n if (codePoint <= 0xffff) {\n // Lead Surrogate Code Point. A Separate index section is stored for\n // lead surrogate code units and code points.\n // The main index has the code unit data.\n // For this function, we need the code point data.\n // Note: this expression could be refactored for slightly improved efficiency, but\n // surrogate code points will be so rare in practice that it's not worth it.\n ix = this.index[UTRIE2_LSCP_INDEX_2_OFFSET + ((codePoint - 0xd800) >> UTRIE2_SHIFT_2)];\n ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);\n return this.data[ix];\n }\n\n if (codePoint < this.highStart) {\n // Supplemental code point, use two-level lookup.\n ix = UTRIE2_INDEX_1_OFFSET - UTRIE2_OMITTED_BMP_INDEX_1_LENGTH + (codePoint >> UTRIE2_SHIFT_1);\n ix = this.index[ix];\n ix += (codePoint >> UTRIE2_SHIFT_2) & UTRIE2_INDEX_2_MASK;\n ix = this.index[ix];\n ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);\n return this.data[ix];\n }\n if (codePoint <= 0x10ffff) {\n return this.data[this.highValueIndex];\n }\n }\n\n // Fall through. The code point is outside of the legal range of 0..0x10ffff.\n return this.errorValue;\n }\n}\n","const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\n// Use a lookup table to find the index.\nconst lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);\nfor (let i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n}\n\nexport const encode = (arraybuffer: ArrayBuffer): string => {\n let bytes = new Uint8Array(arraybuffer),\n i,\n len = bytes.length,\n base64 = '';\n\n for (i = 0; i < len; i += 3) {\n base64 += chars[bytes[i] >> 2];\n base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];\n base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];\n base64 += chars[bytes[i + 2] & 63];\n }\n\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + '=';\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + '==';\n }\n\n return base64;\n};\n\nexport const decode = (base64: string): ArrayBuffer => {\n let bufferLength = base64.length * 0.75,\n len = base64.length,\n i,\n p = 0,\n encoded1,\n encoded2,\n encoded3,\n encoded4;\n\n if (base64[base64.length - 1] === '=') {\n bufferLength--;\n if (base64[base64.length - 2] === '=') {\n bufferLength--;\n }\n }\n\n const arraybuffer = new ArrayBuffer(bufferLength),\n bytes = new Uint8Array(arraybuffer);\n\n for (i = 0; i < len; i += 4) {\n encoded1 = lookup[base64.charCodeAt(i)];\n encoded2 = lookup[base64.charCodeAt(i + 1)];\n encoded3 = lookup[base64.charCodeAt(i + 2)];\n encoded4 = lookup[base64.charCodeAt(i + 3)];\n\n bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\n bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\n bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\n }\n\n return arraybuffer;\n};\n","export const base64 =\n 'KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc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CS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAc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AwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABg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AUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQA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XAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAF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AFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAF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sAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AH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ArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJ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JQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==';\nexport const byteLength = 39664;\n","'use strict';\n\nimport {createTrieFromBase64} from 'utrie';\nimport {base64, byteLength} from './linebreak-trie';\nimport {fromCodePoint, toCodePoints} from './Util';\n\nexport const LETTER_NUMBER_MODIFIER = 50;\n\n// Non-tailorable Line Breaking Classes\nconst BK = 1; // Cause a line break (after)\nconst CR = 2; // Cause a line break (after), except between CR and LF\nconst LF = 3; // Cause a line break (after)\nconst CM = 4; // Prohibit a line break between the character and the preceding character\nconst NL = 5; // Cause a line break (after)\nconst SG = 6; // Do not occur in well-formed text\nconst WJ = 7; // Prohibit line breaks before and after\nconst ZW = 8; // Provide a break opportunity\nconst GL = 9; // Prohibit line breaks before and after\nconst SP = 10; // Enable indirect line breaks\nconst ZWJ = 11; // Prohibit line breaks within joiner sequences\n// Break Opportunities\nconst B2 = 12; // Provide a line break opportunity before and after the character\nconst BA = 13; // Generally provide a line break opportunity after the character\nconst BB = 14; // Generally provide a line break opportunity before the character\nconst HY = 15; // Provide a line break opportunity after the character, except in numeric context\nconst CB = 16; // Provide a line break opportunity contingent on additional information\n// Characters Prohibiting Certain Breaks\nconst CL = 17; // Prohibit line breaks before\nconst CP = 18; // Prohibit line breaks before\nconst EX = 19; // Prohibit line breaks before\nconst IN = 20; // Allow only indirect line breaks between pairs\nconst NS = 21; // Allow only indirect line breaks before\nconst OP = 22; // Prohibit line breaks after\nconst QU = 23; // Act like they are both opening and closing\n// Numeric Context\nconst IS = 24; // Prevent breaks after any and before numeric\nconst NU = 25; // Form numeric expressions for line breaking purposes\nconst PO = 26; // Do not break following a numeric expression\nconst PR = 27; // Do not break in front of a numeric expression\nconst SY = 28; // Prevent a break before; and allow a break after\n// Other Characters\nconst AI = 29; // Act like AL when the resolvedEAW is N; otherwise; act as ID\nconst AL = 30; // Are alphabetic characters or symbols that are used with alphabetic characters\nconst CJ = 31; // Treat as NS or ID for strict or normal breaking.\nconst EB = 32; // Do not break from following Emoji Modifier\nconst EM = 33; // Do not break from preceding Emoji Base\nconst H2 = 34; // Form Korean syllable blocks\nconst H3 = 35; // Form Korean syllable blocks\nconst HL = 36; // Do not break around a following hyphen; otherwise act as Alphabetic\nconst ID = 37; // Break before or after; except in some numeric context\nconst JL = 38; // Form Korean syllable blocks\nconst JV = 39; // Form Korean syllable blocks\nconst JT = 40; // Form Korean syllable blocks\nconst RI = 41; // Keep pairs together. For pairs; break before and after other classes\nconst SA = 42; // Provide a line break opportunity contingent on additional, language-specific context analysis\nconst XX = 43; // Have as yet unknown line breaking behavior or unassigned code positions\n\nconst ea_OP = [0x2329, 0xff08];\n\nexport const classes: {[key: string]: number} = {\n BK,\n CR,\n LF,\n CM,\n NL,\n SG,\n WJ,\n ZW,\n GL,\n SP,\n ZWJ,\n B2,\n BA,\n BB,\n HY,\n CB,\n CL,\n CP,\n EX,\n IN,\n NS,\n OP,\n QU,\n IS,\n NU,\n PO,\n PR,\n SY,\n AI,\n AL,\n CJ,\n EB,\n EM,\n H2,\n H3,\n HL,\n ID,\n JL,\n JV,\n JT,\n RI,\n SA,\n XX,\n};\n\nexport const BREAK_MANDATORY = '!';\nexport const BREAK_NOT_ALLOWED = '×';\nexport const BREAK_ALLOWED = '÷';\nexport const UnicodeTrie = createTrieFromBase64(base64, byteLength);\n\nconst ALPHABETICS = [AL, HL];\nconst HARD_LINE_BREAKS = [BK, CR, LF, NL];\nconst SPACE = [SP, ZW];\nconst PREFIX_POSTFIX = [PR, PO];\nconst LINE_BREAKS = HARD_LINE_BREAKS.concat(SPACE);\nconst KOREAN_SYLLABLE_BLOCK = [JL, JV, JT, H2, H3];\nconst HYPHEN = [HY, BA];\n\nexport const codePointsToCharacterClasses = (\n codePoints: number[],\n lineBreak: string = 'strict'\n): [number[], number[], boolean[]] => {\n const types: number[] = [];\n const indices: number[] = [];\n const categories: boolean[] = [];\n codePoints.forEach((codePoint, index) => {\n let classType = UnicodeTrie.get(codePoint);\n if (classType > LETTER_NUMBER_MODIFIER) {\n categories.push(true);\n classType -= LETTER_NUMBER_MODIFIER;\n } else {\n categories.push(false);\n }\n\n if (['normal', 'auto', 'loose'].indexOf(lineBreak) !== -1) {\n // U+2010, – U+2013, 〜 U+301C, ゠ U+30A0\n if ([0x2010, 0x2013, 0x301c, 0x30a0].indexOf(codePoint) !== -1) {\n indices.push(index);\n return types.push(CB);\n }\n }\n\n if (classType === CM || classType === ZWJ) {\n // LB10 Treat any remaining combining mark or ZWJ as AL.\n if (index === 0) {\n indices.push(index);\n return types.push(AL);\n }\n\n // LB9 Do not break a combining character sequence; treat it as if it has the line breaking class of\n // the base character in all of the following rules. Treat ZWJ as if it were CM.\n const prev = types[index - 1];\n if (LINE_BREAKS.indexOf(prev) === -1) {\n indices.push(indices[index - 1]);\n return types.push(prev);\n }\n indices.push(index);\n return types.push(AL);\n }\n\n indices.push(index);\n\n if (classType === CJ) {\n return types.push(lineBreak === 'strict' ? NS : ID);\n }\n\n if (classType === SA) {\n return types.push(AL);\n }\n\n if (classType === AI) {\n return types.push(AL);\n }\n\n // For supplementary characters, a useful default is to treat characters in the range 10000..1FFFD as AL\n // and characters in the ranges 20000..2FFFD and 30000..3FFFD as ID, until the implementation can be revised\n // to take into account the actual line breaking properties for these characters.\n if (classType === XX) {\n if ((codePoint >= 0x20000 && codePoint <= 0x2fffd) || (codePoint >= 0x30000 && codePoint <= 0x3fffd)) {\n return types.push(ID);\n } else {\n return types.push(AL);\n }\n }\n\n types.push(classType);\n });\n\n return [indices, types, categories];\n};\n\nconst isAdjacentWithSpaceIgnored = (\n a: number[] | number,\n b: number,\n currentIndex: number,\n classTypes: number[]\n): boolean => {\n const current = classTypes[currentIndex];\n if (Array.isArray(a) ? a.indexOf(current) !== -1 : a === current) {\n let i = currentIndex;\n while (i <= classTypes.length) {\n i++;\n let next = classTypes[i];\n\n if (next === b) {\n return true;\n }\n\n if (next !== SP) {\n break;\n }\n }\n }\n\n if (current === SP) {\n let i = currentIndex;\n\n while (i > 0) {\n i--;\n const prev = classTypes[i];\n\n if (Array.isArray(a) ? a.indexOf(prev) !== -1 : a === prev) {\n let n = currentIndex;\n while (n <= classTypes.length) {\n n++;\n let next = classTypes[n];\n\n if (next === b) {\n return true;\n }\n\n if (next !== SP) {\n break;\n }\n }\n }\n\n if (prev !== SP) {\n break;\n }\n }\n }\n return false;\n};\n\nconst previousNonSpaceClassType = (currentIndex: number, classTypes: number[]): number => {\n let i = currentIndex;\n while (i >= 0) {\n let type = classTypes[i];\n if (type === SP) {\n i--;\n } else {\n return type;\n }\n }\n return 0;\n};\n\nexport type BREAK_OPPORTUNITIES = typeof BREAK_NOT_ALLOWED | typeof BREAK_ALLOWED | typeof BREAK_MANDATORY;\n\nconst _lineBreakAtIndex = (\n codePoints: number[],\n classTypes: number[],\n indicies: number[],\n index: number,\n forbiddenBreaks?: boolean[]\n): BREAK_OPPORTUNITIES => {\n if (indicies[index] === 0) {\n return BREAK_NOT_ALLOWED;\n }\n\n let currentIndex = index - 1;\n if (Array.isArray(forbiddenBreaks) && forbiddenBreaks[currentIndex] === true) {\n return BREAK_NOT_ALLOWED;\n }\n\n let beforeIndex = currentIndex - 1;\n let afterIndex = currentIndex + 1;\n let current = classTypes[currentIndex];\n\n // LB4 Always break after hard line breaks.\n // LB5 Treat CR followed by LF, as well as CR, LF, and NL as hard line breaks.\n let before = beforeIndex >= 0 ? classTypes[beforeIndex] : 0;\n let next = classTypes[afterIndex];\n\n if (current === CR && next === LF) {\n return BREAK_NOT_ALLOWED;\n }\n\n if (HARD_LINE_BREAKS.indexOf(current) !== -1) {\n return BREAK_MANDATORY;\n }\n\n // LB6 Do not break before hard line breaks.\n if (HARD_LINE_BREAKS.indexOf(next) !== -1) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB7 Do not break before spaces or zero width space.\n if (SPACE.indexOf(next) !== -1) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB8 Break before any character following a zero-width space, even if one or more spaces intervene.\n if (previousNonSpaceClassType(currentIndex, classTypes) === ZW) {\n return BREAK_ALLOWED;\n }\n\n // LB8a Do not break after a zero width joiner.\n if (UnicodeTrie.get(codePoints[currentIndex]) === ZWJ) {\n return BREAK_NOT_ALLOWED;\n }\n\n // zwj emojis\n if ((current === EB || current === EM) && UnicodeTrie.get(codePoints[afterIndex]) === ZWJ) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB11 Do not break before or after Word joiner and related characters.\n if (current === WJ || next === WJ) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB12 Do not break after NBSP and related characters.\n if (current === GL) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB12a Do not break before NBSP and related characters, except after spaces and hyphens.\n if ([SP, BA, HY].indexOf(current) === -1 && next === GL) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB13 Do not break before ‘]’ or ‘!’ or ‘;’ or ‘/’, even after spaces.\n if ([CL, CP, EX, IS, SY].indexOf(next) !== -1) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB14 Do not break after ‘[’, even after spaces.\n if (previousNonSpaceClassType(currentIndex, classTypes) === OP) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB15 Do not break within ‘”[’, even with intervening spaces.\n if (isAdjacentWithSpaceIgnored(QU, OP, currentIndex, classTypes)) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB16 Do not break between closing punctuation and a nonstarter (lb=NS), even with intervening spaces.\n if (isAdjacentWithSpaceIgnored([CL, CP], NS, currentIndex, classTypes)) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB17 Do not break within ‘——’, even with intervening spaces.\n if (isAdjacentWithSpaceIgnored(B2, B2, currentIndex, classTypes)) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB18 Break after spaces.\n if (current === SP) {\n return BREAK_ALLOWED;\n }\n\n // LB19 Do not break before or after quotation marks, such as ‘ ” ’.\n if (current === QU || next === QU) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB20 Break before and after unresolved CB.\n if (next === CB || current === CB) {\n return BREAK_ALLOWED;\n }\n\n // LB21 Do not break before hyphen-minus, other hyphens, fixed-width spaces, small kana, and other non-starters, or after acute accents.\n if ([BA, HY, NS].indexOf(next) !== -1 || current === BB) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB21a Don't break after Hebrew + Hyphen.\n if (before === HL && HYPHEN.indexOf(current) !== -1) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB21b Don’t break between Solidus and Hebrew letters.\n if (current === SY && next === HL) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB22 Do not break before ellipsis.\n if (next === IN) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB23 Do not break between digits and letters.\n if ((ALPHABETICS.indexOf(next) !== -1 && current === NU) || (ALPHABETICS.indexOf(current) !== -1 && next === NU)) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB23a Do not break between numeric prefixes and ideographs, or between ideographs and numeric postfixes.\n if (\n (current === PR && [ID, EB, EM].indexOf(next) !== -1) ||\n ([ID, EB, EM].indexOf(current) !== -1 && next === PO)\n ) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB24 Do not break between numeric prefix/postfix and letters, or between letters and prefix/postfix.\n if (\n (ALPHABETICS.indexOf(current) !== -1 && PREFIX_POSTFIX.indexOf(next) !== -1) ||\n (PREFIX_POSTFIX.indexOf(current) !== -1 && ALPHABETICS.indexOf(next) !== -1)\n ) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB25 Do not break between the following pairs of classes relevant to numbers:\n if (\n // (PR | PO) × ( OP | HY )? NU\n ([PR, PO].indexOf(current) !== -1 &&\n (next === NU || ([OP, HY].indexOf(next) !== -1 && classTypes[afterIndex + 1] === NU))) ||\n // ( OP | HY ) × NU\n ([OP, HY].indexOf(current) !== -1 && next === NU) ||\n // NU ×\t(NU | SY | IS)\n (current === NU && [NU, SY, IS].indexOf(next) !== -1)\n ) {\n return BREAK_NOT_ALLOWED;\n }\n\n // NU (NU | SY | IS)* × (NU | SY | IS | CL | CP)\n if ([NU, SY, IS, CL, CP].indexOf(next) !== -1) {\n let prevIndex = currentIndex;\n while (prevIndex >= 0) {\n let type = classTypes[prevIndex];\n if (type === NU) {\n return BREAK_NOT_ALLOWED;\n } else if ([SY, IS].indexOf(type) !== -1) {\n prevIndex--;\n } else {\n break;\n }\n }\n }\n\n // NU (NU | SY | IS)* (CL | CP)? × (PO | PR))\n if ([PR, PO].indexOf(next) !== -1) {\n let prevIndex = [CL, CP].indexOf(current) !== -1 ? beforeIndex : currentIndex;\n while (prevIndex >= 0) {\n let type = classTypes[prevIndex];\n if (type === NU) {\n return BREAK_NOT_ALLOWED;\n } else if ([SY, IS].indexOf(type) !== -1) {\n prevIndex--;\n } else {\n break;\n }\n }\n }\n\n // LB26 Do not break a Korean syllable.\n if (\n (JL === current && [JL, JV, H2, H3].indexOf(next) !== -1) ||\n ([JV, H2].indexOf(current) !== -1 && [JV, JT].indexOf(next) !== -1) ||\n ([JT, H3].indexOf(current) !== -1 && next === JT)\n ) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB27 Treat a Korean Syllable Block the same as ID.\n if (\n (KOREAN_SYLLABLE_BLOCK.indexOf(current) !== -1 && [IN, PO].indexOf(next) !== -1) ||\n (KOREAN_SYLLABLE_BLOCK.indexOf(next) !== -1 && current === PR)\n ) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB28 Do not break between alphabetics (“at”).\n if (ALPHABETICS.indexOf(current) !== -1 && ALPHABETICS.indexOf(next) !== -1) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB29 Do not break between numeric punctuation and alphabetics (“e.g.”).\n if (current === IS && ALPHABETICS.indexOf(next) !== -1) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB30 Do not break between letters, numbers, or ordinary symbols and opening or closing parentheses.\n if (\n (ALPHABETICS.concat(NU).indexOf(current) !== -1 &&\n next === OP &&\n ea_OP.indexOf(codePoints[afterIndex]) === -1) ||\n (ALPHABETICS.concat(NU).indexOf(next) !== -1 && current === CP)\n ) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB30a Break between two regional indicator symbols if and only if there are an even number of regional\n // indicators preceding the position of the break.\n if (current === RI && next === RI) {\n let i = indicies[currentIndex];\n let count = 1;\n while (i > 0) {\n i--;\n if (classTypes[i] === RI) {\n count++;\n } else {\n break;\n }\n }\n if (count % 2 !== 0) {\n return BREAK_NOT_ALLOWED;\n }\n }\n\n // LB30b Do not break between an emoji base and an emoji modifier.\n if (current === EB && next === EM) {\n return BREAK_NOT_ALLOWED;\n }\n\n return BREAK_ALLOWED;\n};\n\nexport const lineBreakAtIndex = (codePoints: number[], index: number): BREAK_OPPORTUNITIES => {\n // LB2 Never break at the start of text.\n if (index === 0) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB3 Always break at the end of text.\n if (index >= codePoints.length) {\n return BREAK_MANDATORY;\n }\n\n const [indices, classTypes] = codePointsToCharacterClasses(codePoints);\n\n return _lineBreakAtIndex(codePoints, classTypes, indices, index);\n};\n\nexport type LINE_BREAK = 'auto' | 'normal' | 'strict';\nexport type WORD_BREAK = 'normal' | 'break-all' | 'break-word' | 'keep-all';\n\ninterface IOptions {\n lineBreak?: LINE_BREAK;\n wordBreak?: WORD_BREAK;\n}\n\nconst cssFormattedClasses = (codePoints: number[], options?: IOptions): [number[], number[], boolean[] | undefined] => {\n if (!options) {\n options = {lineBreak: 'normal', wordBreak: 'normal'};\n }\n let [indicies, classTypes, isLetterNumber] = codePointsToCharacterClasses(codePoints, options.lineBreak);\n\n if (options.wordBreak === 'break-all' || options.wordBreak === 'break-word') {\n classTypes = classTypes.map((type) => ([NU, AL, SA].indexOf(type) !== -1 ? ID : type));\n }\n\n const forbiddenBreakpoints =\n options.wordBreak === 'keep-all'\n ? isLetterNumber.map((letterNumber, i) => {\n return letterNumber && codePoints[i] >= 0x4e00 && codePoints[i] <= 0x9fff;\n })\n : undefined;\n\n return [indicies, classTypes, forbiddenBreakpoints];\n};\n\nexport const inlineBreakOpportunities = (str: string, options?: IOptions): string => {\n const codePoints = toCodePoints(str);\n let output = BREAK_NOT_ALLOWED;\n const [indicies, classTypes, forbiddenBreakpoints] = cssFormattedClasses(codePoints, options);\n\n codePoints.forEach((codePoint, i) => {\n output +=\n fromCodePoint(codePoint) +\n (i >= codePoints.length - 1\n ? BREAK_MANDATORY\n : _lineBreakAtIndex(codePoints, classTypes, indicies, i + 1, forbiddenBreakpoints));\n });\n\n return output;\n};\n\nclass Break {\n private readonly codePoints: number[];\n readonly required: boolean;\n readonly start: number;\n readonly end: number;\n\n constructor(codePoints: number[], lineBreak: string, start: number, end: number) {\n this.codePoints = codePoints;\n this.required = lineBreak === BREAK_MANDATORY;\n this.start = start;\n this.end = end;\n }\n\n slice(): string {\n return fromCodePoint(...this.codePoints.slice(this.start, this.end));\n }\n}\n\nexport type LineBreak =\n | {\n done: true;\n value: null;\n }\n | {\n done: false;\n value: Break;\n };\n\ninterface ILineBreakIterator {\n next: () => LineBreak;\n}\n\nexport const LineBreaker = (str: string, options?: IOptions): ILineBreakIterator => {\n const codePoints = toCodePoints(str);\n const [indicies, classTypes, forbiddenBreakpoints] = cssFormattedClasses(codePoints, options);\n const length = codePoints.length;\n let lastEnd = 0;\n let nextIndex = 0;\n\n return {\n next: () => {\n if (nextIndex >= length) {\n return {done: true, value: null};\n }\n let lineBreak = BREAK_NOT_ALLOWED;\n while (\n nextIndex < length &&\n (lineBreak = _lineBreakAtIndex(codePoints, classTypes, indicies, ++nextIndex, forbiddenBreakpoints)) ===\n BREAK_NOT_ALLOWED\n ) {}\n\n if (lineBreak !== BREAK_NOT_ALLOWED || nextIndex === length) {\n const value = new Break(codePoints, lineBreak, lastEnd, nextIndex);\n lastEnd = nextIndex;\n return {value, done: false};\n }\n\n return {done: true, value: null};\n },\n };\n};\n","// https://www.w3.org/TR/css-syntax-3\n\nimport {fromCodePoint, toCodePoints} from 'css-line-break';\n\nexport const enum TokenType {\n STRING_TOKEN,\n BAD_STRING_TOKEN,\n LEFT_PARENTHESIS_TOKEN,\n RIGHT_PARENTHESIS_TOKEN,\n COMMA_TOKEN,\n HASH_TOKEN,\n DELIM_TOKEN,\n AT_KEYWORD_TOKEN,\n PREFIX_MATCH_TOKEN,\n DASH_MATCH_TOKEN,\n INCLUDE_MATCH_TOKEN,\n LEFT_CURLY_BRACKET_TOKEN,\n RIGHT_CURLY_BRACKET_TOKEN,\n SUFFIX_MATCH_TOKEN,\n SUBSTRING_MATCH_TOKEN,\n DIMENSION_TOKEN,\n PERCENTAGE_TOKEN,\n NUMBER_TOKEN,\n FUNCTION,\n FUNCTION_TOKEN,\n IDENT_TOKEN,\n COLUMN_TOKEN,\n URL_TOKEN,\n BAD_URL_TOKEN,\n CDC_TOKEN,\n CDO_TOKEN,\n COLON_TOKEN,\n SEMICOLON_TOKEN,\n LEFT_SQUARE_BRACKET_TOKEN,\n RIGHT_SQUARE_BRACKET_TOKEN,\n UNICODE_RANGE_TOKEN,\n WHITESPACE_TOKEN,\n EOF_TOKEN\n}\n\ninterface IToken {\n type: TokenType;\n}\n\nexport interface Token extends IToken {\n type:\n | TokenType.BAD_URL_TOKEN\n | TokenType.BAD_STRING_TOKEN\n | TokenType.LEFT_PARENTHESIS_TOKEN\n | TokenType.RIGHT_PARENTHESIS_TOKEN\n | TokenType.COMMA_TOKEN\n | TokenType.SUBSTRING_MATCH_TOKEN\n | TokenType.PREFIX_MATCH_TOKEN\n | TokenType.SUFFIX_MATCH_TOKEN\n | TokenType.COLON_TOKEN\n | TokenType.SEMICOLON_TOKEN\n | TokenType.LEFT_SQUARE_BRACKET_TOKEN\n | TokenType.RIGHT_SQUARE_BRACKET_TOKEN\n | TokenType.LEFT_CURLY_BRACKET_TOKEN\n | TokenType.RIGHT_CURLY_BRACKET_TOKEN\n | TokenType.DASH_MATCH_TOKEN\n | TokenType.INCLUDE_MATCH_TOKEN\n | TokenType.COLUMN_TOKEN\n | TokenType.WHITESPACE_TOKEN\n | TokenType.CDC_TOKEN\n | TokenType.CDO_TOKEN\n | TokenType.EOF_TOKEN;\n}\n\nexport interface StringValueToken extends IToken {\n type:\n | TokenType.STRING_TOKEN\n | TokenType.DELIM_TOKEN\n | TokenType.FUNCTION_TOKEN\n | TokenType.IDENT_TOKEN\n | TokenType.URL_TOKEN\n | TokenType.AT_KEYWORD_TOKEN;\n value: string;\n}\n\nexport interface HashToken extends IToken {\n type: TokenType.HASH_TOKEN;\n flags: number;\n value: string;\n}\n\nexport interface NumberValueToken extends IToken {\n type: TokenType.PERCENTAGE_TOKEN | TokenType.NUMBER_TOKEN;\n flags: number;\n number: number;\n}\n\nexport interface DimensionToken extends IToken {\n type: TokenType.DIMENSION_TOKEN;\n flags: number;\n unit: string;\n number: number;\n}\n\nexport interface UnicodeRangeToken extends IToken {\n type: TokenType.UNICODE_RANGE_TOKEN;\n start: number;\n end: number;\n}\n\nexport type CSSToken = Token | StringValueToken | NumberValueToken | DimensionToken | UnicodeRangeToken | HashToken;\n\nexport const FLAG_UNRESTRICTED = 1 << 0;\nexport const FLAG_ID = 1 << 1;\nexport const FLAG_INTEGER = 1 << 2;\nexport const FLAG_NUMBER = 1 << 3;\n\nconst LINE_FEED = 0x000a;\nconst SOLIDUS = 0x002f;\nconst REVERSE_SOLIDUS = 0x005c;\nconst CHARACTER_TABULATION = 0x0009;\nconst SPACE = 0x0020;\nconst QUOTATION_MARK = 0x0022;\nconst EQUALS_SIGN = 0x003d;\nconst NUMBER_SIGN = 0x0023;\nconst DOLLAR_SIGN = 0x0024;\nconst PERCENTAGE_SIGN = 0x0025;\nconst APOSTROPHE = 0x0027;\nconst LEFT_PARENTHESIS = 0x0028;\nconst RIGHT_PARENTHESIS = 0x0029;\nconst LOW_LINE = 0x005f;\nconst HYPHEN_MINUS = 0x002d;\nconst EXCLAMATION_MARK = 0x0021;\nconst LESS_THAN_SIGN = 0x003c;\nconst GREATER_THAN_SIGN = 0x003e;\nconst COMMERCIAL_AT = 0x0040;\nconst LEFT_SQUARE_BRACKET = 0x005b;\nconst RIGHT_SQUARE_BRACKET = 0x005d;\nconst CIRCUMFLEX_ACCENT = 0x003d;\nconst LEFT_CURLY_BRACKET = 0x007b;\nconst QUESTION_MARK = 0x003f;\nconst RIGHT_CURLY_BRACKET = 0x007d;\nconst VERTICAL_LINE = 0x007c;\nconst TILDE = 0x007e;\nconst CONTROL = 0x0080;\nconst REPLACEMENT_CHARACTER = 0xfffd;\nconst ASTERISK = 0x002a;\nconst PLUS_SIGN = 0x002b;\nconst COMMA = 0x002c;\nconst COLON = 0x003a;\nconst SEMICOLON = 0x003b;\nconst FULL_STOP = 0x002e;\nconst NULL = 0x0000;\nconst BACKSPACE = 0x0008;\nconst LINE_TABULATION = 0x000b;\nconst SHIFT_OUT = 0x000e;\nconst INFORMATION_SEPARATOR_ONE = 0x001f;\nconst DELETE = 0x007f;\nconst EOF = -1;\nconst ZERO = 0x0030;\nconst a = 0x0061;\nconst e = 0x0065;\nconst f = 0x0066;\nconst u = 0x0075;\nconst z = 0x007a;\nconst A = 0x0041;\nconst E = 0x0045;\nconst F = 0x0046;\nconst U = 0x0055;\nconst Z = 0x005a;\n\nconst isDigit = (codePoint: number) => codePoint >= ZERO && codePoint <= 0x0039;\nconst isSurrogateCodePoint = (codePoint: number) => codePoint >= 0xd800 && codePoint <= 0xdfff;\nconst isHex = (codePoint: number) =>\n isDigit(codePoint) || (codePoint >= A && codePoint <= F) || (codePoint >= a && codePoint <= f);\nconst isLowerCaseLetter = (codePoint: number) => codePoint >= a && codePoint <= z;\nconst isUpperCaseLetter = (codePoint: number) => codePoint >= A && codePoint <= Z;\nconst isLetter = (codePoint: number) => isLowerCaseLetter(codePoint) || isUpperCaseLetter(codePoint);\nconst isNonASCIICodePoint = (codePoint: number) => codePoint >= CONTROL;\nconst isWhiteSpace = (codePoint: number): boolean =>\n codePoint === LINE_FEED || codePoint === CHARACTER_TABULATION || codePoint === SPACE;\nconst isNameStartCodePoint = (codePoint: number): boolean =>\n isLetter(codePoint) || isNonASCIICodePoint(codePoint) || codePoint === LOW_LINE;\nconst isNameCodePoint = (codePoint: number): boolean =>\n isNameStartCodePoint(codePoint) || isDigit(codePoint) || codePoint === HYPHEN_MINUS;\nconst isNonPrintableCodePoint = (codePoint: number): boolean => {\n return (\n (codePoint >= NULL && codePoint <= BACKSPACE) ||\n codePoint === LINE_TABULATION ||\n (codePoint >= SHIFT_OUT && codePoint <= INFORMATION_SEPARATOR_ONE) ||\n codePoint === DELETE\n );\n};\nconst isValidEscape = (c1: number, c2: number): boolean => {\n if (c1 !== REVERSE_SOLIDUS) {\n return false;\n }\n\n return c2 !== LINE_FEED;\n};\nconst isIdentifierStart = (c1: number, c2: number, c3: number): boolean => {\n if (c1 === HYPHEN_MINUS) {\n return isNameStartCodePoint(c2) || isValidEscape(c2, c3);\n } else if (isNameStartCodePoint(c1)) {\n return true;\n } else if (c1 === REVERSE_SOLIDUS && isValidEscape(c1, c2)) {\n return true;\n }\n return false;\n};\n\nconst isNumberStart = (c1: number, c2: number, c3: number): boolean => {\n if (c1 === PLUS_SIGN || c1 === HYPHEN_MINUS) {\n if (isDigit(c2)) {\n return true;\n }\n\n return c2 === FULL_STOP && isDigit(c3);\n }\n\n if (c1 === FULL_STOP) {\n return isDigit(c2);\n }\n\n return isDigit(c1);\n};\n\nconst stringToNumber = (codePoints: number[]): number => {\n let c = 0;\n let sign = 1;\n if (codePoints[c] === PLUS_SIGN || codePoints[c] === HYPHEN_MINUS) {\n if (codePoints[c] === HYPHEN_MINUS) {\n sign = -1;\n }\n c++;\n }\n\n const integers = [];\n\n while (isDigit(codePoints[c])) {\n integers.push(codePoints[c++]);\n }\n\n const int = integers.length ? parseInt(fromCodePoint(...integers), 10) : 0;\n\n if (codePoints[c] === FULL_STOP) {\n c++;\n }\n\n const fraction = [];\n while (isDigit(codePoints[c])) {\n fraction.push(codePoints[c++]);\n }\n\n const fracd = fraction.length;\n const frac = fracd ? parseInt(fromCodePoint(...fraction), 10) : 0;\n\n if (codePoints[c] === E || codePoints[c] === e) {\n c++;\n }\n\n let expsign = 1;\n\n if (codePoints[c] === PLUS_SIGN || codePoints[c] === HYPHEN_MINUS) {\n if (codePoints[c] === HYPHEN_MINUS) {\n expsign = -1;\n }\n c++;\n }\n\n const exponent = [];\n\n while (isDigit(codePoints[c])) {\n exponent.push(codePoints[c++]);\n }\n\n const exp = exponent.length ? parseInt(fromCodePoint(...exponent), 10) : 0;\n\n return sign * (int + frac * Math.pow(10, -fracd)) * Math.pow(10, expsign * exp);\n};\n\nconst LEFT_PARENTHESIS_TOKEN: Token = {\n type: TokenType.LEFT_PARENTHESIS_TOKEN\n};\nconst RIGHT_PARENTHESIS_TOKEN: Token = {\n type: TokenType.RIGHT_PARENTHESIS_TOKEN\n};\nconst COMMA_TOKEN: Token = {type: TokenType.COMMA_TOKEN};\nconst SUFFIX_MATCH_TOKEN: Token = {type: TokenType.SUFFIX_MATCH_TOKEN};\nconst PREFIX_MATCH_TOKEN: Token = {type: TokenType.PREFIX_MATCH_TOKEN};\nconst COLUMN_TOKEN: Token = {type: TokenType.COLUMN_TOKEN};\nconst DASH_MATCH_TOKEN: Token = {type: TokenType.DASH_MATCH_TOKEN};\nconst INCLUDE_MATCH_TOKEN: Token = {type: TokenType.INCLUDE_MATCH_TOKEN};\nconst LEFT_CURLY_BRACKET_TOKEN: Token = {\n type: TokenType.LEFT_CURLY_BRACKET_TOKEN\n};\nconst RIGHT_CURLY_BRACKET_TOKEN: Token = {\n type: TokenType.RIGHT_CURLY_BRACKET_TOKEN\n};\nconst SUBSTRING_MATCH_TOKEN: Token = {type: TokenType.SUBSTRING_MATCH_TOKEN};\nconst BAD_URL_TOKEN: Token = {type: TokenType.BAD_URL_TOKEN};\nconst BAD_STRING_TOKEN: Token = {type: TokenType.BAD_STRING_TOKEN};\nconst CDO_TOKEN: Token = {type: TokenType.CDO_TOKEN};\nconst CDC_TOKEN: Token = {type: TokenType.CDC_TOKEN};\nconst COLON_TOKEN: Token = {type: TokenType.COLON_TOKEN};\nconst SEMICOLON_TOKEN: Token = {type: TokenType.SEMICOLON_TOKEN};\nconst LEFT_SQUARE_BRACKET_TOKEN: Token = {\n type: TokenType.LEFT_SQUARE_BRACKET_TOKEN\n};\nconst RIGHT_SQUARE_BRACKET_TOKEN: Token = {\n type: TokenType.RIGHT_SQUARE_BRACKET_TOKEN\n};\nconst WHITESPACE_TOKEN: Token = {type: TokenType.WHITESPACE_TOKEN};\nexport const EOF_TOKEN: Token = {type: TokenType.EOF_TOKEN};\n\nexport class Tokenizer {\n private _value: number[];\n\n constructor() {\n this._value = [];\n }\n\n write(chunk: string): void {\n this._value = this._value.concat(toCodePoints(chunk));\n }\n\n read(): CSSToken[] {\n const tokens = [];\n let token = this.consumeToken();\n while (token !== EOF_TOKEN) {\n tokens.push(token);\n token = this.consumeToken();\n }\n return tokens;\n }\n\n private consumeToken(): CSSToken {\n const codePoint = this.consumeCodePoint();\n\n switch (codePoint) {\n case QUOTATION_MARK:\n return this.consumeStringToken(QUOTATION_MARK);\n case NUMBER_SIGN:\n const c1 = this.peekCodePoint(0);\n const c2 = this.peekCodePoint(1);\n const c3 = this.peekCodePoint(2);\n if (isNameCodePoint(c1) || isValidEscape(c2, c3)) {\n const flags = isIdentifierStart(c1, c2, c3) ? FLAG_ID : FLAG_UNRESTRICTED;\n const value = this.consumeName();\n\n return {type: TokenType.HASH_TOKEN, value, flags};\n }\n break;\n case DOLLAR_SIGN:\n if (this.peekCodePoint(0) === EQUALS_SIGN) {\n this.consumeCodePoint();\n return SUFFIX_MATCH_TOKEN;\n }\n break;\n case APOSTROPHE:\n return this.consumeStringToken(APOSTROPHE);\n case LEFT_PARENTHESIS:\n return LEFT_PARENTHESIS_TOKEN;\n case RIGHT_PARENTHESIS:\n return RIGHT_PARENTHESIS_TOKEN;\n case ASTERISK:\n if (this.peekCodePoint(0) === EQUALS_SIGN) {\n this.consumeCodePoint();\n return SUBSTRING_MATCH_TOKEN;\n }\n break;\n case PLUS_SIGN:\n if (isNumberStart(codePoint, this.peekCodePoint(0), this.peekCodePoint(1))) {\n this.reconsumeCodePoint(codePoint);\n return this.consumeNumericToken();\n }\n break;\n case COMMA:\n return COMMA_TOKEN;\n case HYPHEN_MINUS:\n const e1 = codePoint;\n const e2 = this.peekCodePoint(0);\n const e3 = this.peekCodePoint(1);\n\n if (isNumberStart(e1, e2, e3)) {\n this.reconsumeCodePoint(codePoint);\n return this.consumeNumericToken();\n }\n\n if (isIdentifierStart(e1, e2, e3)) {\n this.reconsumeCodePoint(codePoint);\n return this.consumeIdentLikeToken();\n }\n\n if (e2 === HYPHEN_MINUS && e3 === GREATER_THAN_SIGN) {\n this.consumeCodePoint();\n this.consumeCodePoint();\n return CDC_TOKEN;\n }\n break;\n\n case FULL_STOP:\n if (isNumberStart(codePoint, this.peekCodePoint(0), this.peekCodePoint(1))) {\n this.reconsumeCodePoint(codePoint);\n return this.consumeNumericToken();\n }\n break;\n case SOLIDUS:\n if (this.peekCodePoint(0) === ASTERISK) {\n this.consumeCodePoint();\n while (true) {\n let c = this.consumeCodePoint();\n if (c === ASTERISK) {\n c = this.consumeCodePoint();\n if (c === SOLIDUS) {\n return this.consumeToken();\n }\n }\n if (c === EOF) {\n return this.consumeToken();\n }\n }\n }\n break;\n case COLON:\n return COLON_TOKEN;\n case SEMICOLON:\n return SEMICOLON_TOKEN;\n case LESS_THAN_SIGN:\n if (\n this.peekCodePoint(0) === EXCLAMATION_MARK &&\n this.peekCodePoint(1) === HYPHEN_MINUS &&\n this.peekCodePoint(2) === HYPHEN_MINUS\n ) {\n this.consumeCodePoint();\n this.consumeCodePoint();\n return CDO_TOKEN;\n }\n break;\n case COMMERCIAL_AT:\n const a1 = this.peekCodePoint(0);\n const a2 = this.peekCodePoint(1);\n const a3 = this.peekCodePoint(2);\n if (isIdentifierStart(a1, a2, a3)) {\n const value = this.consumeName();\n return {type: TokenType.AT_KEYWORD_TOKEN, value};\n }\n break;\n case LEFT_SQUARE_BRACKET:\n return LEFT_SQUARE_BRACKET_TOKEN;\n case REVERSE_SOLIDUS:\n if (isValidEscape(codePoint, this.peekCodePoint(0))) {\n this.reconsumeCodePoint(codePoint);\n return this.consumeIdentLikeToken();\n }\n break;\n case RIGHT_SQUARE_BRACKET:\n return RIGHT_SQUARE_BRACKET_TOKEN;\n case CIRCUMFLEX_ACCENT:\n if (this.peekCodePoint(0) === EQUALS_SIGN) {\n this.consumeCodePoint();\n return PREFIX_MATCH_TOKEN;\n }\n break;\n case LEFT_CURLY_BRACKET:\n return LEFT_CURLY_BRACKET_TOKEN;\n case RIGHT_CURLY_BRACKET:\n return RIGHT_CURLY_BRACKET_TOKEN;\n case u:\n case U:\n const u1 = this.peekCodePoint(0);\n const u2 = this.peekCodePoint(1);\n if (u1 === PLUS_SIGN && (isHex(u2) || u2 === QUESTION_MARK)) {\n this.consumeCodePoint();\n this.consumeUnicodeRangeToken();\n }\n this.reconsumeCodePoint(codePoint);\n return this.consumeIdentLikeToken();\n case VERTICAL_LINE:\n if (this.peekCodePoint(0) === EQUALS_SIGN) {\n this.consumeCodePoint();\n return DASH_MATCH_TOKEN;\n }\n if (this.peekCodePoint(0) === VERTICAL_LINE) {\n this.consumeCodePoint();\n return COLUMN_TOKEN;\n }\n break;\n case TILDE:\n if (this.peekCodePoint(0) === EQUALS_SIGN) {\n this.consumeCodePoint();\n return INCLUDE_MATCH_TOKEN;\n }\n break;\n case EOF:\n return EOF_TOKEN;\n }\n\n if (isWhiteSpace(codePoint)) {\n this.consumeWhiteSpace();\n return WHITESPACE_TOKEN;\n }\n\n if (isDigit(codePoint)) {\n this.reconsumeCodePoint(codePoint);\n return this.consumeNumericToken();\n }\n\n if (isNameStartCodePoint(codePoint)) {\n this.reconsumeCodePoint(codePoint);\n return this.consumeIdentLikeToken();\n }\n\n return {type: TokenType.DELIM_TOKEN, value: fromCodePoint(codePoint)};\n }\n\n private consumeCodePoint(): number {\n const value = this._value.shift();\n\n return typeof value === 'undefined' ? -1 : value;\n }\n\n private reconsumeCodePoint(codePoint: number) {\n this._value.unshift(codePoint);\n }\n\n private peekCodePoint(delta: number): number {\n if (delta >= this._value.length) {\n return -1;\n }\n\n return this._value[delta];\n }\n\n private consumeUnicodeRangeToken(): UnicodeRangeToken {\n const digits = [];\n let codePoint = this.consumeCodePoint();\n while (isHex(codePoint) && digits.length < 6) {\n digits.push(codePoint);\n codePoint = this.consumeCodePoint();\n }\n let questionMarks = false;\n while (codePoint === QUESTION_MARK && digits.length < 6) {\n digits.push(codePoint);\n codePoint = this.consumeCodePoint();\n questionMarks = true;\n }\n\n if (questionMarks) {\n const start = parseInt(\n fromCodePoint(...digits.map((digit) => (digit === QUESTION_MARK ? ZERO : digit))),\n 16\n );\n const end = parseInt(fromCodePoint(...digits.map((digit) => (digit === QUESTION_MARK ? F : digit))), 16);\n return {type: TokenType.UNICODE_RANGE_TOKEN, start, end};\n }\n\n const start = parseInt(fromCodePoint(...digits), 16);\n if (this.peekCodePoint(0) === HYPHEN_MINUS && isHex(this.peekCodePoint(1))) {\n this.consumeCodePoint();\n codePoint = this.consumeCodePoint();\n const endDigits = [];\n while (isHex(codePoint) && endDigits.length < 6) {\n endDigits.push(codePoint);\n codePoint = this.consumeCodePoint();\n }\n const end = parseInt(fromCodePoint(...endDigits), 16);\n\n return {type: TokenType.UNICODE_RANGE_TOKEN, start, end};\n } else {\n return {type: TokenType.UNICODE_RANGE_TOKEN, start, end: start};\n }\n }\n\n private consumeIdentLikeToken(): StringValueToken | Token {\n const value = this.consumeName();\n if (value.toLowerCase() === 'url' && this.peekCodePoint(0) === LEFT_PARENTHESIS) {\n this.consumeCodePoint();\n return this.consumeUrlToken();\n } else if (this.peekCodePoint(0) === LEFT_PARENTHESIS) {\n this.consumeCodePoint();\n return {type: TokenType.FUNCTION_TOKEN, value};\n }\n\n return {type: TokenType.IDENT_TOKEN, value};\n }\n\n private consumeUrlToken(): StringValueToken | Token {\n const value = [];\n this.consumeWhiteSpace();\n\n if (this.peekCodePoint(0) === EOF) {\n return {type: TokenType.URL_TOKEN, value: ''};\n }\n\n const next = this.peekCodePoint(0);\n if (next === APOSTROPHE || next === QUOTATION_MARK) {\n const stringToken = this.consumeStringToken(this.consumeCodePoint());\n if (stringToken.type === TokenType.STRING_TOKEN) {\n this.consumeWhiteSpace();\n\n if (this.peekCodePoint(0) === EOF || this.peekCodePoint(0) === RIGHT_PARENTHESIS) {\n this.consumeCodePoint();\n return {type: TokenType.URL_TOKEN, value: stringToken.value};\n }\n }\n\n this.consumeBadUrlRemnants();\n return BAD_URL_TOKEN;\n }\n\n while (true) {\n const codePoint = this.consumeCodePoint();\n if (codePoint === EOF || codePoint === RIGHT_PARENTHESIS) {\n return {type: TokenType.URL_TOKEN, value: fromCodePoint(...value)};\n } else if (isWhiteSpace(codePoint)) {\n this.consumeWhiteSpace();\n if (this.peekCodePoint(0) === EOF || this.peekCodePoint(0) === RIGHT_PARENTHESIS) {\n this.consumeCodePoint();\n return {type: TokenType.URL_TOKEN, value: fromCodePoint(...value)};\n }\n this.consumeBadUrlRemnants();\n return BAD_URL_TOKEN;\n } else if (\n codePoint === QUOTATION_MARK ||\n codePoint === APOSTROPHE ||\n codePoint === LEFT_PARENTHESIS ||\n isNonPrintableCodePoint(codePoint)\n ) {\n this.consumeBadUrlRemnants();\n return BAD_URL_TOKEN;\n } else if (codePoint === REVERSE_SOLIDUS) {\n if (isValidEscape(codePoint, this.peekCodePoint(0))) {\n value.push(this.consumeEscapedCodePoint());\n } else {\n this.consumeBadUrlRemnants();\n return BAD_URL_TOKEN;\n }\n } else {\n value.push(codePoint);\n }\n }\n }\n\n private consumeWhiteSpace(): void {\n while (isWhiteSpace(this.peekCodePoint(0))) {\n this.consumeCodePoint();\n }\n }\n\n private consumeBadUrlRemnants(): void {\n while (true) {\n const codePoint = this.consumeCodePoint();\n if (codePoint === RIGHT_PARENTHESIS || codePoint === EOF) {\n return;\n }\n\n if (isValidEscape(codePoint, this.peekCodePoint(0))) {\n this.consumeEscapedCodePoint();\n }\n }\n }\n\n private consumeStringSlice(count: number): string {\n const SLICE_STACK_SIZE = 50000;\n let value = '';\n while (count > 0) {\n const amount = Math.min(SLICE_STACK_SIZE, count);\n value += fromCodePoint(...this._value.splice(0, amount));\n count -= amount;\n }\n this._value.shift();\n\n return value;\n }\n\n private consumeStringToken(endingCodePoint: number): StringValueToken | Token {\n let value = '';\n let i = 0;\n\n do {\n const codePoint = this._value[i];\n if (codePoint === EOF || codePoint === undefined || codePoint === endingCodePoint) {\n value += this.consumeStringSlice(i);\n return {type: TokenType.STRING_TOKEN, value};\n }\n\n if (codePoint === LINE_FEED) {\n this._value.splice(0, i);\n return BAD_STRING_TOKEN;\n }\n\n if (codePoint === REVERSE_SOLIDUS) {\n const next = this._value[i + 1];\n if (next !== EOF && next !== undefined) {\n if (next === LINE_FEED) {\n value += this.consumeStringSlice(i);\n i = -1;\n this._value.shift();\n } else if (isValidEscape(codePoint, next)) {\n value += this.consumeStringSlice(i);\n value += fromCodePoint(this.consumeEscapedCodePoint());\n i = -1;\n }\n }\n }\n\n i++;\n } while (true);\n }\n\n private consumeNumber() {\n const repr = [];\n let type = FLAG_INTEGER;\n let c1 = this.peekCodePoint(0);\n if (c1 === PLUS_SIGN || c1 === HYPHEN_MINUS) {\n repr.push(this.consumeCodePoint());\n }\n\n while (isDigit(this.peekCodePoint(0))) {\n repr.push(this.consumeCodePoint());\n }\n c1 = this.peekCodePoint(0);\n let c2 = this.peekCodePoint(1);\n if (c1 === FULL_STOP && isDigit(c2)) {\n repr.push(this.consumeCodePoint(), this.consumeCodePoint());\n type = FLAG_NUMBER;\n while (isDigit(this.peekCodePoint(0))) {\n repr.push(this.consumeCodePoint());\n }\n }\n\n c1 = this.peekCodePoint(0);\n c2 = this.peekCodePoint(1);\n const c3 = this.peekCodePoint(2);\n if ((c1 === E || c1 === e) && (((c2 === PLUS_SIGN || c2 === HYPHEN_MINUS) && isDigit(c3)) || isDigit(c2))) {\n repr.push(this.consumeCodePoint(), this.consumeCodePoint());\n type = FLAG_NUMBER;\n while (isDigit(this.peekCodePoint(0))) {\n repr.push(this.consumeCodePoint());\n }\n }\n\n return [stringToNumber(repr), type];\n }\n\n private consumeNumericToken(): NumberValueToken | DimensionToken {\n const [number, flags] = this.consumeNumber();\n const c1 = this.peekCodePoint(0);\n const c2 = this.peekCodePoint(1);\n const c3 = this.peekCodePoint(2);\n\n if (isIdentifierStart(c1, c2, c3)) {\n const unit = this.consumeName();\n return {type: TokenType.DIMENSION_TOKEN, number, flags, unit};\n }\n\n if (c1 === PERCENTAGE_SIGN) {\n this.consumeCodePoint();\n return {type: TokenType.PERCENTAGE_TOKEN, number, flags};\n }\n\n return {type: TokenType.NUMBER_TOKEN, number, flags};\n }\n\n private consumeEscapedCodePoint(): number {\n const codePoint = this.consumeCodePoint();\n\n if (isHex(codePoint)) {\n let hex = fromCodePoint(codePoint);\n while (isHex(this.peekCodePoint(0)) && hex.length < 6) {\n hex += fromCodePoint(this.consumeCodePoint());\n }\n\n if (isWhiteSpace(this.peekCodePoint(0))) {\n this.consumeCodePoint();\n }\n\n const hexCodePoint = parseInt(hex, 16);\n\n if (hexCodePoint === 0 || isSurrogateCodePoint(hexCodePoint) || hexCodePoint > 0x10ffff) {\n return REPLACEMENT_CHARACTER;\n }\n\n return hexCodePoint;\n }\n\n if (codePoint === EOF) {\n return REPLACEMENT_CHARACTER;\n }\n\n return codePoint;\n }\n\n private consumeName(): string {\n let result = '';\n while (true) {\n const codePoint = this.consumeCodePoint();\n if (isNameCodePoint(codePoint)) {\n result += fromCodePoint(codePoint);\n } else if (isValidEscape(codePoint, this.peekCodePoint(0))) {\n result += fromCodePoint(this.consumeEscapedCodePoint());\n } else {\n this.reconsumeCodePoint(codePoint);\n return result;\n }\n }\n }\n}\n","import {\n CSSToken,\n DimensionToken,\n EOF_TOKEN,\n NumberValueToken,\n StringValueToken,\n Tokenizer,\n TokenType\n} from './tokenizer';\n\nexport type CSSBlockType =\n | TokenType.LEFT_PARENTHESIS_TOKEN\n | TokenType.LEFT_SQUARE_BRACKET_TOKEN\n | TokenType.LEFT_CURLY_BRACKET_TOKEN;\n\nexport interface CSSBlock {\n type: CSSBlockType;\n values: CSSValue[];\n}\n\nexport interface CSSFunction {\n type: TokenType.FUNCTION;\n name: string;\n values: CSSValue[];\n}\n\nexport type CSSValue = CSSFunction | CSSToken | CSSBlock;\n\nexport class Parser {\n private _tokens: CSSToken[];\n\n constructor(tokens: CSSToken[]) {\n this._tokens = tokens;\n }\n\n static create(value: string): Parser {\n const tokenizer = new Tokenizer();\n tokenizer.write(value);\n return new Parser(tokenizer.read());\n }\n\n static parseValue(value: string): CSSValue {\n return Parser.create(value).parseComponentValue();\n }\n\n static parseValues(value: string): CSSValue[] {\n return Parser.create(value).parseComponentValues();\n }\n\n parseComponentValue(): CSSValue {\n let token = this.consumeToken();\n while (token.type === TokenType.WHITESPACE_TOKEN) {\n token = this.consumeToken();\n }\n\n if (token.type === TokenType.EOF_TOKEN) {\n throw new SyntaxError(`Error parsing CSS component value, unexpected EOF`);\n }\n\n this.reconsumeToken(token);\n const value = this.consumeComponentValue();\n\n do {\n token = this.consumeToken();\n } while (token.type === TokenType.WHITESPACE_TOKEN);\n\n if (token.type === TokenType.EOF_TOKEN) {\n return value;\n }\n\n throw new SyntaxError(`Error parsing CSS component value, multiple values found when expecting only one`);\n }\n\n parseComponentValues(): CSSValue[] {\n const values = [];\n while (true) {\n const value = this.consumeComponentValue();\n if (value.type === TokenType.EOF_TOKEN) {\n return values;\n }\n values.push(value);\n values.push();\n }\n }\n\n private consumeComponentValue(): CSSValue {\n const token = this.consumeToken();\n\n switch (token.type) {\n case TokenType.LEFT_CURLY_BRACKET_TOKEN:\n case TokenType.LEFT_SQUARE_BRACKET_TOKEN:\n case TokenType.LEFT_PARENTHESIS_TOKEN:\n return this.consumeSimpleBlock(token.type);\n case TokenType.FUNCTION_TOKEN:\n return this.consumeFunction(token);\n }\n\n return token;\n }\n\n private consumeSimpleBlock(type: CSSBlockType): CSSBlock {\n const block: CSSBlock = {type, values: []};\n\n let token = this.consumeToken();\n while (true) {\n if (token.type === TokenType.EOF_TOKEN || isEndingTokenFor(token, type)) {\n return block;\n }\n\n this.reconsumeToken(token);\n block.values.push(this.consumeComponentValue());\n token = this.consumeToken();\n }\n }\n\n private consumeFunction(functionToken: StringValueToken): CSSFunction {\n const cssFunction: CSSFunction = {\n name: functionToken.value,\n values: [],\n type: TokenType.FUNCTION\n };\n\n while (true) {\n const token = this.consumeToken();\n if (token.type === TokenType.EOF_TOKEN || token.type === TokenType.RIGHT_PARENTHESIS_TOKEN) {\n return cssFunction;\n }\n\n this.reconsumeToken(token);\n cssFunction.values.push(this.consumeComponentValue());\n }\n }\n\n private consumeToken(): CSSToken {\n const token = this._tokens.shift();\n return typeof token === 'undefined' ? EOF_TOKEN : token;\n }\n\n private reconsumeToken(token: CSSToken): void {\n this._tokens.unshift(token);\n }\n}\n\nexport const isDimensionToken = (token: CSSValue): token is DimensionToken => token.type === TokenType.DIMENSION_TOKEN;\nexport const isNumberToken = (token: CSSValue): token is NumberValueToken => token.type === TokenType.NUMBER_TOKEN;\nexport const isIdentToken = (token: CSSValue): token is StringValueToken => token.type === TokenType.IDENT_TOKEN;\nexport const isStringToken = (token: CSSValue): token is StringValueToken => token.type === TokenType.STRING_TOKEN;\nexport const isIdentWithValue = (token: CSSValue, value: string): boolean =>\n isIdentToken(token) && token.value === value;\n\nexport const nonWhiteSpace = (token: CSSValue): boolean => token.type !== TokenType.WHITESPACE_TOKEN;\nexport const nonFunctionArgSeparator = (token: CSSValue): boolean =>\n token.type !== TokenType.WHITESPACE_TOKEN && token.type !== TokenType.COMMA_TOKEN;\n\nexport const parseFunctionArgs = (tokens: CSSValue[]): CSSValue[][] => {\n const args: CSSValue[][] = [];\n let arg: CSSValue[] = [];\n tokens.forEach((token) => {\n if (token.type === TokenType.COMMA_TOKEN) {\n if (arg.length === 0) {\n throw new Error(`Error parsing function args, zero tokens for arg`);\n }\n args.push(arg);\n arg = [];\n return;\n }\n\n if (token.type !== TokenType.WHITESPACE_TOKEN) {\n arg.push(token);\n }\n });\n if (arg.length) {\n args.push(arg);\n }\n\n return args;\n};\n\nconst isEndingTokenFor = (token: CSSToken, type: CSSBlockType): boolean => {\n if (type === TokenType.LEFT_CURLY_BRACKET_TOKEN && token.type === TokenType.RIGHT_CURLY_BRACKET_TOKEN) {\n return true;\n }\n if (type === TokenType.LEFT_SQUARE_BRACKET_TOKEN && token.type === TokenType.RIGHT_SQUARE_BRACKET_TOKEN) {\n return true;\n }\n\n return type === TokenType.LEFT_PARENTHESIS_TOKEN && token.type === TokenType.RIGHT_PARENTHESIS_TOKEN;\n};\n","import {CSSValue} from '../syntax/parser';\nimport {DimensionToken, NumberValueToken, TokenType} from '../syntax/tokenizer';\n\nexport type Length = DimensionToken | NumberValueToken;\n\nexport const isLength = (token: CSSValue): token is Length =>\n token.type === TokenType.NUMBER_TOKEN || token.type === TokenType.DIMENSION_TOKEN;\n","import {DimensionToken, FLAG_INTEGER, NumberValueToken, TokenType} from '../syntax/tokenizer';\nimport {CSSValue, isDimensionToken} from '../syntax/parser';\nimport {isLength} from './length';\nexport type LengthPercentage = DimensionToken | NumberValueToken;\nexport type LengthPercentageTuple = [LengthPercentage] | [LengthPercentage, LengthPercentage];\n\nexport const isLengthPercentage = (token: CSSValue): token is LengthPercentage =>\n token.type === TokenType.PERCENTAGE_TOKEN || isLength(token);\nexport const parseLengthPercentageTuple = (tokens: LengthPercentage[]): LengthPercentageTuple =>\n tokens.length > 1 ? [tokens[0], tokens[1]] : [tokens[0]];\nexport const ZERO_LENGTH: NumberValueToken = {\n type: TokenType.NUMBER_TOKEN,\n number: 0,\n flags: FLAG_INTEGER\n};\n\nexport const FIFTY_PERCENT: NumberValueToken = {\n type: TokenType.PERCENTAGE_TOKEN,\n number: 50,\n flags: FLAG_INTEGER\n};\n\nexport const HUNDRED_PERCENT: NumberValueToken = {\n type: TokenType.PERCENTAGE_TOKEN,\n number: 100,\n flags: FLAG_INTEGER\n};\n\nexport const getAbsoluteValueForTuple = (\n tuple: LengthPercentageTuple,\n width: number,\n height: number\n): [number, number] => {\n const [x, y] = tuple;\n return [getAbsoluteValue(x, width), getAbsoluteValue(typeof y !== 'undefined' ? y : x, height)];\n};\nexport const getAbsoluteValue = (token: LengthPercentage, parent: number): number => {\n if (token.type === TokenType.PERCENTAGE_TOKEN) {\n return (token.number / 100) * parent;\n }\n\n if (isDimensionToken(token)) {\n switch (token.unit) {\n case 'rem':\n case 'em':\n return 16 * token.number; // TODO use correct font-size\n case 'px':\n default:\n return token.number;\n }\n }\n\n return token.number;\n};\n","import {CSSValue, isIdentToken} from '../syntax/parser';\nimport {TokenType} from '../syntax/tokenizer';\nimport {ITypeDescriptor} from '../ITypeDescriptor';\nimport {HUNDRED_PERCENT, ZERO_LENGTH} from './length-percentage';\nimport {GradientCorner} from './image';\nimport {Context} from '../../core/context';\n\nconst DEG = 'deg';\nconst GRAD = 'grad';\nconst RAD = 'rad';\nconst TURN = 'turn';\n\nexport const angle: ITypeDescriptor = {\n name: 'angle',\n parse: (_context: Context, value: CSSValue): number => {\n if (value.type === TokenType.DIMENSION_TOKEN) {\n switch (value.unit) {\n case DEG:\n return (Math.PI * value.number) / 180;\n case GRAD:\n return (Math.PI / 200) * value.number;\n case RAD:\n return value.number;\n case TURN:\n return Math.PI * 2 * value.number;\n }\n }\n\n throw new Error(`Unsupported angle type`);\n }\n};\n\nexport const isAngle = (value: CSSValue): boolean => {\n if (value.type === TokenType.DIMENSION_TOKEN) {\n if (value.unit === DEG || value.unit === GRAD || value.unit === RAD || value.unit === TURN) {\n return true;\n }\n }\n return false;\n};\n\nexport const parseNamedSide = (tokens: CSSValue[]): number | GradientCorner => {\n const sideOrCorner = tokens\n .filter(isIdentToken)\n .map((ident) => ident.value)\n .join(' ');\n\n switch (sideOrCorner) {\n case 'to bottom right':\n case 'to right bottom':\n case 'left top':\n case 'top left':\n return [ZERO_LENGTH, ZERO_LENGTH];\n case 'to top':\n case 'bottom':\n return deg(0);\n case 'to bottom left':\n case 'to left bottom':\n case 'right top':\n case 'top right':\n return [ZERO_LENGTH, HUNDRED_PERCENT];\n case 'to right':\n case 'left':\n return deg(90);\n case 'to top left':\n case 'to left top':\n case 'right bottom':\n case 'bottom right':\n return [HUNDRED_PERCENT, HUNDRED_PERCENT];\n case 'to bottom':\n case 'top':\n return deg(180);\n case 'to top right':\n case 'to right top':\n case 'left bottom':\n case 'bottom left':\n return [HUNDRED_PERCENT, ZERO_LENGTH];\n case 'to left':\n case 'right':\n return deg(270);\n }\n\n return 0;\n};\n\nexport const deg = (deg: number): number => (Math.PI * deg) / 180;\n","import {CSSValue, nonFunctionArgSeparator, Parser} from '../syntax/parser';\nimport {TokenType} from '../syntax/tokenizer';\nimport {ITypeDescriptor} from '../ITypeDescriptor';\nimport {angle, deg} from './angle';\nimport {getAbsoluteValue, isLengthPercentage} from './length-percentage';\nimport {Context} from '../../core/context';\nexport type Color = number;\n\nexport const color: ITypeDescriptor = {\n name: 'color',\n parse: (context: Context, value: CSSValue): Color => {\n if (value.type === TokenType.FUNCTION) {\n const colorFunction = SUPPORTED_COLOR_FUNCTIONS[value.name];\n if (typeof colorFunction === 'undefined') {\n throw new Error(`Attempting to parse an unsupported color function \"${value.name}\"`);\n }\n return colorFunction(context, value.values);\n }\n\n if (value.type === TokenType.HASH_TOKEN) {\n if (value.value.length === 3) {\n const r = value.value.substring(0, 1);\n const g = value.value.substring(1, 2);\n const b = value.value.substring(2, 3);\n return pack(parseInt(r + r, 16), parseInt(g + g, 16), parseInt(b + b, 16), 1);\n }\n\n if (value.value.length === 4) {\n const r = value.value.substring(0, 1);\n const g = value.value.substring(1, 2);\n const b = value.value.substring(2, 3);\n const a = value.value.substring(3, 4);\n return pack(parseInt(r + r, 16), parseInt(g + g, 16), parseInt(b + b, 16), parseInt(a + a, 16) / 255);\n }\n\n if (value.value.length === 6) {\n const r = value.value.substring(0, 2);\n const g = value.value.substring(2, 4);\n const b = value.value.substring(4, 6);\n return pack(parseInt(r, 16), parseInt(g, 16), parseInt(b, 16), 1);\n }\n\n if (value.value.length === 8) {\n const r = value.value.substring(0, 2);\n const g = value.value.substring(2, 4);\n const b = value.value.substring(4, 6);\n const a = value.value.substring(6, 8);\n return pack(parseInt(r, 16), parseInt(g, 16), parseInt(b, 16), parseInt(a, 16) / 255);\n }\n }\n\n if (value.type === TokenType.IDENT_TOKEN) {\n const namedColor = COLORS[value.value.toUpperCase()];\n if (typeof namedColor !== 'undefined') {\n return namedColor;\n }\n }\n\n return COLORS.TRANSPARENT;\n }\n};\n\nexport const isTransparent = (color: Color): boolean => (0xff & color) === 0;\n\nexport const asString = (color: Color): string => {\n const alpha = 0xff & color;\n const blue = 0xff & (color >> 8);\n const green = 0xff & (color >> 16);\n const red = 0xff & (color >> 24);\n return alpha < 255 ? `rgba(${red},${green},${blue},${alpha / 255})` : `rgb(${red},${green},${blue})`;\n};\n\nexport const pack = (r: number, g: number, b: number, a: number): Color =>\n ((r << 24) | (g << 16) | (b << 8) | (Math.round(a * 255) << 0)) >>> 0;\n\nconst getTokenColorValue = (token: CSSValue, i: number): number => {\n if (token.type === TokenType.NUMBER_TOKEN) {\n return token.number;\n }\n\n if (token.type === TokenType.PERCENTAGE_TOKEN) {\n const max = i === 3 ? 1 : 255;\n return i === 3 ? (token.number / 100) * max : Math.round((token.number / 100) * max);\n }\n\n return 0;\n};\n\nconst rgb = (_context: Context, args: CSSValue[]): number => {\n const tokens = args.filter(nonFunctionArgSeparator);\n\n if (tokens.length === 3) {\n const [r, g, b] = tokens.map(getTokenColorValue);\n return pack(r, g, b, 1);\n }\n\n if (tokens.length === 4) {\n const [r, g, b, a] = tokens.map(getTokenColorValue);\n return pack(r, g, b, a);\n }\n\n return 0;\n};\n\nfunction hue2rgb(t1: number, t2: number, hue: number): number {\n if (hue < 0) {\n hue += 1;\n }\n if (hue >= 1) {\n hue -= 1;\n }\n\n if (hue < 1 / 6) {\n return (t2 - t1) * hue * 6 + t1;\n } else if (hue < 1 / 2) {\n return t2;\n } else if (hue < 2 / 3) {\n return (t2 - t1) * 6 * (2 / 3 - hue) + t1;\n } else {\n return t1;\n }\n}\n\nconst hsl = (context: Context, args: CSSValue[]): number => {\n const tokens = args.filter(nonFunctionArgSeparator);\n const [hue, saturation, lightness, alpha] = tokens;\n\n const h = (hue.type === TokenType.NUMBER_TOKEN ? deg(hue.number) : angle.parse(context, hue)) / (Math.PI * 2);\n const s = isLengthPercentage(saturation) ? saturation.number / 100 : 0;\n const l = isLengthPercentage(lightness) ? lightness.number / 100 : 0;\n const a = typeof alpha !== 'undefined' && isLengthPercentage(alpha) ? getAbsoluteValue(alpha, 1) : 1;\n\n if (s === 0) {\n return pack(l * 255, l * 255, l * 255, 1);\n }\n\n const t2 = l <= 0.5 ? l * (s + 1) : l + s - l * s;\n\n const t1 = l * 2 - t2;\n const r = hue2rgb(t1, t2, h + 1 / 3);\n const g = hue2rgb(t1, t2, h);\n const b = hue2rgb(t1, t2, h - 1 / 3);\n return pack(r * 255, g * 255, b * 255, a);\n};\n\nconst SUPPORTED_COLOR_FUNCTIONS: {\n [key: string]: (context: Context, args: CSSValue[]) => number;\n} = {\n hsl: hsl,\n hsla: hsl,\n rgb: rgb,\n rgba: rgb\n};\n\nexport const parseColor = (context: Context, value: string): Color =>\n color.parse(context, Parser.create(value).parseComponentValue());\n\nexport const COLORS: {[key: string]: Color} = {\n ALICEBLUE: 0xf0f8ffff,\n ANTIQUEWHITE: 0xfaebd7ff,\n AQUA: 0x00ffffff,\n AQUAMARINE: 0x7fffd4ff,\n AZURE: 0xf0ffffff,\n BEIGE: 0xf5f5dcff,\n BISQUE: 0xffe4c4ff,\n BLACK: 0x000000ff,\n BLANCHEDALMOND: 0xffebcdff,\n BLUE: 0x0000ffff,\n BLUEVIOLET: 0x8a2be2ff,\n BROWN: 0xa52a2aff,\n BURLYWOOD: 0xdeb887ff,\n CADETBLUE: 0x5f9ea0ff,\n CHARTREUSE: 0x7fff00ff,\n CHOCOLATE: 0xd2691eff,\n CORAL: 0xff7f50ff,\n CORNFLOWERBLUE: 0x6495edff,\n CORNSILK: 0xfff8dcff,\n CRIMSON: 0xdc143cff,\n CYAN: 0x00ffffff,\n DARKBLUE: 0x00008bff,\n DARKCYAN: 0x008b8bff,\n DARKGOLDENROD: 0xb886bbff,\n DARKGRAY: 0xa9a9a9ff,\n DARKGREEN: 0x006400ff,\n DARKGREY: 0xa9a9a9ff,\n DARKKHAKI: 0xbdb76bff,\n DARKMAGENTA: 0x8b008bff,\n DARKOLIVEGREEN: 0x556b2fff,\n DARKORANGE: 0xff8c00ff,\n DARKORCHID: 0x9932ccff,\n DARKRED: 0x8b0000ff,\n DARKSALMON: 0xe9967aff,\n DARKSEAGREEN: 0x8fbc8fff,\n DARKSLATEBLUE: 0x483d8bff,\n DARKSLATEGRAY: 0x2f4f4fff,\n DARKSLATEGREY: 0x2f4f4fff,\n DARKTURQUOISE: 0x00ced1ff,\n DARKVIOLET: 0x9400d3ff,\n DEEPPINK: 0xff1493ff,\n DEEPSKYBLUE: 0x00bfffff,\n DIMGRAY: 0x696969ff,\n DIMGREY: 0x696969ff,\n DODGERBLUE: 0x1e90ffff,\n FIREBRICK: 0xb22222ff,\n FLORALWHITE: 0xfffaf0ff,\n FORESTGREEN: 0x228b22ff,\n FUCHSIA: 0xff00ffff,\n GAINSBORO: 0xdcdcdcff,\n GHOSTWHITE: 0xf8f8ffff,\n GOLD: 0xffd700ff,\n GOLDENROD: 0xdaa520ff,\n GRAY: 0x808080ff,\n GREEN: 0x008000ff,\n GREENYELLOW: 0xadff2fff,\n GREY: 0x808080ff,\n HONEYDEW: 0xf0fff0ff,\n HOTPINK: 0xff69b4ff,\n INDIANRED: 0xcd5c5cff,\n INDIGO: 0x4b0082ff,\n IVORY: 0xfffff0ff,\n KHAKI: 0xf0e68cff,\n LAVENDER: 0xe6e6faff,\n LAVENDERBLUSH: 0xfff0f5ff,\n LAWNGREEN: 0x7cfc00ff,\n LEMONCHIFFON: 0xfffacdff,\n LIGHTBLUE: 0xadd8e6ff,\n LIGHTCORAL: 0xf08080ff,\n LIGHTCYAN: 0xe0ffffff,\n LIGHTGOLDENRODYELLOW: 0xfafad2ff,\n LIGHTGRAY: 0xd3d3d3ff,\n LIGHTGREEN: 0x90ee90ff,\n LIGHTGREY: 0xd3d3d3ff,\n LIGHTPINK: 0xffb6c1ff,\n LIGHTSALMON: 0xffa07aff,\n LIGHTSEAGREEN: 0x20b2aaff,\n LIGHTSKYBLUE: 0x87cefaff,\n LIGHTSLATEGRAY: 0x778899ff,\n LIGHTSLATEGREY: 0x778899ff,\n LIGHTSTEELBLUE: 0xb0c4deff,\n LIGHTYELLOW: 0xffffe0ff,\n LIME: 0x00ff00ff,\n LIMEGREEN: 0x32cd32ff,\n LINEN: 0xfaf0e6ff,\n MAGENTA: 0xff00ffff,\n MAROON: 0x800000ff,\n MEDIUMAQUAMARINE: 0x66cdaaff,\n MEDIUMBLUE: 0x0000cdff,\n MEDIUMORCHID: 0xba55d3ff,\n MEDIUMPURPLE: 0x9370dbff,\n MEDIUMSEAGREEN: 0x3cb371ff,\n MEDIUMSLATEBLUE: 0x7b68eeff,\n MEDIUMSPRINGGREEN: 0x00fa9aff,\n MEDIUMTURQUOISE: 0x48d1ccff,\n MEDIUMVIOLETRED: 0xc71585ff,\n MIDNIGHTBLUE: 0x191970ff,\n MINTCREAM: 0xf5fffaff,\n MISTYROSE: 0xffe4e1ff,\n MOCCASIN: 0xffe4b5ff,\n NAVAJOWHITE: 0xffdeadff,\n NAVY: 0x000080ff,\n OLDLACE: 0xfdf5e6ff,\n OLIVE: 0x808000ff,\n OLIVEDRAB: 0x6b8e23ff,\n ORANGE: 0xffa500ff,\n ORANGERED: 0xff4500ff,\n ORCHID: 0xda70d6ff,\n PALEGOLDENROD: 0xeee8aaff,\n PALEGREEN: 0x98fb98ff,\n PALETURQUOISE: 0xafeeeeff,\n PALEVIOLETRED: 0xdb7093ff,\n PAPAYAWHIP: 0xffefd5ff,\n PEACHPUFF: 0xffdab9ff,\n PERU: 0xcd853fff,\n PINK: 0xffc0cbff,\n PLUM: 0xdda0ddff,\n POWDERBLUE: 0xb0e0e6ff,\n PURPLE: 0x800080ff,\n REBECCAPURPLE: 0x663399ff,\n RED: 0xff0000ff,\n ROSYBROWN: 0xbc8f8fff,\n ROYALBLUE: 0x4169e1ff,\n SADDLEBROWN: 0x8b4513ff,\n SALMON: 0xfa8072ff,\n SANDYBROWN: 0xf4a460ff,\n SEAGREEN: 0x2e8b57ff,\n SEASHELL: 0xfff5eeff,\n SIENNA: 0xa0522dff,\n SILVER: 0xc0c0c0ff,\n SKYBLUE: 0x87ceebff,\n SLATEBLUE: 0x6a5acdff,\n SLATEGRAY: 0x708090ff,\n SLATEGREY: 0x708090ff,\n SNOW: 0xfffafaff,\n SPRINGGREEN: 0x00ff7fff,\n STEELBLUE: 0x4682b4ff,\n TAN: 0xd2b48cff,\n TEAL: 0x008080ff,\n THISTLE: 0xd8bfd8ff,\n TOMATO: 0xff6347ff,\n TRANSPARENT: 0x00000000,\n TURQUOISE: 0x40e0d0ff,\n VIOLET: 0xee82eeff,\n WHEAT: 0xf5deb3ff,\n WHITE: 0xffffffff,\n WHITESMOKE: 0xf5f5f5ff,\n YELLOW: 0xffff00ff,\n YELLOWGREEN: 0x9acd32ff\n};\n","import {IPropertyListDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue, isIdentToken} from '../syntax/parser';\nimport {Context} from '../../core/context';\nexport const enum BACKGROUND_CLIP {\n BORDER_BOX = 0,\n PADDING_BOX = 1,\n CONTENT_BOX = 2\n}\n\nexport type BackgroundClip = BACKGROUND_CLIP[];\n\nexport const backgroundClip: IPropertyListDescriptor = {\n name: 'background-clip',\n initialValue: 'border-box',\n prefix: false,\n type: PropertyDescriptorParsingType.LIST,\n parse: (_context: Context, tokens: CSSValue[]): BackgroundClip => {\n return tokens.map((token) => {\n if (isIdentToken(token)) {\n switch (token.value) {\n case 'padding-box':\n return BACKGROUND_CLIP.PADDING_BOX;\n case 'content-box':\n return BACKGROUND_CLIP.CONTENT_BOX;\n }\n }\n return BACKGROUND_CLIP.BORDER_BOX;\n });\n }\n};\n","import {IPropertyTypeValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\n\nexport const backgroundColor: IPropertyTypeValueDescriptor = {\n name: `background-color`,\n initialValue: 'transparent',\n prefix: false,\n type: PropertyDescriptorParsingType.TYPE_VALUE,\n format: 'color'\n};\n","import {CSSValue} from '../../syntax/parser';\nimport {\n CSSRadialExtent,\n CSSRadialGradientImage,\n CSSRadialShape,\n GradientColorStop,\n GradientCorner,\n UnprocessedGradientColorStop\n} from '../image';\nimport {color as colorType} from '../color';\nimport {getAbsoluteValue, HUNDRED_PERCENT, isLengthPercentage, ZERO_LENGTH} from '../length-percentage';\nimport {Context} from '../../../core/context';\n\nexport const parseColorStop = (context: Context, args: CSSValue[]): UnprocessedGradientColorStop => {\n const color = colorType.parse(context, args[0]);\n const stop = args[1];\n return stop && isLengthPercentage(stop) ? {color, stop} : {color, stop: null};\n};\n\nexport const processColorStops = (stops: UnprocessedGradientColorStop[], lineLength: number): GradientColorStop[] => {\n const first = stops[0];\n const last = stops[stops.length - 1];\n if (first.stop === null) {\n first.stop = ZERO_LENGTH;\n }\n\n if (last.stop === null) {\n last.stop = HUNDRED_PERCENT;\n }\n\n const processStops: (number | null)[] = [];\n let previous = 0;\n for (let i = 0; i < stops.length; i++) {\n const stop = stops[i].stop;\n if (stop !== null) {\n const absoluteValue = getAbsoluteValue(stop, lineLength);\n if (absoluteValue > previous) {\n processStops.push(absoluteValue);\n } else {\n processStops.push(previous);\n }\n previous = absoluteValue;\n } else {\n processStops.push(null);\n }\n }\n\n let gapBegin = null;\n for (let i = 0; i < processStops.length; i++) {\n const stop = processStops[i];\n if (stop === null) {\n if (gapBegin === null) {\n gapBegin = i;\n }\n } else if (gapBegin !== null) {\n const gapLength = i - gapBegin;\n const beforeGap = processStops[gapBegin - 1] as number;\n const gapValue = (stop - beforeGap) / (gapLength + 1);\n for (let g = 1; g <= gapLength; g++) {\n processStops[gapBegin + g - 1] = gapValue * g;\n }\n gapBegin = null;\n }\n }\n\n return stops.map(({color}, i) => {\n return {color, stop: Math.max(Math.min(1, (processStops[i] as number) / lineLength), 0)};\n });\n};\n\nconst getAngleFromCorner = (corner: GradientCorner, width: number, height: number): number => {\n const centerX = width / 2;\n const centerY = height / 2;\n const x = getAbsoluteValue(corner[0], width) - centerX;\n const y = centerY - getAbsoluteValue(corner[1], height);\n\n return (Math.atan2(y, x) + Math.PI * 2) % (Math.PI * 2);\n};\n\nexport const calculateGradientDirection = (\n angle: number | GradientCorner,\n width: number,\n height: number\n): [number, number, number, number, number] => {\n const radian = typeof angle === 'number' ? angle : getAngleFromCorner(angle, width, height);\n\n const lineLength = Math.abs(width * Math.sin(radian)) + Math.abs(height * Math.cos(radian));\n\n const halfWidth = width / 2;\n const halfHeight = height / 2;\n const halfLineLength = lineLength / 2;\n\n const yDiff = Math.sin(radian - Math.PI / 2) * halfLineLength;\n const xDiff = Math.cos(radian - Math.PI / 2) * halfLineLength;\n\n return [lineLength, halfWidth - xDiff, halfWidth + xDiff, halfHeight - yDiff, halfHeight + yDiff];\n};\n\nconst distance = (a: number, b: number): number => Math.sqrt(a * a + b * b);\n\nconst findCorner = (width: number, height: number, x: number, y: number, closest: boolean): [number, number] => {\n const corners = [\n [0, 0],\n [0, height],\n [width, 0],\n [width, height]\n ];\n\n return corners.reduce(\n (stat, corner) => {\n const [cx, cy] = corner;\n const d = distance(x - cx, y - cy);\n if (closest ? d < stat.optimumDistance : d > stat.optimumDistance) {\n return {\n optimumCorner: corner,\n optimumDistance: d\n };\n }\n\n return stat;\n },\n {\n optimumDistance: closest ? Infinity : -Infinity,\n optimumCorner: null\n }\n ).optimumCorner as [number, number];\n};\n\nexport const calculateRadius = (\n gradient: CSSRadialGradientImage,\n x: number,\n y: number,\n width: number,\n height: number\n): [number, number] => {\n let rx = 0;\n let ry = 0;\n\n switch (gradient.size) {\n case CSSRadialExtent.CLOSEST_SIDE:\n // The ending shape is sized so that that it exactly meets the side of the gradient box closest to the gradient’s center.\n // If the shape is an ellipse, it exactly meets the closest side in each dimension.\n if (gradient.shape === CSSRadialShape.CIRCLE) {\n rx = ry = Math.min(Math.abs(x), Math.abs(x - width), Math.abs(y), Math.abs(y - height));\n } else if (gradient.shape === CSSRadialShape.ELLIPSE) {\n rx = Math.min(Math.abs(x), Math.abs(x - width));\n ry = Math.min(Math.abs(y), Math.abs(y - height));\n }\n break;\n\n case CSSRadialExtent.CLOSEST_CORNER:\n // The ending shape is sized so that that it passes through the corner of the gradient box closest to the gradient’s center.\n // If the shape is an ellipse, the ending shape is given the same aspect-ratio it would have if closest-side were specified.\n if (gradient.shape === CSSRadialShape.CIRCLE) {\n rx = ry = Math.min(\n distance(x, y),\n distance(x, y - height),\n distance(x - width, y),\n distance(x - width, y - height)\n );\n } else if (gradient.shape === CSSRadialShape.ELLIPSE) {\n // Compute the ratio ry/rx (which is to be the same as for \"closest-side\")\n const c = Math.min(Math.abs(y), Math.abs(y - height)) / Math.min(Math.abs(x), Math.abs(x - width));\n const [cx, cy] = findCorner(width, height, x, y, true);\n rx = distance(cx - x, (cy - y) / c);\n ry = c * rx;\n }\n break;\n\n case CSSRadialExtent.FARTHEST_SIDE:\n // Same as closest-side, except the ending shape is sized based on the farthest side(s)\n if (gradient.shape === CSSRadialShape.CIRCLE) {\n rx = ry = Math.max(Math.abs(x), Math.abs(x - width), Math.abs(y), Math.abs(y - height));\n } else if (gradient.shape === CSSRadialShape.ELLIPSE) {\n rx = Math.max(Math.abs(x), Math.abs(x - width));\n ry = Math.max(Math.abs(y), Math.abs(y - height));\n }\n break;\n\n case CSSRadialExtent.FARTHEST_CORNER:\n // Same as closest-corner, except the ending shape is sized based on the farthest corner.\n // If the shape is an ellipse, the ending shape is given the same aspect ratio it would have if farthest-side were specified.\n if (gradient.shape === CSSRadialShape.CIRCLE) {\n rx = ry = Math.max(\n distance(x, y),\n distance(x, y - height),\n distance(x - width, y),\n distance(x - width, y - height)\n );\n } else if (gradient.shape === CSSRadialShape.ELLIPSE) {\n // Compute the ratio ry/rx (which is to be the same as for \"farthest-side\")\n const c = Math.max(Math.abs(y), Math.abs(y - height)) / Math.max(Math.abs(x), Math.abs(x - width));\n const [cx, cy] = findCorner(width, height, x, y, false);\n rx = distance(cx - x, (cy - y) / c);\n ry = c * rx;\n }\n break;\n }\n\n if (Array.isArray(gradient.size)) {\n rx = getAbsoluteValue(gradient.size[0], width);\n ry = gradient.size.length === 2 ? getAbsoluteValue(gradient.size[1], height) : rx;\n }\n\n return [rx, ry];\n};\n","import {CSSValue, parseFunctionArgs} from '../../syntax/parser';\nimport {TokenType} from '../../syntax/tokenizer';\nimport {isAngle, angle as angleType, parseNamedSide, deg} from '../angle';\nimport {CSSImageType, CSSLinearGradientImage, GradientCorner, UnprocessedGradientColorStop} from '../image';\nimport {parseColorStop} from './gradient';\nimport {Context} from '../../../core/context';\n\nexport const linearGradient = (context: Context, tokens: CSSValue[]): CSSLinearGradientImage => {\n let angle: number | GradientCorner = deg(180);\n const stops: UnprocessedGradientColorStop[] = [];\n\n parseFunctionArgs(tokens).forEach((arg, i) => {\n if (i === 0) {\n const firstToken = arg[0];\n if (firstToken.type === TokenType.IDENT_TOKEN && firstToken.value === 'to') {\n angle = parseNamedSide(arg);\n return;\n } else if (isAngle(firstToken)) {\n angle = angleType.parse(context, firstToken);\n return;\n }\n }\n const colorStop = parseColorStop(context, arg);\n stops.push(colorStop);\n });\n\n return {angle, stops, type: CSSImageType.LINEAR_GRADIENT};\n};\n","import {CSSValue, parseFunctionArgs} from '../../syntax/parser';\nimport {CSSImageType, CSSLinearGradientImage, GradientCorner, UnprocessedGradientColorStop} from '../image';\nimport {TokenType} from '../../syntax/tokenizer';\nimport {isAngle, angle as angleType, parseNamedSide, deg} from '../angle';\nimport {parseColorStop} from './gradient';\nimport {Context} from '../../../core/context';\n\nexport const prefixLinearGradient = (context: Context, tokens: CSSValue[]): CSSLinearGradientImage => {\n let angle: number | GradientCorner = deg(180);\n const stops: UnprocessedGradientColorStop[] = [];\n\n parseFunctionArgs(tokens).forEach((arg, i) => {\n if (i === 0) {\n const firstToken = arg[0];\n if (\n firstToken.type === TokenType.IDENT_TOKEN &&\n ['top', 'left', 'right', 'bottom'].indexOf(firstToken.value) !== -1\n ) {\n angle = parseNamedSide(arg);\n return;\n } else if (isAngle(firstToken)) {\n angle = (angleType.parse(context, firstToken) + deg(270)) % deg(360);\n return;\n }\n }\n const colorStop = parseColorStop(context, arg);\n stops.push(colorStop);\n });\n\n return {\n angle,\n stops,\n type: CSSImageType.LINEAR_GRADIENT\n };\n};\n","import {CSSValue, isIdentToken, isNumberToken, nonFunctionArgSeparator, parseFunctionArgs} from '../../syntax/parser';\nimport {\n CSSImageType,\n CSSLinearGradientImage,\n CSSRadialExtent,\n CSSRadialGradientImage,\n CSSRadialShape,\n CSSRadialSize,\n UnprocessedGradientColorStop\n} from '../image';\nimport {deg} from '../angle';\nimport {TokenType} from '../../syntax/tokenizer';\nimport {color as colorType} from '../color';\nimport {HUNDRED_PERCENT, LengthPercentage, ZERO_LENGTH} from '../length-percentage';\nimport {Context} from '../../../core/context';\n\nexport const webkitGradient = (\n context: Context,\n tokens: CSSValue[]\n): CSSLinearGradientImage | CSSRadialGradientImage => {\n const angle = deg(180);\n const stops: UnprocessedGradientColorStop[] = [];\n let type = CSSImageType.LINEAR_GRADIENT;\n const shape: CSSRadialShape = CSSRadialShape.CIRCLE;\n const size: CSSRadialSize = CSSRadialExtent.FARTHEST_CORNER;\n const position: LengthPercentage[] = [];\n parseFunctionArgs(tokens).forEach((arg, i) => {\n const firstToken = arg[0];\n if (i === 0) {\n if (isIdentToken(firstToken) && firstToken.value === 'linear') {\n type = CSSImageType.LINEAR_GRADIENT;\n return;\n } else if (isIdentToken(firstToken) && firstToken.value === 'radial') {\n type = CSSImageType.RADIAL_GRADIENT;\n return;\n }\n }\n\n if (firstToken.type === TokenType.FUNCTION) {\n if (firstToken.name === 'from') {\n const color = colorType.parse(context, firstToken.values[0]);\n stops.push({stop: ZERO_LENGTH, color});\n } else if (firstToken.name === 'to') {\n const color = colorType.parse(context, firstToken.values[0]);\n stops.push({stop: HUNDRED_PERCENT, color});\n } else if (firstToken.name === 'color-stop') {\n const values = firstToken.values.filter(nonFunctionArgSeparator);\n if (values.length === 2) {\n const color = colorType.parse(context, values[1]);\n const stop = values[0];\n if (isNumberToken(stop)) {\n stops.push({\n stop: {type: TokenType.PERCENTAGE_TOKEN, number: stop.number * 100, flags: stop.flags},\n color\n });\n }\n }\n }\n }\n });\n\n return type === CSSImageType.LINEAR_GRADIENT\n ? {\n angle: (angle + deg(180)) % deg(360),\n stops,\n type\n }\n : {size, shape, stops, position, type};\n};\n","import {CSSValue, isIdentToken, parseFunctionArgs} from '../../syntax/parser';\nimport {\n CSSImageType,\n CSSRadialExtent,\n CSSRadialGradientImage,\n CSSRadialShape,\n CSSRadialSize,\n UnprocessedGradientColorStop\n} from '../image';\nimport {parseColorStop} from './gradient';\nimport {FIFTY_PERCENT, HUNDRED_PERCENT, isLengthPercentage, LengthPercentage, ZERO_LENGTH} from '../length-percentage';\nimport {isLength} from '../length';\nimport {Context} from '../../../core/context';\nexport const CLOSEST_SIDE = 'closest-side';\nexport const FARTHEST_SIDE = 'farthest-side';\nexport const CLOSEST_CORNER = 'closest-corner';\nexport const FARTHEST_CORNER = 'farthest-corner';\nexport const CIRCLE = 'circle';\nexport const ELLIPSE = 'ellipse';\nexport const COVER = 'cover';\nexport const CONTAIN = 'contain';\n\nexport const radialGradient = (context: Context, tokens: CSSValue[]): CSSRadialGradientImage => {\n let shape: CSSRadialShape = CSSRadialShape.CIRCLE;\n let size: CSSRadialSize = CSSRadialExtent.FARTHEST_CORNER;\n const stops: UnprocessedGradientColorStop[] = [];\n const position: LengthPercentage[] = [];\n parseFunctionArgs(tokens).forEach((arg, i) => {\n let isColorStop = true;\n if (i === 0) {\n let isAtPosition = false;\n isColorStop = arg.reduce((acc, token) => {\n if (isAtPosition) {\n if (isIdentToken(token)) {\n switch (token.value) {\n case 'center':\n position.push(FIFTY_PERCENT);\n return acc;\n case 'top':\n case 'left':\n position.push(ZERO_LENGTH);\n return acc;\n case 'right':\n case 'bottom':\n position.push(HUNDRED_PERCENT);\n return acc;\n }\n } else if (isLengthPercentage(token) || isLength(token)) {\n position.push(token);\n }\n } else if (isIdentToken(token)) {\n switch (token.value) {\n case CIRCLE:\n shape = CSSRadialShape.CIRCLE;\n return false;\n case ELLIPSE:\n shape = CSSRadialShape.ELLIPSE;\n return false;\n case 'at':\n isAtPosition = true;\n return false;\n case CLOSEST_SIDE:\n size = CSSRadialExtent.CLOSEST_SIDE;\n return false;\n case COVER:\n case FARTHEST_SIDE:\n size = CSSRadialExtent.FARTHEST_SIDE;\n return false;\n case CONTAIN:\n case CLOSEST_CORNER:\n size = CSSRadialExtent.CLOSEST_CORNER;\n return false;\n case FARTHEST_CORNER:\n size = CSSRadialExtent.FARTHEST_CORNER;\n return false;\n }\n } else if (isLength(token) || isLengthPercentage(token)) {\n if (!Array.isArray(size)) {\n size = [];\n }\n size.push(token);\n return false;\n }\n return acc;\n }, isColorStop);\n }\n\n if (isColorStop) {\n const colorStop = parseColorStop(context, arg);\n stops.push(colorStop);\n }\n });\n\n return {size, shape, stops, position, type: CSSImageType.RADIAL_GRADIENT};\n};\n","import {CSSValue, isIdentToken, parseFunctionArgs} from '../../syntax/parser';\nimport {\n CSSImageType,\n CSSRadialExtent,\n CSSRadialGradientImage,\n CSSRadialShape,\n CSSRadialSize,\n UnprocessedGradientColorStop\n} from '../image';\nimport {parseColorStop} from './gradient';\nimport {FIFTY_PERCENT, HUNDRED_PERCENT, isLengthPercentage, LengthPercentage, ZERO_LENGTH} from '../length-percentage';\nimport {isLength} from '../length';\nimport {\n CIRCLE,\n CLOSEST_CORNER,\n CLOSEST_SIDE,\n CONTAIN,\n COVER,\n ELLIPSE,\n FARTHEST_CORNER,\n FARTHEST_SIDE\n} from './radial-gradient';\nimport {Context} from '../../../core/context';\n\nexport const prefixRadialGradient = (context: Context, tokens: CSSValue[]): CSSRadialGradientImage => {\n let shape: CSSRadialShape = CSSRadialShape.CIRCLE;\n let size: CSSRadialSize = CSSRadialExtent.FARTHEST_CORNER;\n const stops: UnprocessedGradientColorStop[] = [];\n const position: LengthPercentage[] = [];\n\n parseFunctionArgs(tokens).forEach((arg, i) => {\n let isColorStop = true;\n if (i === 0) {\n isColorStop = arg.reduce((acc, token) => {\n if (isIdentToken(token)) {\n switch (token.value) {\n case 'center':\n position.push(FIFTY_PERCENT);\n return false;\n case 'top':\n case 'left':\n position.push(ZERO_LENGTH);\n return false;\n case 'right':\n case 'bottom':\n position.push(HUNDRED_PERCENT);\n return false;\n }\n } else if (isLengthPercentage(token) || isLength(token)) {\n position.push(token);\n return false;\n }\n\n return acc;\n }, isColorStop);\n } else if (i === 1) {\n isColorStop = arg.reduce((acc, token) => {\n if (isIdentToken(token)) {\n switch (token.value) {\n case CIRCLE:\n shape = CSSRadialShape.CIRCLE;\n return false;\n case ELLIPSE:\n shape = CSSRadialShape.ELLIPSE;\n return false;\n case CONTAIN:\n case CLOSEST_SIDE:\n size = CSSRadialExtent.CLOSEST_SIDE;\n return false;\n case FARTHEST_SIDE:\n size = CSSRadialExtent.FARTHEST_SIDE;\n return false;\n case CLOSEST_CORNER:\n size = CSSRadialExtent.CLOSEST_CORNER;\n return false;\n case COVER:\n case FARTHEST_CORNER:\n size = CSSRadialExtent.FARTHEST_CORNER;\n return false;\n }\n } else if (isLength(token) || isLengthPercentage(token)) {\n if (!Array.isArray(size)) {\n size = [];\n }\n size.push(token);\n return false;\n }\n\n return acc;\n }, isColorStop);\n }\n\n if (isColorStop) {\n const colorStop = parseColorStop(context, arg);\n stops.push(colorStop);\n }\n });\n\n return {size, shape, stops, position, type: CSSImageType.RADIAL_GRADIENT};\n};\n","import {CSSValue} from '../syntax/parser';\nimport {TokenType} from '../syntax/tokenizer';\nimport {Color} from './color';\nimport {linearGradient} from './functions/linear-gradient';\nimport {prefixLinearGradient} from './functions/-prefix-linear-gradient';\nimport {ITypeDescriptor} from '../ITypeDescriptor';\nimport {LengthPercentage} from './length-percentage';\nimport {webkitGradient} from './functions/-webkit-gradient';\nimport {radialGradient} from './functions/radial-gradient';\nimport {prefixRadialGradient} from './functions/-prefix-radial-gradient';\nimport {Context} from '../../core/context';\n\nexport const enum CSSImageType {\n URL,\n LINEAR_GRADIENT,\n RADIAL_GRADIENT\n}\n\nexport const isLinearGradient = (background: ICSSImage): background is CSSLinearGradientImage => {\n return background.type === CSSImageType.LINEAR_GRADIENT;\n};\n\nexport const isRadialGradient = (background: ICSSImage): background is CSSRadialGradientImage => {\n return background.type === CSSImageType.RADIAL_GRADIENT;\n};\n\nexport interface UnprocessedGradientColorStop {\n color: Color;\n stop: LengthPercentage | null;\n}\n\nexport interface GradientColorStop {\n color: Color;\n stop: number;\n}\n\nexport interface ICSSImage {\n type: CSSImageType;\n}\n\nexport interface CSSURLImage extends ICSSImage {\n url: string;\n type: CSSImageType.URL;\n}\n\n// interface ICSSGeneratedImage extends ICSSImage {}\n\nexport type GradientCorner = [LengthPercentage, LengthPercentage];\n\ninterface ICSSGradientImage extends ICSSImage {\n stops: UnprocessedGradientColorStop[];\n}\n\nexport interface CSSLinearGradientImage extends ICSSGradientImage {\n angle: number | GradientCorner;\n type: CSSImageType.LINEAR_GRADIENT;\n}\n\nexport const enum CSSRadialShape {\n CIRCLE,\n ELLIPSE\n}\n\nexport const enum CSSRadialExtent {\n CLOSEST_SIDE,\n FARTHEST_SIDE,\n CLOSEST_CORNER,\n FARTHEST_CORNER\n}\n\nexport type CSSRadialSize = CSSRadialExtent | LengthPercentage[];\n\nexport interface CSSRadialGradientImage extends ICSSGradientImage {\n type: CSSImageType.RADIAL_GRADIENT;\n shape: CSSRadialShape;\n size: CSSRadialSize;\n position: LengthPercentage[];\n}\n\nexport const image: ITypeDescriptor = {\n name: 'image',\n parse: (context: Context, value: CSSValue): ICSSImage => {\n if (value.type === TokenType.URL_TOKEN) {\n const image: CSSURLImage = {url: value.value, type: CSSImageType.URL};\n context.cache.addImage(value.value);\n return image;\n }\n\n if (value.type === TokenType.FUNCTION) {\n const imageFunction = SUPPORTED_IMAGE_FUNCTIONS[value.name];\n if (typeof imageFunction === 'undefined') {\n throw new Error(`Attempting to parse an unsupported image function \"${value.name}\"`);\n }\n return imageFunction(context, value.values);\n }\n\n throw new Error(`Unsupported image type ${value.type}`);\n }\n};\n\nexport function isSupportedImage(value: CSSValue): boolean {\n return (\n !(value.type === TokenType.IDENT_TOKEN && value.value === 'none') &&\n (value.type !== TokenType.FUNCTION || !!SUPPORTED_IMAGE_FUNCTIONS[value.name])\n );\n}\n\nconst SUPPORTED_IMAGE_FUNCTIONS: Record ICSSImage> = {\n 'linear-gradient': linearGradient,\n '-moz-linear-gradient': prefixLinearGradient,\n '-ms-linear-gradient': prefixLinearGradient,\n '-o-linear-gradient': prefixLinearGradient,\n '-webkit-linear-gradient': prefixLinearGradient,\n 'radial-gradient': radialGradient,\n '-moz-radial-gradient': prefixRadialGradient,\n '-ms-radial-gradient': prefixRadialGradient,\n '-o-radial-gradient': prefixRadialGradient,\n '-webkit-radial-gradient': prefixRadialGradient,\n '-webkit-gradient': webkitGradient\n};\n","import {TokenType} from '../syntax/tokenizer';\nimport {ICSSImage, image, isSupportedImage} from '../types/image';\nimport {IPropertyListDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue, nonFunctionArgSeparator} from '../syntax/parser';\nimport {Context} from '../../core/context';\n\nexport const backgroundImage: IPropertyListDescriptor = {\n name: 'background-image',\n initialValue: 'none',\n type: PropertyDescriptorParsingType.LIST,\n prefix: false,\n parse: (context: Context, tokens: CSSValue[]) => {\n if (tokens.length === 0) {\n return [];\n }\n\n const first = tokens[0];\n\n if (first.type === TokenType.IDENT_TOKEN && first.value === 'none') {\n return [];\n }\n\n return tokens\n .filter((value) => nonFunctionArgSeparator(value) && isSupportedImage(value))\n .map((value) => image.parse(context, value));\n }\n};\n","import {IPropertyListDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue, isIdentToken} from '../syntax/parser';\nimport {Context} from '../../core/context';\n\nexport const enum BACKGROUND_ORIGIN {\n BORDER_BOX = 0,\n PADDING_BOX = 1,\n CONTENT_BOX = 2\n}\n\nexport type BackgroundOrigin = BACKGROUND_ORIGIN[];\n\nexport const backgroundOrigin: IPropertyListDescriptor = {\n name: 'background-origin',\n initialValue: 'border-box',\n prefix: false,\n type: PropertyDescriptorParsingType.LIST,\n parse: (_context: Context, tokens: CSSValue[]): BackgroundOrigin => {\n return tokens.map((token) => {\n if (isIdentToken(token)) {\n switch (token.value) {\n case 'padding-box':\n return BACKGROUND_ORIGIN.PADDING_BOX;\n case 'content-box':\n return BACKGROUND_ORIGIN.CONTENT_BOX;\n }\n }\n return BACKGROUND_ORIGIN.BORDER_BOX;\n });\n }\n};\n","import {PropertyDescriptorParsingType, IPropertyListDescriptor} from '../IPropertyDescriptor';\nimport {CSSValue, parseFunctionArgs} from '../syntax/parser';\nimport {isLengthPercentage, LengthPercentageTuple, parseLengthPercentageTuple} from '../types/length-percentage';\nimport {Context} from '../../core/context';\nexport type BackgroundPosition = BackgroundImagePosition[];\n\nexport type BackgroundImagePosition = LengthPercentageTuple;\n\nexport const backgroundPosition: IPropertyListDescriptor = {\n name: 'background-position',\n initialValue: '0% 0%',\n type: PropertyDescriptorParsingType.LIST,\n prefix: false,\n parse: (_context: Context, tokens: CSSValue[]): BackgroundPosition => {\n return parseFunctionArgs(tokens)\n .map((values: CSSValue[]) => values.filter(isLengthPercentage))\n .map(parseLengthPercentageTuple);\n }\n};\n","import {IPropertyListDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue, isIdentToken, parseFunctionArgs} from '../syntax/parser';\nimport {Context} from '../../core/context';\nexport type BackgroundRepeat = BACKGROUND_REPEAT[];\n\nexport const enum BACKGROUND_REPEAT {\n REPEAT = 0,\n NO_REPEAT = 1,\n REPEAT_X = 2,\n REPEAT_Y = 3\n}\n\nexport const backgroundRepeat: IPropertyListDescriptor = {\n name: 'background-repeat',\n initialValue: 'repeat',\n prefix: false,\n type: PropertyDescriptorParsingType.LIST,\n parse: (_context: Context, tokens: CSSValue[]): BackgroundRepeat => {\n return parseFunctionArgs(tokens)\n .map((values) =>\n values\n .filter(isIdentToken)\n .map((token) => token.value)\n .join(' ')\n )\n .map(parseBackgroundRepeat);\n }\n};\n\nconst parseBackgroundRepeat = (value: string): BACKGROUND_REPEAT => {\n switch (value) {\n case 'no-repeat':\n return BACKGROUND_REPEAT.NO_REPEAT;\n case 'repeat-x':\n case 'repeat no-repeat':\n return BACKGROUND_REPEAT.REPEAT_X;\n case 'repeat-y':\n case 'no-repeat repeat':\n return BACKGROUND_REPEAT.REPEAT_Y;\n case 'repeat':\n default:\n return BACKGROUND_REPEAT.REPEAT;\n }\n};\n","import {IPropertyListDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue, isIdentToken, parseFunctionArgs} from '../syntax/parser';\nimport {isLengthPercentage, LengthPercentage} from '../types/length-percentage';\nimport {StringValueToken} from '../syntax/tokenizer';\nimport {Context} from '../../core/context';\n\nexport enum BACKGROUND_SIZE {\n AUTO = 'auto',\n CONTAIN = 'contain',\n COVER = 'cover'\n}\n\nexport type BackgroundSizeInfo = LengthPercentage | StringValueToken;\nexport type BackgroundSize = BackgroundSizeInfo[][];\n\nexport const backgroundSize: IPropertyListDescriptor = {\n name: 'background-size',\n initialValue: '0',\n prefix: false,\n type: PropertyDescriptorParsingType.LIST,\n parse: (_context: Context, tokens: CSSValue[]): BackgroundSize => {\n return parseFunctionArgs(tokens).map((values) => values.filter(isBackgroundSizeInfoToken));\n }\n};\n\nconst isBackgroundSizeInfoToken = (value: CSSValue): value is BackgroundSizeInfo =>\n isIdentToken(value) || isLengthPercentage(value);\n","import {IPropertyTypeValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nconst borderColorForSide = (side: string): IPropertyTypeValueDescriptor => ({\n name: `border-${side}-color`,\n initialValue: 'transparent',\n prefix: false,\n type: PropertyDescriptorParsingType.TYPE_VALUE,\n format: 'color'\n});\n\nexport const borderTopColor: IPropertyTypeValueDescriptor = borderColorForSide('top');\nexport const borderRightColor: IPropertyTypeValueDescriptor = borderColorForSide('right');\nexport const borderBottomColor: IPropertyTypeValueDescriptor = borderColorForSide('bottom');\nexport const borderLeftColor: IPropertyTypeValueDescriptor = borderColorForSide('left');\n","import {IPropertyListDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue} from '../syntax/parser';\nimport {isLengthPercentage, LengthPercentageTuple, parseLengthPercentageTuple} from '../types/length-percentage';\nimport {Context} from '../../core/context';\nexport type BorderRadius = LengthPercentageTuple;\n\nconst borderRadiusForSide = (side: string): IPropertyListDescriptor => ({\n name: `border-radius-${side}`,\n initialValue: '0 0',\n prefix: false,\n type: PropertyDescriptorParsingType.LIST,\n parse: (_context: Context, tokens: CSSValue[]): BorderRadius =>\n parseLengthPercentageTuple(tokens.filter(isLengthPercentage))\n});\n\nexport const borderTopLeftRadius: IPropertyListDescriptor = borderRadiusForSide('top-left');\nexport const borderTopRightRadius: IPropertyListDescriptor = borderRadiusForSide('top-right');\nexport const borderBottomRightRadius: IPropertyListDescriptor = borderRadiusForSide('bottom-right');\nexport const borderBottomLeftRadius: IPropertyListDescriptor = borderRadiusForSide('bottom-left');\n","import {IPropertyIdentValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {Context} from '../../core/context';\nexport const enum BORDER_STYLE {\n NONE = 0,\n SOLID = 1,\n DASHED = 2,\n DOTTED = 3,\n DOUBLE = 4\n}\n\nconst borderStyleForSide = (side: string): IPropertyIdentValueDescriptor => ({\n name: `border-${side}-style`,\n initialValue: 'solid',\n prefix: false,\n type: PropertyDescriptorParsingType.IDENT_VALUE,\n parse: (_context: Context, style: string): BORDER_STYLE => {\n switch (style) {\n case 'none':\n return BORDER_STYLE.NONE;\n case 'dashed':\n return BORDER_STYLE.DASHED;\n case 'dotted':\n return BORDER_STYLE.DOTTED;\n case 'double':\n return BORDER_STYLE.DOUBLE;\n }\n return BORDER_STYLE.SOLID;\n }\n});\n\nexport const borderTopStyle: IPropertyIdentValueDescriptor = borderStyleForSide('top');\nexport const borderRightStyle: IPropertyIdentValueDescriptor = borderStyleForSide('right');\nexport const borderBottomStyle: IPropertyIdentValueDescriptor = borderStyleForSide('bottom');\nexport const borderLeftStyle: IPropertyIdentValueDescriptor = borderStyleForSide('left');\n","import {IPropertyValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue, isDimensionToken} from '../syntax/parser';\nimport {Context} from '../../core/context';\nconst borderWidthForSide = (side: string): IPropertyValueDescriptor => ({\n name: `border-${side}-width`,\n initialValue: '0',\n type: PropertyDescriptorParsingType.VALUE,\n prefix: false,\n parse: (_context: Context, token: CSSValue): number => {\n if (isDimensionToken(token)) {\n return token.number;\n }\n return 0;\n }\n});\n\nexport const borderTopWidth: IPropertyValueDescriptor = borderWidthForSide('top');\nexport const borderRightWidth: IPropertyValueDescriptor = borderWidthForSide('right');\nexport const borderBottomWidth: IPropertyValueDescriptor = borderWidthForSide('bottom');\nexport const borderLeftWidth: IPropertyValueDescriptor = borderWidthForSide('left');\n","import {IPropertyTypeValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\n\nexport const color: IPropertyTypeValueDescriptor = {\n name: `color`,\n initialValue: 'transparent',\n prefix: false,\n type: PropertyDescriptorParsingType.TYPE_VALUE,\n format: 'color'\n};\n","import {IPropertyIdentValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {Context} from '../../core/context';\n\nexport const enum DIRECTION {\n LTR = 0,\n RTL = 1\n}\n\nexport const direction: IPropertyIdentValueDescriptor = {\n name: 'direction',\n initialValue: 'ltr',\n prefix: false,\n type: PropertyDescriptorParsingType.IDENT_VALUE,\n parse: (_context: Context, direction: string) => {\n switch (direction) {\n case 'rtl':\n return DIRECTION.RTL;\n case 'ltr':\n default:\n return DIRECTION.LTR;\n }\n }\n};\n","import {IPropertyListDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue, isIdentToken} from '../syntax/parser';\nimport {Context} from '../../core/context';\nexport const enum DISPLAY {\n NONE = 0,\n BLOCK = 1 << 1,\n INLINE = 1 << 2,\n RUN_IN = 1 << 3,\n FLOW = 1 << 4,\n FLOW_ROOT = 1 << 5,\n TABLE = 1 << 6,\n FLEX = 1 << 7,\n GRID = 1 << 8,\n RUBY = 1 << 9,\n SUBGRID = 1 << 10,\n LIST_ITEM = 1 << 11,\n TABLE_ROW_GROUP = 1 << 12,\n TABLE_HEADER_GROUP = 1 << 13,\n TABLE_FOOTER_GROUP = 1 << 14,\n TABLE_ROW = 1 << 15,\n TABLE_CELL = 1 << 16,\n TABLE_COLUMN_GROUP = 1 << 17,\n TABLE_COLUMN = 1 << 18,\n TABLE_CAPTION = 1 << 19,\n RUBY_BASE = 1 << 20,\n RUBY_TEXT = 1 << 21,\n RUBY_BASE_CONTAINER = 1 << 22,\n RUBY_TEXT_CONTAINER = 1 << 23,\n CONTENTS = 1 << 24,\n INLINE_BLOCK = 1 << 25,\n INLINE_LIST_ITEM = 1 << 26,\n INLINE_TABLE = 1 << 27,\n INLINE_FLEX = 1 << 28,\n INLINE_GRID = 1 << 29\n}\n\nexport type Display = number;\n\nexport const display: IPropertyListDescriptor = {\n name: 'display',\n initialValue: 'inline-block',\n prefix: false,\n type: PropertyDescriptorParsingType.LIST,\n parse: (_context: Context, tokens: CSSValue[]): Display => {\n return tokens.filter(isIdentToken).reduce((bit, token) => {\n return bit | parseDisplayValue(token.value);\n }, DISPLAY.NONE);\n }\n};\n\nconst parseDisplayValue = (display: string): Display => {\n switch (display) {\n case 'block':\n case '-webkit-box':\n return DISPLAY.BLOCK;\n case 'inline':\n return DISPLAY.INLINE;\n case 'run-in':\n return DISPLAY.RUN_IN;\n case 'flow':\n return DISPLAY.FLOW;\n case 'flow-root':\n return DISPLAY.FLOW_ROOT;\n case 'table':\n return DISPLAY.TABLE;\n case 'flex':\n case '-webkit-flex':\n return DISPLAY.FLEX;\n case 'grid':\n case '-ms-grid':\n return DISPLAY.GRID;\n case 'ruby':\n return DISPLAY.RUBY;\n case 'subgrid':\n return DISPLAY.SUBGRID;\n case 'list-item':\n return DISPLAY.LIST_ITEM;\n case 'table-row-group':\n return DISPLAY.TABLE_ROW_GROUP;\n case 'table-header-group':\n return DISPLAY.TABLE_HEADER_GROUP;\n case 'table-footer-group':\n return DISPLAY.TABLE_FOOTER_GROUP;\n case 'table-row':\n return DISPLAY.TABLE_ROW;\n case 'table-cell':\n return DISPLAY.TABLE_CELL;\n case 'table-column-group':\n return DISPLAY.TABLE_COLUMN_GROUP;\n case 'table-column':\n return DISPLAY.TABLE_COLUMN;\n case 'table-caption':\n return DISPLAY.TABLE_CAPTION;\n case 'ruby-base':\n return DISPLAY.RUBY_BASE;\n case 'ruby-text':\n return DISPLAY.RUBY_TEXT;\n case 'ruby-base-container':\n return DISPLAY.RUBY_BASE_CONTAINER;\n case 'ruby-text-container':\n return DISPLAY.RUBY_TEXT_CONTAINER;\n case 'contents':\n return DISPLAY.CONTENTS;\n case 'inline-block':\n return DISPLAY.INLINE_BLOCK;\n case 'inline-list-item':\n return DISPLAY.INLINE_LIST_ITEM;\n case 'inline-table':\n return DISPLAY.INLINE_TABLE;\n case 'inline-flex':\n return DISPLAY.INLINE_FLEX;\n case 'inline-grid':\n return DISPLAY.INLINE_GRID;\n }\n\n return DISPLAY.NONE;\n};\n","import {IPropertyIdentValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {Context} from '../../core/context';\nexport const enum FLOAT {\n NONE = 0,\n LEFT = 1,\n RIGHT = 2,\n INLINE_START = 3,\n INLINE_END = 4\n}\n\nexport const float: IPropertyIdentValueDescriptor = {\n name: 'float',\n initialValue: 'none',\n prefix: false,\n type: PropertyDescriptorParsingType.IDENT_VALUE,\n parse: (_context: Context, float: string) => {\n switch (float) {\n case 'left':\n return FLOAT.LEFT;\n case 'right':\n return FLOAT.RIGHT;\n case 'inline-start':\n return FLOAT.INLINE_START;\n case 'inline-end':\n return FLOAT.INLINE_END;\n }\n return FLOAT.NONE;\n }\n};\n","import {IPropertyValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue} from '../syntax/parser';\nimport {TokenType} from '../syntax/tokenizer';\nimport {Context} from '../../core/context';\nexport const letterSpacing: IPropertyValueDescriptor = {\n name: 'letter-spacing',\n initialValue: '0',\n prefix: false,\n type: PropertyDescriptorParsingType.VALUE,\n parse: (_context: Context, token: CSSValue) => {\n if (token.type === TokenType.IDENT_TOKEN && token.value === 'normal') {\n return 0;\n }\n\n if (token.type === TokenType.NUMBER_TOKEN) {\n return token.number;\n }\n\n if (token.type === TokenType.DIMENSION_TOKEN) {\n return token.number;\n }\n\n return 0;\n }\n};\n","import {IPropertyIdentValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {Context} from '../../core/context';\nexport enum LINE_BREAK {\n NORMAL = 'normal',\n STRICT = 'strict'\n}\n\nexport const lineBreak: IPropertyIdentValueDescriptor = {\n name: 'line-break',\n initialValue: 'normal',\n prefix: false,\n type: PropertyDescriptorParsingType.IDENT_VALUE,\n parse: (_context: Context, lineBreak: string): LINE_BREAK => {\n switch (lineBreak) {\n case 'strict':\n return LINE_BREAK.STRICT;\n case 'normal':\n default:\n return LINE_BREAK.NORMAL;\n }\n }\n};\n","import {IPropertyTokenValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue, isIdentToken} from '../syntax/parser';\nimport {TokenType} from '../syntax/tokenizer';\nimport {getAbsoluteValue, isLengthPercentage} from '../types/length-percentage';\nexport const lineHeight: IPropertyTokenValueDescriptor = {\n name: 'line-height',\n initialValue: 'normal',\n prefix: false,\n type: PropertyDescriptorParsingType.TOKEN_VALUE\n};\n\nexport const computeLineHeight = (token: CSSValue, fontSize: number): number => {\n if (isIdentToken(token) && token.value === 'normal') {\n return 1.2 * fontSize;\n } else if (token.type === TokenType.NUMBER_TOKEN) {\n return fontSize * token.number;\n } else if (isLengthPercentage(token)) {\n return getAbsoluteValue(token, fontSize);\n }\n\n return fontSize;\n};\n","import {TokenType} from '../syntax/tokenizer';\nimport {ICSSImage, image} from '../types/image';\nimport {IPropertyValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue} from '../syntax/parser';\nimport {Context} from '../../core/context';\n\nexport const listStyleImage: IPropertyValueDescriptor = {\n name: 'list-style-image',\n initialValue: 'none',\n type: PropertyDescriptorParsingType.VALUE,\n prefix: false,\n parse: (context: Context, token: CSSValue) => {\n if (token.type === TokenType.IDENT_TOKEN && token.value === 'none') {\n return null;\n }\n\n return image.parse(context, token);\n }\n};\n","import {IPropertyIdentValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {Context} from '../../core/context';\nexport const enum LIST_STYLE_POSITION {\n INSIDE = 0,\n OUTSIDE = 1\n}\n\nexport const listStylePosition: IPropertyIdentValueDescriptor = {\n name: 'list-style-position',\n initialValue: 'outside',\n prefix: false,\n type: PropertyDescriptorParsingType.IDENT_VALUE,\n parse: (_context: Context, position: string) => {\n switch (position) {\n case 'inside':\n return LIST_STYLE_POSITION.INSIDE;\n case 'outside':\n default:\n return LIST_STYLE_POSITION.OUTSIDE;\n }\n }\n};\n","import {IPropertyIdentValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {Context} from '../../core/context';\nexport const enum LIST_STYLE_TYPE {\n NONE = -1,\n DISC = 0,\n CIRCLE = 1,\n SQUARE = 2,\n DECIMAL = 3,\n CJK_DECIMAL = 4,\n DECIMAL_LEADING_ZERO = 5,\n LOWER_ROMAN = 6,\n UPPER_ROMAN = 7,\n LOWER_GREEK = 8,\n LOWER_ALPHA = 9,\n UPPER_ALPHA = 10,\n ARABIC_INDIC = 11,\n ARMENIAN = 12,\n BENGALI = 13,\n CAMBODIAN = 14,\n CJK_EARTHLY_BRANCH = 15,\n CJK_HEAVENLY_STEM = 16,\n CJK_IDEOGRAPHIC = 17,\n DEVANAGARI = 18,\n ETHIOPIC_NUMERIC = 19,\n GEORGIAN = 20,\n GUJARATI = 21,\n GURMUKHI = 22,\n HEBREW = 22,\n HIRAGANA = 23,\n HIRAGANA_IROHA = 24,\n JAPANESE_FORMAL = 25,\n JAPANESE_INFORMAL = 26,\n KANNADA = 27,\n KATAKANA = 28,\n KATAKANA_IROHA = 29,\n KHMER = 30,\n KOREAN_HANGUL_FORMAL = 31,\n KOREAN_HANJA_FORMAL = 32,\n KOREAN_HANJA_INFORMAL = 33,\n LAO = 34,\n LOWER_ARMENIAN = 35,\n MALAYALAM = 36,\n MONGOLIAN = 37,\n MYANMAR = 38,\n ORIYA = 39,\n PERSIAN = 40,\n SIMP_CHINESE_FORMAL = 41,\n SIMP_CHINESE_INFORMAL = 42,\n TAMIL = 43,\n TELUGU = 44,\n THAI = 45,\n TIBETAN = 46,\n TRAD_CHINESE_FORMAL = 47,\n TRAD_CHINESE_INFORMAL = 48,\n UPPER_ARMENIAN = 49,\n DISCLOSURE_OPEN = 50,\n DISCLOSURE_CLOSED = 51\n}\n\nexport const listStyleType: IPropertyIdentValueDescriptor = {\n name: 'list-style-type',\n initialValue: 'none',\n prefix: false,\n type: PropertyDescriptorParsingType.IDENT_VALUE,\n parse: (_context: Context, type: string) => {\n switch (type) {\n case 'disc':\n return LIST_STYLE_TYPE.DISC;\n case 'circle':\n return LIST_STYLE_TYPE.CIRCLE;\n case 'square':\n return LIST_STYLE_TYPE.SQUARE;\n case 'decimal':\n return LIST_STYLE_TYPE.DECIMAL;\n case 'cjk-decimal':\n return LIST_STYLE_TYPE.CJK_DECIMAL;\n case 'decimal-leading-zero':\n return LIST_STYLE_TYPE.DECIMAL_LEADING_ZERO;\n case 'lower-roman':\n return LIST_STYLE_TYPE.LOWER_ROMAN;\n case 'upper-roman':\n return LIST_STYLE_TYPE.UPPER_ROMAN;\n case 'lower-greek':\n return LIST_STYLE_TYPE.LOWER_GREEK;\n case 'lower-alpha':\n return LIST_STYLE_TYPE.LOWER_ALPHA;\n case 'upper-alpha':\n return LIST_STYLE_TYPE.UPPER_ALPHA;\n case 'arabic-indic':\n return LIST_STYLE_TYPE.ARABIC_INDIC;\n case 'armenian':\n return LIST_STYLE_TYPE.ARMENIAN;\n case 'bengali':\n return LIST_STYLE_TYPE.BENGALI;\n case 'cambodian':\n return LIST_STYLE_TYPE.CAMBODIAN;\n case 'cjk-earthly-branch':\n return LIST_STYLE_TYPE.CJK_EARTHLY_BRANCH;\n case 'cjk-heavenly-stem':\n return LIST_STYLE_TYPE.CJK_HEAVENLY_STEM;\n case 'cjk-ideographic':\n return LIST_STYLE_TYPE.CJK_IDEOGRAPHIC;\n case 'devanagari':\n return LIST_STYLE_TYPE.DEVANAGARI;\n case 'ethiopic-numeric':\n return LIST_STYLE_TYPE.ETHIOPIC_NUMERIC;\n case 'georgian':\n return LIST_STYLE_TYPE.GEORGIAN;\n case 'gujarati':\n return LIST_STYLE_TYPE.GUJARATI;\n case 'gurmukhi':\n return LIST_STYLE_TYPE.GURMUKHI;\n case 'hebrew':\n return LIST_STYLE_TYPE.HEBREW;\n case 'hiragana':\n return LIST_STYLE_TYPE.HIRAGANA;\n case 'hiragana-iroha':\n return LIST_STYLE_TYPE.HIRAGANA_IROHA;\n case 'japanese-formal':\n return LIST_STYLE_TYPE.JAPANESE_FORMAL;\n case 'japanese-informal':\n return LIST_STYLE_TYPE.JAPANESE_INFORMAL;\n case 'kannada':\n return LIST_STYLE_TYPE.KANNADA;\n case 'katakana':\n return LIST_STYLE_TYPE.KATAKANA;\n case 'katakana-iroha':\n return LIST_STYLE_TYPE.KATAKANA_IROHA;\n case 'khmer':\n return LIST_STYLE_TYPE.KHMER;\n case 'korean-hangul-formal':\n return LIST_STYLE_TYPE.KOREAN_HANGUL_FORMAL;\n case 'korean-hanja-formal':\n return LIST_STYLE_TYPE.KOREAN_HANJA_FORMAL;\n case 'korean-hanja-informal':\n return LIST_STYLE_TYPE.KOREAN_HANJA_INFORMAL;\n case 'lao':\n return LIST_STYLE_TYPE.LAO;\n case 'lower-armenian':\n return LIST_STYLE_TYPE.LOWER_ARMENIAN;\n case 'malayalam':\n return LIST_STYLE_TYPE.MALAYALAM;\n case 'mongolian':\n return LIST_STYLE_TYPE.MONGOLIAN;\n case 'myanmar':\n return LIST_STYLE_TYPE.MYANMAR;\n case 'oriya':\n return LIST_STYLE_TYPE.ORIYA;\n case 'persian':\n return LIST_STYLE_TYPE.PERSIAN;\n case 'simp-chinese-formal':\n return LIST_STYLE_TYPE.SIMP_CHINESE_FORMAL;\n case 'simp-chinese-informal':\n return LIST_STYLE_TYPE.SIMP_CHINESE_INFORMAL;\n case 'tamil':\n return LIST_STYLE_TYPE.TAMIL;\n case 'telugu':\n return LIST_STYLE_TYPE.TELUGU;\n case 'thai':\n return LIST_STYLE_TYPE.THAI;\n case 'tibetan':\n return LIST_STYLE_TYPE.TIBETAN;\n case 'trad-chinese-formal':\n return LIST_STYLE_TYPE.TRAD_CHINESE_FORMAL;\n case 'trad-chinese-informal':\n return LIST_STYLE_TYPE.TRAD_CHINESE_INFORMAL;\n case 'upper-armenian':\n return LIST_STYLE_TYPE.UPPER_ARMENIAN;\n case 'disclosure-open':\n return LIST_STYLE_TYPE.DISCLOSURE_OPEN;\n case 'disclosure-closed':\n return LIST_STYLE_TYPE.DISCLOSURE_CLOSED;\n case 'none':\n default:\n return LIST_STYLE_TYPE.NONE;\n }\n }\n};\n","import {IPropertyTokenValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\n\nconst marginForSide = (side: string): IPropertyTokenValueDescriptor => ({\n name: `margin-${side}`,\n initialValue: '0',\n prefix: false,\n type: PropertyDescriptorParsingType.TOKEN_VALUE\n});\n\nexport const marginTop: IPropertyTokenValueDescriptor = marginForSide('top');\nexport const marginRight: IPropertyTokenValueDescriptor = marginForSide('right');\nexport const marginBottom: IPropertyTokenValueDescriptor = marginForSide('bottom');\nexport const marginLeft: IPropertyTokenValueDescriptor = marginForSide('left');\n","import {IPropertyListDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue, isIdentToken} from '../syntax/parser';\nimport {Context} from '../../core/context';\nexport const enum OVERFLOW {\n VISIBLE = 0,\n HIDDEN = 1,\n SCROLL = 2,\n CLIP = 3,\n AUTO = 4\n}\n\nexport const overflow: IPropertyListDescriptor = {\n name: 'overflow',\n initialValue: 'visible',\n prefix: false,\n type: PropertyDescriptorParsingType.LIST,\n parse: (_context: Context, tokens: CSSValue[]): OVERFLOW[] => {\n return tokens.filter(isIdentToken).map((overflow) => {\n switch (overflow.value) {\n case 'hidden':\n return OVERFLOW.HIDDEN;\n case 'scroll':\n return OVERFLOW.SCROLL;\n case 'clip':\n return OVERFLOW.CLIP;\n case 'auto':\n return OVERFLOW.AUTO;\n case 'visible':\n default:\n return OVERFLOW.VISIBLE;\n }\n });\n }\n};\n","import {IPropertyIdentValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {Context} from '../../core/context';\nexport const enum OVERFLOW_WRAP {\n NORMAL = 'normal',\n BREAK_WORD = 'break-word'\n}\n\nexport const overflowWrap: IPropertyIdentValueDescriptor = {\n name: 'overflow-wrap',\n initialValue: 'normal',\n prefix: false,\n type: PropertyDescriptorParsingType.IDENT_VALUE,\n parse: (_context: Context, overflow: string) => {\n switch (overflow) {\n case 'break-word':\n return OVERFLOW_WRAP.BREAK_WORD;\n case 'normal':\n default:\n return OVERFLOW_WRAP.NORMAL;\n }\n }\n};\n","import {IPropertyTypeValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\n\nconst paddingForSide = (side: string): IPropertyTypeValueDescriptor => ({\n name: `padding-${side}`,\n initialValue: '0',\n prefix: false,\n type: PropertyDescriptorParsingType.TYPE_VALUE,\n format: 'length-percentage'\n});\n\nexport const paddingTop: IPropertyTypeValueDescriptor = paddingForSide('top');\nexport const paddingRight: IPropertyTypeValueDescriptor = paddingForSide('right');\nexport const paddingBottom: IPropertyTypeValueDescriptor = paddingForSide('bottom');\nexport const paddingLeft: IPropertyTypeValueDescriptor = paddingForSide('left');\n","import {IPropertyIdentValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {Context} from '../../core/context';\nexport const enum TEXT_ALIGN {\n LEFT = 0,\n CENTER = 1,\n RIGHT = 2\n}\n\nexport const textAlign: IPropertyIdentValueDescriptor = {\n name: 'text-align',\n initialValue: 'left',\n prefix: false,\n type: PropertyDescriptorParsingType.IDENT_VALUE,\n parse: (_context: Context, textAlign: string) => {\n switch (textAlign) {\n case 'right':\n return TEXT_ALIGN.RIGHT;\n case 'center':\n case 'justify':\n return TEXT_ALIGN.CENTER;\n case 'left':\n default:\n return TEXT_ALIGN.LEFT;\n }\n }\n};\n","import {IPropertyIdentValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {Context} from '../../core/context';\nexport const enum POSITION {\n STATIC = 0,\n RELATIVE = 1,\n ABSOLUTE = 2,\n FIXED = 3,\n STICKY = 4\n}\n\nexport const position: IPropertyIdentValueDescriptor = {\n name: 'position',\n initialValue: 'static',\n prefix: false,\n type: PropertyDescriptorParsingType.IDENT_VALUE,\n parse: (_context: Context, position: string) => {\n switch (position) {\n case 'relative':\n return POSITION.RELATIVE;\n case 'absolute':\n return POSITION.ABSOLUTE;\n case 'fixed':\n return POSITION.FIXED;\n case 'sticky':\n return POSITION.STICKY;\n }\n\n return POSITION.STATIC;\n }\n};\n","import {PropertyDescriptorParsingType, IPropertyListDescriptor} from '../IPropertyDescriptor';\nimport {CSSValue, isIdentWithValue, parseFunctionArgs} from '../syntax/parser';\nimport {ZERO_LENGTH} from '../types/length-percentage';\nimport {color, Color, COLORS} from '../types/color';\nimport {isLength, Length} from '../types/length';\nimport {Context} from '../../core/context';\n\nexport type TextShadow = TextShadowItem[];\ninterface TextShadowItem {\n color: Color;\n offsetX: Length;\n offsetY: Length;\n blur: Length;\n}\n\nexport const textShadow: IPropertyListDescriptor = {\n name: 'text-shadow',\n initialValue: 'none',\n type: PropertyDescriptorParsingType.LIST,\n prefix: false,\n parse: (context: Context, tokens: CSSValue[]): TextShadow => {\n if (tokens.length === 1 && isIdentWithValue(tokens[0], 'none')) {\n return [];\n }\n\n return parseFunctionArgs(tokens).map((values: CSSValue[]) => {\n const shadow: TextShadowItem = {\n color: COLORS.TRANSPARENT,\n offsetX: ZERO_LENGTH,\n offsetY: ZERO_LENGTH,\n blur: ZERO_LENGTH\n };\n let c = 0;\n for (let i = 0; i < values.length; i++) {\n const token = values[i];\n if (isLength(token)) {\n if (c === 0) {\n shadow.offsetX = token;\n } else if (c === 1) {\n shadow.offsetY = token;\n } else {\n shadow.blur = token;\n }\n c++;\n } else {\n shadow.color = color.parse(context, token);\n }\n }\n return shadow;\n });\n }\n};\n","import {IPropertyIdentValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {Context} from '../../core/context';\nexport const enum TEXT_TRANSFORM {\n NONE = 0,\n LOWERCASE = 1,\n UPPERCASE = 2,\n CAPITALIZE = 3\n}\n\nexport const textTransform: IPropertyIdentValueDescriptor = {\n name: 'text-transform',\n initialValue: 'none',\n prefix: false,\n type: PropertyDescriptorParsingType.IDENT_VALUE,\n parse: (_context: Context, textTransform: string) => {\n switch (textTransform) {\n case 'uppercase':\n return TEXT_TRANSFORM.UPPERCASE;\n case 'lowercase':\n return TEXT_TRANSFORM.LOWERCASE;\n case 'capitalize':\n return TEXT_TRANSFORM.CAPITALIZE;\n }\n\n return TEXT_TRANSFORM.NONE;\n }\n};\n","import {IPropertyValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue} from '../syntax/parser';\nimport {NumberValueToken, TokenType} from '../syntax/tokenizer';\nimport {Context} from '../../core/context';\nexport type Matrix = [number, number, number, number, number, number];\nexport type Transform = Matrix | null;\n\nexport const transform: IPropertyValueDescriptor = {\n name: 'transform',\n initialValue: 'none',\n prefix: true,\n type: PropertyDescriptorParsingType.VALUE,\n parse: (_context: Context, token: CSSValue) => {\n if (token.type === TokenType.IDENT_TOKEN && token.value === 'none') {\n return null;\n }\n\n if (token.type === TokenType.FUNCTION) {\n const transformFunction = SUPPORTED_TRANSFORM_FUNCTIONS[token.name];\n if (typeof transformFunction === 'undefined') {\n throw new Error(`Attempting to parse an unsupported transform function \"${token.name}\"`);\n }\n return transformFunction(token.values);\n }\n\n return null;\n }\n};\n\nconst matrix = (args: CSSValue[]): Transform => {\n const values = args.filter((arg) => arg.type === TokenType.NUMBER_TOKEN).map((arg: NumberValueToken) => arg.number);\n\n return values.length === 6 ? (values as Matrix) : null;\n};\n\n// doesn't support 3D transforms at the moment\nconst matrix3d = (args: CSSValue[]): Transform => {\n const values = args.filter((arg) => arg.type === TokenType.NUMBER_TOKEN).map((arg: NumberValueToken) => arg.number);\n\n const [a1, b1, {}, {}, a2, b2, {}, {}, {}, {}, {}, {}, a4, b4, {}, {}] = values;\n\n return values.length === 16 ? [a1, b1, a2, b2, a4, b4] : null;\n};\n\nconst SUPPORTED_TRANSFORM_FUNCTIONS: {\n [key: string]: (args: CSSValue[]) => Transform;\n} = {\n matrix: matrix,\n matrix3d: matrix3d\n};\n","import {IPropertyListDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue} from '../syntax/parser';\nimport {isLengthPercentage, LengthPercentage} from '../types/length-percentage';\nimport {FLAG_INTEGER, TokenType} from '../syntax/tokenizer';\nimport {Context} from '../../core/context';\nexport type TransformOrigin = [LengthPercentage, LengthPercentage];\n\nconst DEFAULT_VALUE: LengthPercentage = {\n type: TokenType.PERCENTAGE_TOKEN,\n number: 50,\n flags: FLAG_INTEGER\n};\nconst DEFAULT: TransformOrigin = [DEFAULT_VALUE, DEFAULT_VALUE];\n\nexport const transformOrigin: IPropertyListDescriptor = {\n name: 'transform-origin',\n initialValue: '50% 50%',\n prefix: true,\n type: PropertyDescriptorParsingType.LIST,\n parse: (_context: Context, tokens: CSSValue[]) => {\n const origins: LengthPercentage[] = tokens.filter(isLengthPercentage);\n\n if (origins.length !== 2) {\n return DEFAULT;\n }\n\n return [origins[0], origins[1]];\n }\n};\n","import {IPropertyIdentValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {Context} from '../../core/context';\nexport const enum VISIBILITY {\n VISIBLE = 0,\n HIDDEN = 1,\n COLLAPSE = 2\n}\n\nexport const visibility: IPropertyIdentValueDescriptor = {\n name: 'visible',\n initialValue: 'none',\n prefix: false,\n type: PropertyDescriptorParsingType.IDENT_VALUE,\n parse: (_context: Context, visibility: string) => {\n switch (visibility) {\n case 'hidden':\n return VISIBILITY.HIDDEN;\n case 'collapse':\n return VISIBILITY.COLLAPSE;\n case 'visible':\n default:\n return VISIBILITY.VISIBLE;\n }\n }\n};\n","import {IPropertyIdentValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {Context} from '../../core/context';\nexport enum WORD_BREAK {\n NORMAL = 'normal',\n BREAK_ALL = 'break-all',\n KEEP_ALL = 'keep-all'\n}\n\nexport const wordBreak: IPropertyIdentValueDescriptor = {\n name: 'word-break',\n initialValue: 'normal',\n prefix: false,\n type: PropertyDescriptorParsingType.IDENT_VALUE,\n parse: (_context: Context, wordBreak: string): WORD_BREAK => {\n switch (wordBreak) {\n case 'break-all':\n return WORD_BREAK.BREAK_ALL;\n case 'keep-all':\n return WORD_BREAK.KEEP_ALL;\n case 'normal':\n default:\n return WORD_BREAK.NORMAL;\n }\n }\n};\n","import {IPropertyValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue, isNumberToken} from '../syntax/parser';\nimport {TokenType} from '../syntax/tokenizer';\nimport {Context} from '../../core/context';\n\ninterface zIndex {\n order: number;\n auto: boolean;\n}\n\nexport const zIndex: IPropertyValueDescriptor = {\n name: 'z-index',\n initialValue: 'auto',\n prefix: false,\n type: PropertyDescriptorParsingType.VALUE,\n parse: (_context: Context, token: CSSValue): zIndex => {\n if (token.type === TokenType.IDENT_TOKEN) {\n return {auto: true, order: 0};\n }\n\n if (isNumberToken(token)) {\n return {auto: false, order: token.number};\n }\n\n throw new Error(`Invalid z-index number parsed`);\n }\n};\n","import {CSSValue} from '../syntax/parser';\nimport {TokenType} from '../syntax/tokenizer';\nimport {ITypeDescriptor} from '../ITypeDescriptor';\nimport {Context} from '../../core/context';\n\nexport const time: ITypeDescriptor = {\n name: 'time',\n parse: (_context: Context, value: CSSValue): number => {\n if (value.type === TokenType.DIMENSION_TOKEN) {\n switch (value.unit.toLowerCase()) {\n case 's':\n return 1000 * value.number;\n case 'ms':\n return value.number;\n }\n }\n\n throw new Error(`Unsupported time type`);\n }\n};\n","import {IPropertyValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue, isNumberToken} from '../syntax/parser';\nimport {Context} from '../../core/context';\nexport const opacity: IPropertyValueDescriptor = {\n name: 'opacity',\n initialValue: '1',\n type: PropertyDescriptorParsingType.VALUE,\n prefix: false,\n parse: (_context: Context, token: CSSValue): number => {\n if (isNumberToken(token)) {\n return token.number;\n }\n return 1;\n }\n};\n","import {IPropertyTypeValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\n\nexport const textDecorationColor: IPropertyTypeValueDescriptor = {\n name: `text-decoration-color`,\n initialValue: 'transparent',\n prefix: false,\n type: PropertyDescriptorParsingType.TYPE_VALUE,\n format: 'color'\n};\n","import {IPropertyListDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue, isIdentToken} from '../syntax/parser';\nimport {Context} from '../../core/context';\n\nexport const enum TEXT_DECORATION_LINE {\n NONE = 0,\n UNDERLINE = 1,\n OVERLINE = 2,\n LINE_THROUGH = 3,\n BLINK = 4\n}\n\nexport type TextDecorationLine = TEXT_DECORATION_LINE[];\n\nexport const textDecorationLine: IPropertyListDescriptor = {\n name: 'text-decoration-line',\n initialValue: 'none',\n prefix: false,\n type: PropertyDescriptorParsingType.LIST,\n parse: (_context: Context, tokens: CSSValue[]): TextDecorationLine => {\n return tokens\n .filter(isIdentToken)\n .map((token) => {\n switch (token.value) {\n case 'underline':\n return TEXT_DECORATION_LINE.UNDERLINE;\n case 'overline':\n return TEXT_DECORATION_LINE.OVERLINE;\n case 'line-through':\n return TEXT_DECORATION_LINE.LINE_THROUGH;\n case 'none':\n return TEXT_DECORATION_LINE.BLINK;\n }\n return TEXT_DECORATION_LINE.NONE;\n })\n .filter((line) => line !== TEXT_DECORATION_LINE.NONE);\n }\n};\n","import {IPropertyListDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue} from '../syntax/parser';\nimport {TokenType} from '../syntax/tokenizer';\nimport {Context} from '../../core/context';\n\nexport type FONT_FAMILY = string;\n\nexport type FontFamily = FONT_FAMILY[];\n\nexport const fontFamily: IPropertyListDescriptor = {\n name: `font-family`,\n initialValue: '',\n prefix: false,\n type: PropertyDescriptorParsingType.LIST,\n parse: (_context: Context, tokens: CSSValue[]) => {\n const accumulator: string[] = [];\n const results: string[] = [];\n tokens.forEach((token) => {\n switch (token.type) {\n case TokenType.IDENT_TOKEN:\n case TokenType.STRING_TOKEN:\n accumulator.push(token.value);\n break;\n case TokenType.NUMBER_TOKEN:\n accumulator.push(token.number.toString());\n break;\n case TokenType.COMMA_TOKEN:\n results.push(accumulator.join(' '));\n accumulator.length = 0;\n break;\n }\n });\n if (accumulator.length) {\n results.push(accumulator.join(' '));\n }\n return results.map((result) => (result.indexOf(' ') === -1 ? result : `'${result}'`));\n }\n};\n","import {IPropertyTypeValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\n\nexport const fontSize: IPropertyTypeValueDescriptor = {\n name: `font-size`,\n initialValue: '0',\n prefix: false,\n type: PropertyDescriptorParsingType.TYPE_VALUE,\n format: 'length'\n};\n","import {IPropertyValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue, isIdentToken, isNumberToken} from '../syntax/parser';\nimport {Context} from '../../core/context';\nexport const fontWeight: IPropertyValueDescriptor = {\n name: 'font-weight',\n initialValue: 'normal',\n type: PropertyDescriptorParsingType.VALUE,\n prefix: false,\n parse: (_context: Context, token: CSSValue): number => {\n if (isNumberToken(token)) {\n return token.number;\n }\n\n if (isIdentToken(token)) {\n switch (token.value) {\n case 'bold':\n return 700;\n case 'normal':\n default:\n return 400;\n }\n }\n\n return 400;\n }\n};\n","import {IPropertyListDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue, isIdentToken} from '../syntax/parser';\nimport {Context} from '../../core/context';\nexport const fontVariant: IPropertyListDescriptor = {\n name: 'font-variant',\n initialValue: 'none',\n type: PropertyDescriptorParsingType.LIST,\n prefix: false,\n parse: (_context: Context, tokens: CSSValue[]): string[] => {\n return tokens.filter(isIdentToken).map((token) => token.value);\n }\n};\n","import {IPropertyIdentValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {Context} from '../../core/context';\nexport const enum FONT_STYLE {\n NORMAL = 'normal',\n ITALIC = 'italic',\n OBLIQUE = 'oblique'\n}\n\nexport const fontStyle: IPropertyIdentValueDescriptor = {\n name: 'font-style',\n initialValue: 'normal',\n prefix: false,\n type: PropertyDescriptorParsingType.IDENT_VALUE,\n parse: (_context: Context, overflow: string) => {\n switch (overflow) {\n case 'oblique':\n return FONT_STYLE.OBLIQUE;\n case 'italic':\n return FONT_STYLE.ITALIC;\n case 'normal':\n default:\n return FONT_STYLE.NORMAL;\n }\n }\n};\n","export const contains = (bit: number, value: number): boolean => (bit & value) !== 0;\n","import {TokenType} from '../syntax/tokenizer';\nimport {IPropertyListDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue} from '../syntax/parser';\nimport {Context} from '../../core/context';\n\nexport type Content = CSSValue[];\n\nexport const content: IPropertyListDescriptor = {\n name: 'content',\n initialValue: 'none',\n type: PropertyDescriptorParsingType.LIST,\n prefix: false,\n parse: (_context: Context, tokens: CSSValue[]) => {\n if (tokens.length === 0) {\n return [];\n }\n\n const first = tokens[0];\n\n if (first.type === TokenType.IDENT_TOKEN && first.value === 'none') {\n return [];\n }\n\n return tokens;\n }\n};\n","import {IPropertyListDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue, isNumberToken, nonWhiteSpace} from '../syntax/parser';\nimport {TokenType} from '../syntax/tokenizer';\nimport {Context} from '../../core/context';\n\nexport interface COUNTER_INCREMENT {\n counter: string;\n increment: number;\n}\n\nexport type CounterIncrement = COUNTER_INCREMENT[] | null;\n\nexport const counterIncrement: IPropertyListDescriptor = {\n name: 'counter-increment',\n initialValue: 'none',\n prefix: true,\n type: PropertyDescriptorParsingType.LIST,\n parse: (_context: Context, tokens: CSSValue[]) => {\n if (tokens.length === 0) {\n return null;\n }\n\n const first = tokens[0];\n\n if (first.type === TokenType.IDENT_TOKEN && first.value === 'none') {\n return null;\n }\n\n const increments = [];\n const filtered = tokens.filter(nonWhiteSpace);\n\n for (let i = 0; i < filtered.length; i++) {\n const counter = filtered[i];\n const next = filtered[i + 1];\n if (counter.type === TokenType.IDENT_TOKEN) {\n const increment = next && isNumberToken(next) ? next.number : 1;\n increments.push({counter: counter.value, increment});\n }\n }\n\n return increments;\n }\n};\n","import {IPropertyListDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue, isIdentToken, isNumberToken, nonWhiteSpace} from '../syntax/parser';\nimport {Context} from '../../core/context';\n\nexport interface COUNTER_RESET {\n counter: string;\n reset: number;\n}\n\nexport type CounterReset = COUNTER_RESET[];\n\nexport const counterReset: IPropertyListDescriptor = {\n name: 'counter-reset',\n initialValue: 'none',\n prefix: true,\n type: PropertyDescriptorParsingType.LIST,\n parse: (_context: Context, tokens: CSSValue[]) => {\n if (tokens.length === 0) {\n return [];\n }\n\n const resets = [];\n const filtered = tokens.filter(nonWhiteSpace);\n\n for (let i = 0; i < filtered.length; i++) {\n const counter = filtered[i];\n const next = filtered[i + 1];\n if (isIdentToken(counter) && counter.value !== 'none') {\n const reset = next && isNumberToken(next) ? next.number : 0;\n resets.push({counter: counter.value, reset});\n }\n }\n\n return resets;\n }\n};\n","import {IPropertyListDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {Context} from '../../core/context';\nimport {CSSValue, isDimensionToken} from '../syntax/parser';\nimport {time} from '../types/time';\n\nexport const duration: IPropertyListDescriptor = {\n name: 'duration',\n initialValue: '0s',\n prefix: false,\n type: PropertyDescriptorParsingType.LIST,\n parse: (context: Context, tokens: CSSValue[]) => {\n return tokens.filter(isDimensionToken).map((token) => time.parse(context, token));\n }\n};\n","import {IPropertyListDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue, isStringToken} from '../syntax/parser';\nimport {TokenType} from '../syntax/tokenizer';\nimport {Context} from '../../core/context';\n\nexport interface QUOTE {\n open: string;\n close: string;\n}\n\nexport type Quotes = QUOTE[] | null;\n\nexport const quotes: IPropertyListDescriptor = {\n name: 'quotes',\n initialValue: 'none',\n prefix: true,\n type: PropertyDescriptorParsingType.LIST,\n parse: (_context: Context, tokens: CSSValue[]) => {\n if (tokens.length === 0) {\n return null;\n }\n\n const first = tokens[0];\n\n if (first.type === TokenType.IDENT_TOKEN && first.value === 'none') {\n return null;\n }\n\n const quotes = [];\n const filtered = tokens.filter(isStringToken);\n\n if (filtered.length % 2 !== 0) {\n return null;\n }\n\n for (let i = 0; i < filtered.length; i += 2) {\n const open = filtered[i].value;\n const close = filtered[i + 1].value;\n quotes.push({open, close});\n }\n\n return quotes;\n }\n};\n\nexport const getQuote = (quotes: Quotes, depth: number, open: boolean): string => {\n if (!quotes) {\n return '';\n }\n\n const quote = quotes[Math.min(depth, quotes.length - 1)];\n if (!quote) {\n return '';\n }\n\n return open ? quote.open : quote.close;\n};\n","import {PropertyDescriptorParsingType, IPropertyListDescriptor} from '../IPropertyDescriptor';\nimport {CSSValue, isIdentWithValue, parseFunctionArgs} from '../syntax/parser';\nimport {ZERO_LENGTH} from '../types/length-percentage';\nimport {color, Color} from '../types/color';\nimport {isLength, Length} from '../types/length';\nimport {Context} from '../../core/context';\n\nexport type BoxShadow = BoxShadowItem[];\ninterface BoxShadowItem {\n inset: boolean;\n color: Color;\n offsetX: Length;\n offsetY: Length;\n blur: Length;\n spread: Length;\n}\n\nexport const boxShadow: IPropertyListDescriptor = {\n name: 'box-shadow',\n initialValue: 'none',\n type: PropertyDescriptorParsingType.LIST,\n prefix: false,\n parse: (context: Context, tokens: CSSValue[]): BoxShadow => {\n if (tokens.length === 1 && isIdentWithValue(tokens[0], 'none')) {\n return [];\n }\n\n return parseFunctionArgs(tokens).map((values: CSSValue[]) => {\n const shadow: BoxShadowItem = {\n color: 0x000000ff,\n offsetX: ZERO_LENGTH,\n offsetY: ZERO_LENGTH,\n blur: ZERO_LENGTH,\n spread: ZERO_LENGTH,\n inset: false\n };\n let c = 0;\n for (let i = 0; i < values.length; i++) {\n const token = values[i];\n if (isIdentWithValue(token, 'inset')) {\n shadow.inset = true;\n } else if (isLength(token)) {\n if (c === 0) {\n shadow.offsetX = token;\n } else if (c === 1) {\n shadow.offsetY = token;\n } else if (c === 2) {\n shadow.blur = token;\n } else {\n shadow.spread = token;\n }\n c++;\n } else {\n shadow.color = color.parse(context, token);\n }\n }\n return shadow;\n });\n }\n};\n","import {IPropertyListDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue, isIdentToken} from '../syntax/parser';\nimport {Context} from '../../core/context';\nexport const enum PAINT_ORDER_LAYER {\n FILL,\n STROKE,\n MARKERS\n}\n\nexport type PaintOrder = PAINT_ORDER_LAYER[];\n\nexport const paintOrder: IPropertyListDescriptor = {\n name: 'paint-order',\n initialValue: 'normal',\n prefix: false,\n type: PropertyDescriptorParsingType.LIST,\n parse: (_context: Context, tokens: CSSValue[]): PaintOrder => {\n const DEFAULT_VALUE = [PAINT_ORDER_LAYER.FILL, PAINT_ORDER_LAYER.STROKE, PAINT_ORDER_LAYER.MARKERS];\n const layers: PaintOrder = [];\n\n tokens.filter(isIdentToken).forEach((token) => {\n switch (token.value) {\n case 'stroke':\n layers.push(PAINT_ORDER_LAYER.STROKE);\n break;\n case 'fill':\n layers.push(PAINT_ORDER_LAYER.FILL);\n break;\n case 'markers':\n layers.push(PAINT_ORDER_LAYER.MARKERS);\n break;\n }\n });\n DEFAULT_VALUE.forEach((value) => {\n if (layers.indexOf(value) === -1) {\n layers.push(value);\n }\n });\n\n return layers;\n }\n};\n","import {IPropertyTypeValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nexport const webkitTextStrokeColor: IPropertyTypeValueDescriptor = {\n name: `-webkit-text-stroke-color`,\n initialValue: 'currentcolor',\n prefix: false,\n type: PropertyDescriptorParsingType.TYPE_VALUE,\n format: 'color'\n};\n","import {CSSValue, isDimensionToken} from '../syntax/parser';\nimport {IPropertyValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {Context} from '../../core/context';\nexport const webkitTextStrokeWidth: IPropertyValueDescriptor = {\n name: `-webkit-text-stroke-width`,\n initialValue: '0',\n type: PropertyDescriptorParsingType.VALUE,\n prefix: false,\n parse: (_context: Context, token: CSSValue): number => {\n if (isDimensionToken(token)) {\n return token.number;\n }\n return 0;\n }\n};\n","import {CSSPropertyDescriptor, PropertyDescriptorParsingType} from './IPropertyDescriptor';\nimport {backgroundClip} from './property-descriptors/background-clip';\nimport {backgroundColor} from './property-descriptors/background-color';\nimport {backgroundImage} from './property-descriptors/background-image';\nimport {backgroundOrigin} from './property-descriptors/background-origin';\nimport {backgroundPosition} from './property-descriptors/background-position';\nimport {backgroundRepeat} from './property-descriptors/background-repeat';\nimport {backgroundSize} from './property-descriptors/background-size';\nimport {\n borderBottomColor,\n borderLeftColor,\n borderRightColor,\n borderTopColor\n} from './property-descriptors/border-color';\nimport {\n borderBottomLeftRadius,\n borderBottomRightRadius,\n borderTopLeftRadius,\n borderTopRightRadius\n} from './property-descriptors/border-radius';\nimport {\n borderBottomStyle,\n borderLeftStyle,\n borderRightStyle,\n borderTopStyle\n} from './property-descriptors/border-style';\nimport {\n borderBottomWidth,\n borderLeftWidth,\n borderRightWidth,\n borderTopWidth\n} from './property-descriptors/border-width';\nimport {color} from './property-descriptors/color';\nimport {direction} from './property-descriptors/direction';\nimport {display, DISPLAY} from './property-descriptors/display';\nimport {float, FLOAT} from './property-descriptors/float';\nimport {letterSpacing} from './property-descriptors/letter-spacing';\nimport {lineBreak} from './property-descriptors/line-break';\nimport {lineHeight} from './property-descriptors/line-height';\nimport {listStyleImage} from './property-descriptors/list-style-image';\nimport {listStylePosition} from './property-descriptors/list-style-position';\nimport {listStyleType} from './property-descriptors/list-style-type';\nimport {marginBottom, marginLeft, marginRight, marginTop} from './property-descriptors/margin';\nimport {overflow, OVERFLOW} from './property-descriptors/overflow';\nimport {overflowWrap} from './property-descriptors/overflow-wrap';\nimport {paddingBottom, paddingLeft, paddingRight, paddingTop} from './property-descriptors/padding';\nimport {textAlign} from './property-descriptors/text-align';\nimport {position, POSITION} from './property-descriptors/position';\nimport {textShadow} from './property-descriptors/text-shadow';\nimport {textTransform} from './property-descriptors/text-transform';\nimport {transform} from './property-descriptors/transform';\nimport {transformOrigin} from './property-descriptors/transform-origin';\nimport {visibility, VISIBILITY} from './property-descriptors/visibility';\nimport {wordBreak} from './property-descriptors/word-break';\nimport {zIndex} from './property-descriptors/z-index';\nimport {CSSValue, isIdentToken, Parser} from './syntax/parser';\nimport {Tokenizer} from './syntax/tokenizer';\nimport {Color, color as colorType, isTransparent} from './types/color';\nimport {angle} from './types/angle';\nimport {image} from './types/image';\nimport {time} from './types/time';\nimport {opacity} from './property-descriptors/opacity';\nimport {textDecorationColor} from './property-descriptors/text-decoration-color';\nimport {textDecorationLine} from './property-descriptors/text-decoration-line';\nimport {isLengthPercentage, LengthPercentage, ZERO_LENGTH} from './types/length-percentage';\nimport {fontFamily} from './property-descriptors/font-family';\nimport {fontSize} from './property-descriptors/font-size';\nimport {isLength} from './types/length';\nimport {fontWeight} from './property-descriptors/font-weight';\nimport {fontVariant} from './property-descriptors/font-variant';\nimport {fontStyle} from './property-descriptors/font-style';\nimport {contains} from '../core/bitwise';\nimport {content} from './property-descriptors/content';\nimport {counterIncrement} from './property-descriptors/counter-increment';\nimport {counterReset} from './property-descriptors/counter-reset';\nimport {duration} from './property-descriptors/duration';\nimport {quotes} from './property-descriptors/quotes';\nimport {boxShadow} from './property-descriptors/box-shadow';\nimport {paintOrder} from './property-descriptors/paint-order';\nimport {webkitTextStrokeColor} from './property-descriptors/webkit-text-stroke-color';\nimport {webkitTextStrokeWidth} from './property-descriptors/webkit-text-stroke-width';\nimport {Context} from '../core/context';\n\nexport class CSSParsedDeclaration {\n animationDuration: ReturnType;\n backgroundClip: ReturnType;\n backgroundColor: Color;\n backgroundImage: ReturnType;\n backgroundOrigin: ReturnType;\n backgroundPosition: ReturnType;\n backgroundRepeat: ReturnType;\n backgroundSize: ReturnType;\n borderTopColor: Color;\n borderRightColor: Color;\n borderBottomColor: Color;\n borderLeftColor: Color;\n borderTopLeftRadius: ReturnType;\n borderTopRightRadius: ReturnType;\n borderBottomRightRadius: ReturnType;\n borderBottomLeftRadius: ReturnType;\n borderTopStyle: ReturnType;\n borderRightStyle: ReturnType;\n borderBottomStyle: ReturnType;\n borderLeftStyle: ReturnType;\n borderTopWidth: ReturnType;\n borderRightWidth: ReturnType;\n borderBottomWidth: ReturnType;\n borderLeftWidth: ReturnType;\n boxShadow: ReturnType;\n color: Color;\n direction: ReturnType;\n display: ReturnType;\n float: ReturnType;\n fontFamily: ReturnType;\n fontSize: LengthPercentage;\n fontStyle: ReturnType;\n fontVariant: ReturnType;\n fontWeight: ReturnType;\n letterSpacing: ReturnType;\n lineBreak: ReturnType;\n lineHeight: CSSValue;\n listStyleImage: ReturnType;\n listStylePosition: ReturnType;\n listStyleType: ReturnType;\n marginTop: CSSValue;\n marginRight: CSSValue;\n marginBottom: CSSValue;\n marginLeft: CSSValue;\n opacity: ReturnType;\n overflowX: OVERFLOW;\n overflowY: OVERFLOW;\n overflowWrap: ReturnType;\n paddingTop: LengthPercentage;\n paddingRight: LengthPercentage;\n paddingBottom: LengthPercentage;\n paddingLeft: LengthPercentage;\n paintOrder: ReturnType;\n position: ReturnType;\n textAlign: ReturnType;\n textDecorationColor: Color;\n textDecorationLine: ReturnType;\n textShadow: ReturnType;\n textTransform: ReturnType;\n transform: ReturnType;\n transformOrigin: ReturnType;\n visibility: ReturnType;\n webkitTextStrokeColor: Color;\n webkitTextStrokeWidth: ReturnType;\n wordBreak: ReturnType;\n zIndex: ReturnType;\n\n constructor(context: Context, declaration: CSSStyleDeclaration) {\n this.animationDuration = parse(context, duration, declaration.animationDuration);\n this.backgroundClip = parse(context, backgroundClip, declaration.backgroundClip);\n this.backgroundColor = parse(context, backgroundColor, declaration.backgroundColor);\n this.backgroundImage = parse(context, backgroundImage, declaration.backgroundImage);\n this.backgroundOrigin = parse(context, backgroundOrigin, declaration.backgroundOrigin);\n this.backgroundPosition = parse(context, backgroundPosition, declaration.backgroundPosition);\n this.backgroundRepeat = parse(context, backgroundRepeat, declaration.backgroundRepeat);\n this.backgroundSize = parse(context, backgroundSize, declaration.backgroundSize);\n this.borderTopColor = parse(context, borderTopColor, declaration.borderTopColor);\n this.borderRightColor = parse(context, borderRightColor, declaration.borderRightColor);\n this.borderBottomColor = parse(context, borderBottomColor, declaration.borderBottomColor);\n this.borderLeftColor = parse(context, borderLeftColor, declaration.borderLeftColor);\n this.borderTopLeftRadius = parse(context, borderTopLeftRadius, declaration.borderTopLeftRadius);\n this.borderTopRightRadius = parse(context, borderTopRightRadius, declaration.borderTopRightRadius);\n this.borderBottomRightRadius = parse(context, borderBottomRightRadius, declaration.borderBottomRightRadius);\n this.borderBottomLeftRadius = parse(context, borderBottomLeftRadius, declaration.borderBottomLeftRadius);\n this.borderTopStyle = parse(context, borderTopStyle, declaration.borderTopStyle);\n this.borderRightStyle = parse(context, borderRightStyle, declaration.borderRightStyle);\n this.borderBottomStyle = parse(context, borderBottomStyle, declaration.borderBottomStyle);\n this.borderLeftStyle = parse(context, borderLeftStyle, declaration.borderLeftStyle);\n this.borderTopWidth = parse(context, borderTopWidth, declaration.borderTopWidth);\n this.borderRightWidth = parse(context, borderRightWidth, declaration.borderRightWidth);\n this.borderBottomWidth = parse(context, borderBottomWidth, declaration.borderBottomWidth);\n this.borderLeftWidth = parse(context, borderLeftWidth, declaration.borderLeftWidth);\n this.boxShadow = parse(context, boxShadow, declaration.boxShadow);\n this.color = parse(context, color, declaration.color);\n this.direction = parse(context, direction, declaration.direction);\n this.display = parse(context, display, declaration.display);\n this.float = parse(context, float, declaration.cssFloat);\n this.fontFamily = parse(context, fontFamily, declaration.fontFamily);\n this.fontSize = parse(context, fontSize, declaration.fontSize);\n this.fontStyle = parse(context, fontStyle, declaration.fontStyle);\n this.fontVariant = parse(context, fontVariant, declaration.fontVariant);\n this.fontWeight = parse(context, fontWeight, declaration.fontWeight);\n this.letterSpacing = parse(context, letterSpacing, declaration.letterSpacing);\n this.lineBreak = parse(context, lineBreak, declaration.lineBreak);\n this.lineHeight = parse(context, lineHeight, declaration.lineHeight);\n this.listStyleImage = parse(context, listStyleImage, declaration.listStyleImage);\n this.listStylePosition = parse(context, listStylePosition, declaration.listStylePosition);\n this.listStyleType = parse(context, listStyleType, declaration.listStyleType);\n this.marginTop = parse(context, marginTop, declaration.marginTop);\n this.marginRight = parse(context, marginRight, declaration.marginRight);\n this.marginBottom = parse(context, marginBottom, declaration.marginBottom);\n this.marginLeft = parse(context, marginLeft, declaration.marginLeft);\n this.opacity = parse(context, opacity, declaration.opacity);\n const overflowTuple = parse(context, overflow, declaration.overflow);\n this.overflowX = overflowTuple[0];\n this.overflowY = overflowTuple[overflowTuple.length > 1 ? 1 : 0];\n this.overflowWrap = parse(context, overflowWrap, declaration.overflowWrap);\n this.paddingTop = parse(context, paddingTop, declaration.paddingTop);\n this.paddingRight = parse(context, paddingRight, declaration.paddingRight);\n this.paddingBottom = parse(context, paddingBottom, declaration.paddingBottom);\n this.paddingLeft = parse(context, paddingLeft, declaration.paddingLeft);\n this.paintOrder = parse(context, paintOrder, declaration.paintOrder);\n this.position = parse(context, position, declaration.position);\n this.textAlign = parse(context, textAlign, declaration.textAlign);\n this.textDecorationColor = parse(\n context,\n textDecorationColor,\n declaration.textDecorationColor ?? declaration.color\n );\n this.textDecorationLine = parse(\n context,\n textDecorationLine,\n declaration.textDecorationLine ?? declaration.textDecoration\n );\n this.textShadow = parse(context, textShadow, declaration.textShadow);\n this.textTransform = parse(context, textTransform, declaration.textTransform);\n this.transform = parse(context, transform, declaration.transform);\n this.transformOrigin = parse(context, transformOrigin, declaration.transformOrigin);\n this.visibility = parse(context, visibility, declaration.visibility);\n this.webkitTextStrokeColor = parse(context, webkitTextStrokeColor, declaration.webkitTextStrokeColor);\n this.webkitTextStrokeWidth = parse(context, webkitTextStrokeWidth, declaration.webkitTextStrokeWidth);\n this.wordBreak = parse(context, wordBreak, declaration.wordBreak);\n this.zIndex = parse(context, zIndex, declaration.zIndex);\n }\n\n isVisible(): boolean {\n return this.display > 0 && this.opacity > 0 && this.visibility === VISIBILITY.VISIBLE;\n }\n\n isTransparent(): boolean {\n return isTransparent(this.backgroundColor);\n }\n\n isTransformed(): boolean {\n return this.transform !== null;\n }\n\n isPositioned(): boolean {\n return this.position !== POSITION.STATIC;\n }\n\n isPositionedWithZIndex(): boolean {\n return this.isPositioned() && !this.zIndex.auto;\n }\n\n isFloating(): boolean {\n return this.float !== FLOAT.NONE;\n }\n\n isInlineLevel(): boolean {\n return (\n contains(this.display, DISPLAY.INLINE) ||\n contains(this.display, DISPLAY.INLINE_BLOCK) ||\n contains(this.display, DISPLAY.INLINE_FLEX) ||\n contains(this.display, DISPLAY.INLINE_GRID) ||\n contains(this.display, DISPLAY.INLINE_LIST_ITEM) ||\n contains(this.display, DISPLAY.INLINE_TABLE)\n );\n }\n}\n\nexport class CSSParsedPseudoDeclaration {\n content: ReturnType;\n quotes: ReturnType;\n\n constructor(context: Context, declaration: CSSStyleDeclaration) {\n this.content = parse(context, content, declaration.content);\n this.quotes = parse(context, quotes, declaration.quotes);\n }\n}\n\nexport class CSSParsedCounterDeclaration {\n counterIncrement: ReturnType;\n counterReset: ReturnType;\n\n constructor(context: Context, declaration: CSSStyleDeclaration) {\n this.counterIncrement = parse(context, counterIncrement, declaration.counterIncrement);\n this.counterReset = parse(context, counterReset, declaration.counterReset);\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst parse = (context: Context, descriptor: CSSPropertyDescriptor, style?: string | null) => {\n const tokenizer = new Tokenizer();\n const value = style !== null && typeof style !== 'undefined' ? style.toString() : descriptor.initialValue;\n tokenizer.write(value);\n const parser = new Parser(tokenizer.read());\n switch (descriptor.type) {\n case PropertyDescriptorParsingType.IDENT_VALUE:\n const token = parser.parseComponentValue();\n return descriptor.parse(context, isIdentToken(token) ? token.value : descriptor.initialValue);\n case PropertyDescriptorParsingType.VALUE:\n return descriptor.parse(context, parser.parseComponentValue());\n case PropertyDescriptorParsingType.LIST:\n return descriptor.parse(context, parser.parseComponentValues());\n case PropertyDescriptorParsingType.TOKEN_VALUE:\n return parser.parseComponentValue();\n case PropertyDescriptorParsingType.TYPE_VALUE:\n switch (descriptor.format) {\n case 'angle':\n return angle.parse(context, parser.parseComponentValue());\n case 'color':\n return colorType.parse(context, parser.parseComponentValue());\n case 'image':\n return image.parse(context, parser.parseComponentValue());\n case 'length':\n const length = parser.parseComponentValue();\n return isLength(length) ? length : ZERO_LENGTH;\n case 'length-percentage':\n const value = parser.parseComponentValue();\n return isLengthPercentage(value) ? value : ZERO_LENGTH;\n case 'time':\n return time.parse(context, parser.parseComponentValue());\n }\n break;\n }\n};\n","const elementDebuggerAttribute = 'data-html2canvas-debug';\nexport const enum DebuggerType {\n NONE,\n ALL,\n CLONE,\n PARSE,\n RENDER\n}\n\nconst getElementDebugType = (element: Element): DebuggerType => {\n const attribute = element.getAttribute(elementDebuggerAttribute);\n switch (attribute) {\n case 'all':\n return DebuggerType.ALL;\n case 'clone':\n return DebuggerType.CLONE;\n case 'parse':\n return DebuggerType.PARSE;\n case 'render':\n return DebuggerType.RENDER;\n default:\n return DebuggerType.NONE;\n }\n};\n\nexport const isDebugging = (element: Element, type: Omit): boolean => {\n const elementType = getElementDebugType(element);\n return elementType === DebuggerType.ALL || type === elementType;\n};\n","import {CSSParsedDeclaration} from '../css/index';\nimport {TextContainer} from './text-container';\nimport {Bounds, parseBounds} from '../css/layout/bounds';\nimport {isHTMLElementNode} from './node-parser';\nimport {Context} from '../core/context';\nimport {DebuggerType, isDebugging} from '../core/debugger';\n\nexport const enum FLAGS {\n CREATES_STACKING_CONTEXT = 1 << 1,\n CREATES_REAL_STACKING_CONTEXT = 1 << 2,\n IS_LIST_OWNER = 1 << 3,\n DEBUG_RENDER = 1 << 4\n}\n\nexport class ElementContainer {\n readonly styles: CSSParsedDeclaration;\n readonly textNodes: TextContainer[] = [];\n readonly elements: ElementContainer[] = [];\n bounds: Bounds;\n flags = 0;\n\n constructor(protected readonly context: Context, element: Element) {\n if (isDebugging(element, DebuggerType.PARSE)) {\n debugger;\n }\n\n this.styles = new CSSParsedDeclaration(context, window.getComputedStyle(element, null));\n\n if (isHTMLElementNode(element)) {\n if (this.styles.animationDuration.some((duration) => duration > 0)) {\n element.style.animationDuration = '0s';\n }\n\n if (this.styles.transform !== null) {\n // getBoundingClientRect takes transforms into account\n element.style.transform = 'none';\n }\n }\n\n this.bounds = parseBounds(this.context, element);\n\n if (isDebugging(element, DebuggerType.RENDER)) {\n this.flags |= FLAGS.DEBUG_RENDER;\n }\n }\n}\n","export const base64 =\n 'AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAC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kFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqV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AZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///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4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=';\nexport const byteLength = 19616;\n","const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\n// Use a lookup table to find the index.\nconst lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);\nfor (let i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n}\n\nexport const decode = (base64: string): ArrayBuffer | number[] => {\n let bufferLength = base64.length * 0.75,\n len = base64.length,\n i,\n p = 0,\n encoded1,\n encoded2,\n encoded3,\n encoded4;\n\n if (base64[base64.length - 1] === '=') {\n bufferLength--;\n if (base64[base64.length - 2] === '=') {\n bufferLength--;\n }\n }\n\n const buffer =\n typeof ArrayBuffer !== 'undefined' &&\n typeof Uint8Array !== 'undefined' &&\n typeof Uint8Array.prototype.slice !== 'undefined'\n ? new ArrayBuffer(bufferLength)\n : new Array(bufferLength);\n const bytes = Array.isArray(buffer) ? buffer : new Uint8Array(buffer);\n\n for (i = 0; i < len; i += 4) {\n encoded1 = lookup[base64.charCodeAt(i)];\n encoded2 = lookup[base64.charCodeAt(i + 1)];\n encoded3 = lookup[base64.charCodeAt(i + 2)];\n encoded4 = lookup[base64.charCodeAt(i + 3)];\n\n bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\n bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\n bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\n }\n\n return buffer;\n};\n\nexport const polyUint16Array = (buffer: number[]): number[] => {\n const length = buffer.length;\n const bytes = [];\n for (let i = 0; i < length; i += 2) {\n bytes.push((buffer[i + 1] << 8) | buffer[i]);\n }\n return bytes;\n};\n\nexport const polyUint32Array = (buffer: number[]): number[] => {\n const length = buffer.length;\n const bytes = [];\n for (let i = 0; i < length; i += 4) {\n bytes.push((buffer[i + 3] << 24) | (buffer[i + 2] << 16) | (buffer[i + 1] << 8) | buffer[i]);\n }\n return bytes;\n};\n","import {decode, polyUint16Array, polyUint32Array} from './Util';\n\nexport type int = number;\n\n/** Shift size for getting the index-2 table offset. */\nexport const UTRIE2_SHIFT_2 = 5;\n\n/** Shift size for getting the index-1 table offset. */\nexport const UTRIE2_SHIFT_1 = 6 + 5;\n\n/**\n * Shift size for shifting left the index array values.\n * Increases possible data size with 16-bit index values at the cost\n * of compactability.\n * This requires data blocks to be aligned by UTRIE2_DATA_GRANULARITY.\n */\nexport const UTRIE2_INDEX_SHIFT = 2;\n\n/**\n * Difference between the two shift sizes,\n * for getting an index-1 offset from an index-2 offset. 6=11-5\n */\nexport const UTRIE2_SHIFT_1_2 = UTRIE2_SHIFT_1 - UTRIE2_SHIFT_2;\n\n/**\n * The part of the index-2 table for U+D800..U+DBFF stores values for\n * lead surrogate code _units_ not code _points_.\n * Values for lead surrogate code _points_ are indexed with this portion of the table.\n * Length=32=0x20=0x400>>UTRIE2_SHIFT_2. (There are 1024=0x400 lead surrogates.)\n */\nexport const UTRIE2_LSCP_INDEX_2_OFFSET = 0x10000 >> UTRIE2_SHIFT_2;\n\n/** Number of entries in a data block. 32=0x20 */\nexport const UTRIE2_DATA_BLOCK_LENGTH = 1 << UTRIE2_SHIFT_2;\n/** Mask for getting the lower bits for the in-data-block offset. */\nexport const UTRIE2_DATA_MASK = UTRIE2_DATA_BLOCK_LENGTH - 1;\n\nexport const UTRIE2_LSCP_INDEX_2_LENGTH = 0x400 >> UTRIE2_SHIFT_2;\n/** Count the lengths of both BMP pieces. 2080=0x820 */\nexport const UTRIE2_INDEX_2_BMP_LENGTH = UTRIE2_LSCP_INDEX_2_OFFSET + UTRIE2_LSCP_INDEX_2_LENGTH;\n/**\n * The 2-byte UTF-8 version of the index-2 table follows at offset 2080=0x820.\n * Length 32=0x20 for lead bytes C0..DF, regardless of UTRIE2_SHIFT_2.\n */\nexport const UTRIE2_UTF8_2B_INDEX_2_OFFSET = UTRIE2_INDEX_2_BMP_LENGTH;\nexport const UTRIE2_UTF8_2B_INDEX_2_LENGTH = 0x800 >> 6; /* U+0800 is the first code point after 2-byte UTF-8 */\n/**\n * The index-1 table, only used for supplementary code points, at offset 2112=0x840.\n * Variable length, for code points up to highStart, where the last single-value range starts.\n * Maximum length 512=0x200=0x100000>>UTRIE2_SHIFT_1.\n * (For 0x100000 supplementary code points U+10000..U+10ffff.)\n *\n * The part of the index-2 table for supplementary code points starts\n * after this index-1 table.\n *\n * Both the index-1 table and the following part of the index-2 table\n * are omitted completely if there is only BMP data.\n */\nexport const UTRIE2_INDEX_1_OFFSET = UTRIE2_UTF8_2B_INDEX_2_OFFSET + UTRIE2_UTF8_2B_INDEX_2_LENGTH;\n\n/**\n * Number of index-1 entries for the BMP. 32=0x20\n * This part of the index-1 table is omitted from the serialized form.\n */\nexport const UTRIE2_OMITTED_BMP_INDEX_1_LENGTH = 0x10000 >> UTRIE2_SHIFT_1;\n\n/** Number of entries in an index-2 block. 64=0x40 */\nexport const UTRIE2_INDEX_2_BLOCK_LENGTH = 1 << UTRIE2_SHIFT_1_2;\n/** Mask for getting the lower bits for the in-index-2-block offset. */\nexport const UTRIE2_INDEX_2_MASK = UTRIE2_INDEX_2_BLOCK_LENGTH - 1;\n\nconst slice16 = (view: number[] | Uint16Array, start: number, end?: number) => {\n if (view.slice) {\n return view.slice(start, end);\n }\n\n return new Uint16Array(Array.prototype.slice.call(view, start, end));\n};\n\nconst slice32 = (view: number[] | Uint32Array, start: number, end?: number) => {\n if (view.slice) {\n return view.slice(start, end);\n }\n\n return new Uint32Array(Array.prototype.slice.call(view, start, end));\n};\n\nexport const createTrieFromBase64 = (base64: string, _byteLength: number): Trie => {\n const buffer = decode(base64);\n const view32 = Array.isArray(buffer) ? polyUint32Array(buffer) : new Uint32Array(buffer);\n const view16 = Array.isArray(buffer) ? polyUint16Array(buffer) : new Uint16Array(buffer);\n const headerLength = 24;\n\n const index = slice16(view16, headerLength / 2, view32[4] / 2);\n const data =\n view32[5] === 2\n ? slice16(view16, (headerLength + view32[4]) / 2)\n : slice32(view32, Math.ceil((headerLength + view32[4]) / 4));\n\n return new Trie(view32[0], view32[1], view32[2], view32[3], index, data);\n};\n\nexport class Trie {\n initialValue: int;\n errorValue: int;\n highStart: int;\n highValueIndex: int;\n index: Uint16Array | number[];\n data: Uint32Array | Uint16Array | number[];\n\n constructor(\n initialValue: int,\n errorValue: int,\n highStart: int,\n highValueIndex: int,\n index: Uint16Array | number[],\n data: Uint32Array | Uint16Array | number[]\n ) {\n this.initialValue = initialValue;\n this.errorValue = errorValue;\n this.highStart = highStart;\n this.highValueIndex = highValueIndex;\n this.index = index;\n this.data = data;\n }\n\n /**\n * Get the value for a code point as stored in the Trie.\n *\n * @param codePoint the code point\n * @return the value\n */\n get(codePoint: number): number {\n let ix;\n if (codePoint >= 0) {\n if (codePoint < 0x0d800 || (codePoint > 0x0dbff && codePoint <= 0x0ffff)) {\n // Ordinary BMP code point, excluding leading surrogates.\n // BMP uses a single level lookup. BMP index starts at offset 0 in the Trie2 index.\n // 16 bit data is stored in the index array itself.\n ix = this.index[codePoint >> UTRIE2_SHIFT_2];\n ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);\n return this.data[ix];\n }\n\n if (codePoint <= 0xffff) {\n // Lead Surrogate Code Point. A Separate index section is stored for\n // lead surrogate code units and code points.\n // The main index has the code unit data.\n // For this function, we need the code point data.\n // Note: this expression could be refactored for slightly improved efficiency, but\n // surrogate code points will be so rare in practice that it's not worth it.\n ix = this.index[UTRIE2_LSCP_INDEX_2_OFFSET + ((codePoint - 0xd800) >> UTRIE2_SHIFT_2)];\n ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);\n return this.data[ix];\n }\n\n if (codePoint < this.highStart) {\n // Supplemental code point, use two-level lookup.\n ix = UTRIE2_INDEX_1_OFFSET - UTRIE2_OMITTED_BMP_INDEX_1_LENGTH + (codePoint >> UTRIE2_SHIFT_1);\n ix = this.index[ix];\n ix += (codePoint >> UTRIE2_SHIFT_2) & UTRIE2_INDEX_2_MASK;\n ix = this.index[ix];\n ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);\n return this.data[ix];\n }\n if (codePoint <= 0x10ffff) {\n return this.data[this.highValueIndex];\n }\n }\n\n // Fall through. The code point is outside of the legal range of 0..0x10ffff.\n return this.errorValue;\n }\n}\n","const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\n// Use a lookup table to find the index.\nconst lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);\nfor (let i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n}\n\nexport const encode = (arraybuffer: ArrayBuffer): string => {\n let bytes = new Uint8Array(arraybuffer),\n i,\n len = bytes.length,\n base64 = '';\n\n for (i = 0; i < len; i += 3) {\n base64 += chars[bytes[i] >> 2];\n base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];\n base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];\n base64 += chars[bytes[i + 2] & 63];\n }\n\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + '=';\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + '==';\n }\n\n return base64;\n};\n\nexport const decode = (base64: string): ArrayBuffer => {\n let bufferLength = base64.length * 0.75,\n len = base64.length,\n i,\n p = 0,\n encoded1,\n encoded2,\n encoded3,\n encoded4;\n\n if (base64[base64.length - 1] === '=') {\n bufferLength--;\n if (base64[base64.length - 2] === '=') {\n bufferLength--;\n }\n }\n\n const arraybuffer = new ArrayBuffer(bufferLength),\n bytes = new Uint8Array(arraybuffer);\n\n for (i = 0; i < len; i += 4) {\n encoded1 = lookup[base64.charCodeAt(i)];\n encoded2 = lookup[base64.charCodeAt(i + 1)];\n encoded3 = lookup[base64.charCodeAt(i + 2)];\n encoded4 = lookup[base64.charCodeAt(i + 3)];\n\n bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\n bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\n bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\n }\n\n return arraybuffer;\n};\n","import {base64, byteLength} from './grapheme-break-trie';\nimport {createTrieFromBase64} from 'utrie';\n\nconst Other = 0;\nconst Prepend = 1;\nconst CR = 2;\nconst LF = 3;\nconst Control = 4;\nconst Extend = 5;\nconst Regional_Indicator = 6;\nconst SpacingMark = 7;\nconst L = 8;\nconst V = 9;\nconst T = 10;\nconst LV = 11;\nconst LVT = 12;\nconst ZWJ = 13;\nconst Extended_Pictographic = 14;\nconst RI = 15;\n\nexport const classes: {[key: string]: number} = {\n Other,\n Prepend,\n CR,\n LF,\n Control,\n Extend,\n Regional_Indicator,\n SpacingMark,\n L,\n V,\n T,\n LV,\n LVT,\n ZWJ,\n Extended_Pictographic,\n RI,\n};\n\nexport const toCodePoints = (str: string): number[] => {\n const codePoints = [];\n let i = 0;\n const length = str.length;\n while (i < length) {\n const value = str.charCodeAt(i++);\n if (value >= 0xd800 && value <= 0xdbff && i < length) {\n const extra = str.charCodeAt(i++);\n if ((extra & 0xfc00) === 0xdc00) {\n codePoints.push(((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000);\n } else {\n codePoints.push(value);\n i--;\n }\n } else {\n codePoints.push(value);\n }\n }\n return codePoints;\n};\n\nexport const fromCodePoint = (...codePoints: number[]): string => {\n if (String.fromCodePoint) {\n return String.fromCodePoint(...codePoints);\n }\n\n const length = codePoints.length;\n if (!length) {\n return '';\n }\n\n const codeUnits = [];\n\n let index = -1;\n let result = '';\n while (++index < length) {\n let codePoint = codePoints[index];\n if (codePoint <= 0xffff) {\n codeUnits.push(codePoint);\n } else {\n codePoint -= 0x10000;\n codeUnits.push((codePoint >> 10) + 0xd800, (codePoint % 0x400) + 0xdc00);\n }\n if (index + 1 === length || codeUnits.length > 0x4000) {\n result += String.fromCharCode(...codeUnits);\n codeUnits.length = 0;\n }\n }\n return result;\n};\n\nexport const UnicodeTrie = createTrieFromBase64(base64, byteLength);\n\nexport const BREAK_NOT_ALLOWED = '×';\nexport const BREAK_ALLOWED = '÷';\n\nexport type BREAK_OPPORTUNITIES = typeof BREAK_NOT_ALLOWED | typeof BREAK_ALLOWED;\n\nexport const codePointToClass = (codePoint: number): number => UnicodeTrie.get(codePoint);\n\nconst _graphemeBreakAtIndex = (_codePoints: number[], classTypes: number[], index: number): BREAK_OPPORTUNITIES => {\n let prevIndex = index - 2;\n let prev = classTypes[prevIndex];\n const current = classTypes[index - 1];\n const next = classTypes[index];\n // GB3 Do not break between a CR and LF\n if (current === CR && next === LF) {\n return BREAK_NOT_ALLOWED;\n }\n\n // GB4 Otherwise, break before and after controls.\n if (current === CR || current === LF || current === Control) {\n return BREAK_ALLOWED;\n }\n\n // GB5\n if (next === CR || next === LF || next === Control) {\n return BREAK_ALLOWED;\n }\n\n // Do not break Hangul syllable sequences.\n // GB6\n if (current === L && [L, V, LV, LVT].indexOf(next) !== -1) {\n return BREAK_NOT_ALLOWED;\n }\n\n // GB7\n if ((current === LV || current === V) && (next === V || next === T)) {\n return BREAK_NOT_ALLOWED;\n }\n\n // GB8\n if ((current === LVT || current === T) && next === T) {\n return BREAK_NOT_ALLOWED;\n }\n\n // GB9 Do not break before extending characters or ZWJ.\n if (next === ZWJ || next === Extend) {\n return BREAK_NOT_ALLOWED;\n }\n // Do not break before SpacingMarks, or after Prepend characters.\n // GB9a\n if (next === SpacingMark) {\n return BREAK_NOT_ALLOWED;\n }\n\n // GB9a\n if (current === Prepend) {\n return BREAK_NOT_ALLOWED;\n }\n\n // GB11 Do not break within emoji modifier sequences or emoji zwj sequences.\n if (current === ZWJ && next === Extended_Pictographic) {\n while (prev === Extend) {\n prev = classTypes[--prevIndex];\n }\n if (prev === Extended_Pictographic) {\n return BREAK_NOT_ALLOWED;\n }\n }\n\n // GB12 Do not break within emoji flag sequences.\n // That is, do not break between regional indicator (RI) symbols\n // if there is an odd number of RI characters before the break point.\n if (current === RI && next === RI) {\n let countRI = 0;\n while (prev === RI) {\n countRI++;\n prev = classTypes[--prevIndex];\n }\n if (countRI % 2 === 0) {\n return BREAK_NOT_ALLOWED;\n }\n }\n\n return BREAK_ALLOWED;\n};\n\nexport const graphemeBreakAtIndex = (codePoints: number[], index: number): BREAK_OPPORTUNITIES => {\n // GB1 Break at the start and end of text, unless the text is empty.\n if (index === 0) {\n return BREAK_ALLOWED;\n }\n\n // GB2\n if (index >= codePoints.length) {\n return BREAK_ALLOWED;\n }\n\n const classTypes = codePoints.map(codePointToClass);\n return _graphemeBreakAtIndex(codePoints, classTypes, index);\n};\n\nexport const GraphemeBreaker = (str: string) => {\n const codePoints = toCodePoints(str);\n const length = codePoints.length;\n let index = 0;\n let lastEnd = 0;\n const classTypes = codePoints.map(codePointToClass);\n\n return {\n next: () => {\n if (index >= length) {\n return {done: true, value: null};\n }\n\n let graphemeBreak = BREAK_NOT_ALLOWED;\n while (\n index < length &&\n (graphemeBreak = _graphemeBreakAtIndex(codePoints, classTypes, ++index)) === BREAK_NOT_ALLOWED\n ) {}\n\n if (graphemeBreak !== BREAK_NOT_ALLOWED || index === length) {\n const value = fromCodePoint.apply(null, codePoints.slice(lastEnd, index));\n lastEnd = index;\n return {value, done: false};\n }\n\n return {done: true, value: null};\n while (index < length) {}\n\n return {done: true, value: null};\n },\n };\n};\n\nexport const splitGraphemes = (str: string): string[] => {\n const breaker = GraphemeBreaker(str);\n\n const graphemes = [];\n let bk;\n\n while (!(bk = breaker.next()).done) {\n if (bk.value) {\n graphemes.push(bk.value.slice());\n }\n }\n\n return graphemes;\n};\n","import {fromCodePoint, toCodePoints} from 'css-line-break';\n\nconst testRangeBounds = (document: Document) => {\n const TEST_HEIGHT = 123;\n\n if (document.createRange) {\n const range = document.createRange();\n if (range.getBoundingClientRect) {\n const testElement = document.createElement('boundtest');\n testElement.style.height = `${TEST_HEIGHT}px`;\n testElement.style.display = 'block';\n document.body.appendChild(testElement);\n\n range.selectNode(testElement);\n const rangeBounds = range.getBoundingClientRect();\n const rangeHeight = Math.round(rangeBounds.height);\n document.body.removeChild(testElement);\n if (rangeHeight === TEST_HEIGHT) {\n return true;\n }\n }\n }\n\n return false;\n};\n\nconst testIOSLineBreak = (document: Document) => {\n const testElement = document.createElement('boundtest');\n testElement.style.width = '50px';\n testElement.style.display = 'block';\n testElement.style.fontSize = '12px';\n testElement.style.letterSpacing = '0px';\n testElement.style.wordSpacing = '0px';\n document.body.appendChild(testElement);\n const range = document.createRange();\n\n testElement.innerHTML = typeof ''.repeat === 'function' ? '👨'.repeat(10) : '';\n\n const node = testElement.firstChild as Text;\n\n const textList = toCodePoints(node.data).map((i) => fromCodePoint(i));\n let offset = 0;\n let prev: DOMRect = {} as DOMRect;\n\n // ios 13 does not handle range getBoundingClientRect line changes correctly #2177\n const supports = textList.every((text, i) => {\n range.setStart(node, offset);\n range.setEnd(node, offset + text.length);\n const rect = range.getBoundingClientRect();\n\n offset += text.length;\n const boundAhead = rect.x > prev.x || rect.y > prev.y;\n\n prev = rect;\n if (i === 0) {\n return true;\n }\n\n return boundAhead;\n });\n\n document.body.removeChild(testElement);\n return supports;\n};\n\nconst testCORS = (): boolean => typeof new Image().crossOrigin !== 'undefined';\n\nconst testResponseType = (): boolean => typeof new XMLHttpRequest().responseType === 'string';\n\nconst testSVG = (document: Document): boolean => {\n const img = new Image();\n const canvas = document.createElement('canvas');\n const ctx = canvas.getContext('2d');\n if (!ctx) {\n return false;\n }\n\n img.src = `data:image/svg+xml,`;\n\n try {\n ctx.drawImage(img, 0, 0);\n canvas.toDataURL();\n } catch (e) {\n return false;\n }\n return true;\n};\n\nconst isGreenPixel = (data: Uint8ClampedArray): boolean =>\n data[0] === 0 && data[1] === 255 && data[2] === 0 && data[3] === 255;\n\nconst testForeignObject = (document: Document): Promise => {\n const canvas = document.createElement('canvas');\n const size = 100;\n canvas.width = size;\n canvas.height = size;\n const ctx = canvas.getContext('2d');\n if (!ctx) {\n return Promise.reject(false);\n }\n ctx.fillStyle = 'rgb(0, 255, 0)';\n ctx.fillRect(0, 0, size, size);\n\n const img = new Image();\n const greenImageSrc = canvas.toDataURL();\n img.src = greenImageSrc;\n const svg = createForeignObjectSVG(size, size, 0, 0, img);\n ctx.fillStyle = 'red';\n ctx.fillRect(0, 0, size, size);\n\n return loadSerializedSVG(svg)\n .then((img: HTMLImageElement) => {\n ctx.drawImage(img, 0, 0);\n const data = ctx.getImageData(0, 0, size, size).data;\n ctx.fillStyle = 'red';\n ctx.fillRect(0, 0, size, size);\n\n const node = document.createElement('div');\n node.style.backgroundImage = `url(${greenImageSrc})`;\n node.style.height = `${size}px`;\n // Firefox 55 does not render inline tags\n return isGreenPixel(data)\n ? loadSerializedSVG(createForeignObjectSVG(size, size, 0, 0, node))\n : Promise.reject(false);\n })\n .then((img: HTMLImageElement) => {\n ctx.drawImage(img, 0, 0);\n // Edge does not render background-images\n return isGreenPixel(ctx.getImageData(0, 0, size, size).data);\n })\n .catch(() => false);\n};\n\nexport const createForeignObjectSVG = (\n width: number,\n height: number,\n x: number,\n y: number,\n node: Node\n): SVGForeignObjectElement => {\n const xmlns = 'http://www.w3.org/2000/svg';\n const svg = document.createElementNS(xmlns, 'svg');\n const foreignObject = document.createElementNS(xmlns, 'foreignObject');\n svg.setAttributeNS(null, 'width', width.toString());\n svg.setAttributeNS(null, 'height', height.toString());\n\n foreignObject.setAttributeNS(null, 'width', '100%');\n foreignObject.setAttributeNS(null, 'height', '100%');\n foreignObject.setAttributeNS(null, 'x', x.toString());\n foreignObject.setAttributeNS(null, 'y', y.toString());\n foreignObject.setAttributeNS(null, 'externalResourcesRequired', 'true');\n svg.appendChild(foreignObject);\n\n foreignObject.appendChild(node);\n\n return svg;\n};\n\nexport const loadSerializedSVG = (svg: Node): Promise => {\n return new Promise((resolve, reject) => {\n const img = new Image();\n img.onload = () => resolve(img);\n img.onerror = reject;\n\n img.src = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(new XMLSerializer().serializeToString(svg))}`;\n });\n};\n\nexport const FEATURES = {\n get SUPPORT_RANGE_BOUNDS(): boolean {\n 'use strict';\n const value = testRangeBounds(document);\n Object.defineProperty(FEATURES, 'SUPPORT_RANGE_BOUNDS', {value});\n return value;\n },\n get SUPPORT_WORD_BREAKING(): boolean {\n 'use strict';\n const value = FEATURES.SUPPORT_RANGE_BOUNDS && testIOSLineBreak(document);\n Object.defineProperty(FEATURES, 'SUPPORT_WORD_BREAKING', {value});\n return value;\n },\n get SUPPORT_SVG_DRAWING(): boolean {\n 'use strict';\n const value = testSVG(document);\n Object.defineProperty(FEATURES, 'SUPPORT_SVG_DRAWING', {value});\n return value;\n },\n get SUPPORT_FOREIGNOBJECT_DRAWING(): Promise {\n 'use strict';\n const value =\n typeof Array.from === 'function' && typeof window.fetch === 'function'\n ? testForeignObject(document)\n : Promise.resolve(false);\n Object.defineProperty(FEATURES, 'SUPPORT_FOREIGNOBJECT_DRAWING', {value});\n return value;\n },\n get SUPPORT_CORS_IMAGES(): boolean {\n 'use strict';\n const value = testCORS();\n Object.defineProperty(FEATURES, 'SUPPORT_CORS_IMAGES', {value});\n return value;\n },\n get SUPPORT_RESPONSE_TYPE(): boolean {\n 'use strict';\n const value = testResponseType();\n Object.defineProperty(FEATURES, 'SUPPORT_RESPONSE_TYPE', {value});\n return value;\n },\n get SUPPORT_CORS_XHR(): boolean {\n 'use strict';\n const value = 'withCredentials' in new XMLHttpRequest();\n Object.defineProperty(FEATURES, 'SUPPORT_CORS_XHR', {value});\n return value;\n },\n get SUPPORT_NATIVE_TEXT_SEGMENTATION(): boolean {\n 'use strict';\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const value = !!(typeof Intl !== 'undefined' && (Intl as any).Segmenter);\n Object.defineProperty(FEATURES, 'SUPPORT_NATIVE_TEXT_SEGMENTATION', {value});\n return value;\n }\n};\n","import {OVERFLOW_WRAP} from '../property-descriptors/overflow-wrap';\nimport {CSSParsedDeclaration} from '../index';\nimport {fromCodePoint, LineBreaker, toCodePoints} from 'css-line-break';\nimport {splitGraphemes} from 'text-segmentation';\nimport {Bounds, parseBounds} from './bounds';\nimport {FEATURES} from '../../core/features';\nimport {Context} from '../../core/context';\n\nexport class TextBounds {\n readonly text: string;\n readonly bounds: Bounds;\n\n constructor(text: string, bounds: Bounds) {\n this.text = text;\n this.bounds = bounds;\n }\n}\n\nexport const parseTextBounds = (\n context: Context,\n value: string,\n styles: CSSParsedDeclaration,\n node: Text\n): TextBounds[] => {\n const textList = breakText(value, styles);\n const textBounds: TextBounds[] = [];\n let offset = 0;\n textList.forEach((text) => {\n if (styles.textDecorationLine.length || text.trim().length > 0) {\n if (FEATURES.SUPPORT_RANGE_BOUNDS) {\n const clientRects = createRange(node, offset, text.length).getClientRects();\n if (clientRects.length > 1) {\n const subSegments = segmentGraphemes(text);\n let subOffset = 0;\n subSegments.forEach((subSegment) => {\n textBounds.push(\n new TextBounds(\n subSegment,\n Bounds.fromDOMRectList(\n context,\n createRange(node, subOffset + offset, subSegment.length).getClientRects()\n )\n )\n );\n subOffset += subSegment.length;\n });\n } else {\n textBounds.push(new TextBounds(text, Bounds.fromDOMRectList(context, clientRects)));\n }\n } else {\n const replacementNode = node.splitText(text.length);\n textBounds.push(new TextBounds(text, getWrapperBounds(context, node)));\n node = replacementNode;\n }\n } else if (!FEATURES.SUPPORT_RANGE_BOUNDS) {\n node = node.splitText(text.length);\n }\n offset += text.length;\n });\n\n return textBounds;\n};\n\nconst getWrapperBounds = (context: Context, node: Text): Bounds => {\n const ownerDocument = node.ownerDocument;\n if (ownerDocument) {\n const wrapper = ownerDocument.createElement('html2canvaswrapper');\n wrapper.appendChild(node.cloneNode(true));\n const parentNode = node.parentNode;\n if (parentNode) {\n parentNode.replaceChild(wrapper, node);\n const bounds = parseBounds(context, wrapper);\n if (wrapper.firstChild) {\n parentNode.replaceChild(wrapper.firstChild, wrapper);\n }\n return bounds;\n }\n }\n\n return Bounds.EMPTY;\n};\n\nconst createRange = (node: Text, offset: number, length: number): Range => {\n const ownerDocument = node.ownerDocument;\n if (!ownerDocument) {\n throw new Error('Node has no owner document');\n }\n const range = ownerDocument.createRange();\n range.setStart(node, offset);\n range.setEnd(node, offset + length);\n return range;\n};\n\nexport const segmentGraphemes = (value: string): string[] => {\n if (FEATURES.SUPPORT_NATIVE_TEXT_SEGMENTATION) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const segmenter = new (Intl as any).Segmenter(void 0, {granularity: 'grapheme'});\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return Array.from(segmenter.segment(value)).map((segment: any) => segment.segment);\n }\n\n return splitGraphemes(value);\n};\n\nconst segmentWords = (value: string, styles: CSSParsedDeclaration): string[] => {\n if (FEATURES.SUPPORT_NATIVE_TEXT_SEGMENTATION) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const segmenter = new (Intl as any).Segmenter(void 0, {\n granularity: 'word'\n });\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return Array.from(segmenter.segment(value)).map((segment: any) => segment.segment);\n }\n\n return breakWords(value, styles);\n};\n\nconst breakText = (value: string, styles: CSSParsedDeclaration): string[] => {\n return styles.letterSpacing !== 0 ? segmentGraphemes(value) : segmentWords(value, styles);\n};\n\n// https://drafts.csswg.org/css-text/#word-separator\nconst wordSeparators = [0x0020, 0x00a0, 0x1361, 0x10100, 0x10101, 0x1039, 0x1091];\n\nconst breakWords = (str: string, styles: CSSParsedDeclaration): string[] => {\n const breaker = LineBreaker(str, {\n lineBreak: styles.lineBreak,\n wordBreak: styles.overflowWrap === OVERFLOW_WRAP.BREAK_WORD ? 'break-word' : styles.wordBreak\n });\n\n const words = [];\n let bk;\n\n while (!(bk = breaker.next()).done) {\n if (bk.value) {\n const value = bk.value.slice();\n const codePoints = toCodePoints(value);\n let word = '';\n codePoints.forEach((codePoint) => {\n if (wordSeparators.indexOf(codePoint) === -1) {\n word += fromCodePoint(codePoint);\n } else {\n if (word.length) {\n words.push(word);\n }\n words.push(fromCodePoint(codePoint));\n word = '';\n }\n });\n\n if (word.length) {\n words.push(word);\n }\n }\n }\n\n return words;\n};\n","import {CSSParsedDeclaration} from '../css/index';\nimport {TEXT_TRANSFORM} from '../css/property-descriptors/text-transform';\nimport {parseTextBounds, TextBounds} from '../css/layout/text';\nimport {Context} from '../core/context';\n\nexport class TextContainer {\n text: string;\n textBounds: TextBounds[];\n\n constructor(context: Context, node: Text, styles: CSSParsedDeclaration) {\n this.text = transform(node.data, styles.textTransform);\n this.textBounds = parseTextBounds(context, this.text, styles, node);\n }\n}\n\nconst transform = (text: string, transform: TEXT_TRANSFORM) => {\n switch (transform) {\n case TEXT_TRANSFORM.LOWERCASE:\n return text.toLowerCase();\n case TEXT_TRANSFORM.CAPITALIZE:\n return text.replace(CAPITALIZE, capitalize);\n case TEXT_TRANSFORM.UPPERCASE:\n return text.toUpperCase();\n default:\n return text;\n }\n};\n\nconst CAPITALIZE = /(^|\\s|:|-|\\(|\\))([a-z])/g;\n\nconst capitalize = (m: string, p1: string, p2: string) => {\n if (m.length > 0) {\n return p1 + p2.toUpperCase();\n }\n\n return m;\n};\n","import {ElementContainer} from '../element-container';\nimport {Context} from '../../core/context';\n\nexport class ImageElementContainer extends ElementContainer {\n src: string;\n intrinsicWidth: number;\n intrinsicHeight: number;\n\n constructor(context: Context, img: HTMLImageElement) {\n super(context, img);\n this.src = img.currentSrc || img.src;\n this.intrinsicWidth = img.naturalWidth;\n this.intrinsicHeight = img.naturalHeight;\n this.context.cache.addImage(this.src);\n }\n}\n","import {ElementContainer} from '../element-container';\nimport {Context} from '../../core/context';\n\nexport class CanvasElementContainer extends ElementContainer {\n canvas: HTMLCanvasElement;\n intrinsicWidth: number;\n intrinsicHeight: number;\n\n constructor(context: Context, canvas: HTMLCanvasElement) {\n super(context, canvas);\n this.canvas = canvas;\n this.intrinsicWidth = canvas.width;\n this.intrinsicHeight = canvas.height;\n }\n}\n","import {ElementContainer} from '../element-container';\nimport {parseBounds} from '../../css/layout/bounds';\nimport {Context} from '../../core/context';\n\nexport class SVGElementContainer extends ElementContainer {\n svg: string;\n intrinsicWidth: number;\n intrinsicHeight: number;\n\n constructor(context: Context, img: SVGSVGElement) {\n super(context, img);\n const s = new XMLSerializer();\n const bounds = parseBounds(context, img);\n img.setAttribute('width', `${bounds.width}px`);\n img.setAttribute('height', `${bounds.height}px`);\n\n this.svg = `data:image/svg+xml,${encodeURIComponent(s.serializeToString(img))}`;\n this.intrinsicWidth = img.width.baseVal.value;\n this.intrinsicHeight = img.height.baseVal.value;\n\n this.context.cache.addImage(this.svg);\n }\n}\n","import {ElementContainer} from '../element-container';\nimport {Context} from '../../core/context';\nexport class LIElementContainer extends ElementContainer {\n readonly value: number;\n\n constructor(context: Context, element: HTMLLIElement) {\n super(context, element);\n this.value = element.value;\n }\n}\n","import {ElementContainer} from '../element-container';\nimport {Context} from '../../core/context';\nexport class OLElementContainer extends ElementContainer {\n readonly start: number;\n readonly reversed: boolean;\n\n constructor(context: Context, element: HTMLOListElement) {\n super(context, element);\n this.start = element.start;\n this.reversed = typeof element.reversed === 'boolean' && element.reversed === true;\n }\n}\n","import {ElementContainer} from '../element-container';\nimport {BORDER_STYLE} from '../../css/property-descriptors/border-style';\nimport {BACKGROUND_CLIP} from '../../css/property-descriptors/background-clip';\nimport {BACKGROUND_ORIGIN} from '../../css/property-descriptors/background-origin';\nimport {TokenType} from '../../css/syntax/tokenizer';\nimport {LengthPercentageTuple} from '../../css/types/length-percentage';\nimport {Bounds} from '../../css/layout/bounds';\nimport {Context} from '../../core/context';\n\nconst CHECKBOX_BORDER_RADIUS: LengthPercentageTuple = [\n {\n type: TokenType.DIMENSION_TOKEN,\n flags: 0,\n unit: 'px',\n number: 3\n }\n];\n\nconst RADIO_BORDER_RADIUS: LengthPercentageTuple = [\n {\n type: TokenType.PERCENTAGE_TOKEN,\n flags: 0,\n number: 50\n }\n];\n\nconst reformatInputBounds = (bounds: Bounds): Bounds => {\n if (bounds.width > bounds.height) {\n return new Bounds(bounds.left + (bounds.width - bounds.height) / 2, bounds.top, bounds.height, bounds.height);\n } else if (bounds.width < bounds.height) {\n return new Bounds(bounds.left, bounds.top + (bounds.height - bounds.width) / 2, bounds.width, bounds.width);\n }\n return bounds;\n};\n\nconst getInputValue = (node: HTMLInputElement): string => {\n const value = node.type === PASSWORD ? new Array(node.value.length + 1).join('\\u2022') : node.value;\n\n return value.length === 0 ? node.placeholder || '' : value;\n};\n\nexport const CHECKBOX = 'checkbox';\nexport const RADIO = 'radio';\nexport const PASSWORD = 'password';\nexport const INPUT_COLOR = 0x2a2a2aff;\n\nexport class InputElementContainer extends ElementContainer {\n readonly type: string;\n readonly checked: boolean;\n readonly value: string;\n\n constructor(context: Context, input: HTMLInputElement) {\n super(context, input);\n this.type = input.type.toLowerCase();\n this.checked = input.checked;\n this.value = getInputValue(input);\n\n if (this.type === CHECKBOX || this.type === RADIO) {\n this.styles.backgroundColor = 0xdededeff;\n this.styles.borderTopColor =\n this.styles.borderRightColor =\n this.styles.borderBottomColor =\n this.styles.borderLeftColor =\n 0xa5a5a5ff;\n this.styles.borderTopWidth =\n this.styles.borderRightWidth =\n this.styles.borderBottomWidth =\n this.styles.borderLeftWidth =\n 1;\n this.styles.borderTopStyle =\n this.styles.borderRightStyle =\n this.styles.borderBottomStyle =\n this.styles.borderLeftStyle =\n BORDER_STYLE.SOLID;\n this.styles.backgroundClip = [BACKGROUND_CLIP.BORDER_BOX];\n this.styles.backgroundOrigin = [BACKGROUND_ORIGIN.BORDER_BOX];\n this.bounds = reformatInputBounds(this.bounds);\n }\n\n switch (this.type) {\n case CHECKBOX:\n this.styles.borderTopRightRadius =\n this.styles.borderTopLeftRadius =\n this.styles.borderBottomRightRadius =\n this.styles.borderBottomLeftRadius =\n CHECKBOX_BORDER_RADIUS;\n break;\n case RADIO:\n this.styles.borderTopRightRadius =\n this.styles.borderTopLeftRadius =\n this.styles.borderBottomRightRadius =\n this.styles.borderBottomLeftRadius =\n RADIO_BORDER_RADIUS;\n break;\n }\n }\n}\n","import {ElementContainer} from '../element-container';\nimport {Context} from '../../core/context';\nexport class SelectElementContainer extends ElementContainer {\n readonly value: string;\n constructor(context: Context, element: HTMLSelectElement) {\n super(context, element);\n const option = element.options[element.selectedIndex || 0];\n this.value = option ? option.text || '' : '';\n }\n}\n","import {ElementContainer} from '../element-container';\nimport {Context} from '../../core/context';\nexport class TextareaElementContainer extends ElementContainer {\n readonly value: string;\n constructor(context: Context, element: HTMLTextAreaElement) {\n super(context, element);\n this.value = element.value;\n }\n}\n","import {ElementContainer} from '../element-container';\nimport {parseTree} from '../node-parser';\nimport {Color, parseColor, COLORS, isTransparent} from '../../css/types/color';\nimport {Context} from '../../core/context';\n\nexport class IFrameElementContainer extends ElementContainer {\n src: string;\n width: number;\n height: number;\n tree?: ElementContainer;\n backgroundColor: Color;\n\n constructor(context: Context, iframe: HTMLIFrameElement) {\n super(context, iframe);\n this.src = iframe.src;\n this.width = parseInt(iframe.width, 10) || 0;\n this.height = parseInt(iframe.height, 10) || 0;\n this.backgroundColor = this.styles.backgroundColor;\n try {\n if (\n iframe.contentWindow &&\n iframe.contentWindow.document &&\n iframe.contentWindow.document.documentElement\n ) {\n this.tree = parseTree(context, iframe.contentWindow.document.documentElement);\n\n // http://www.w3.org/TR/css3-background/#special-backgrounds\n const documentBackgroundColor = iframe.contentWindow.document.documentElement\n ? parseColor(\n context,\n getComputedStyle(iframe.contentWindow.document.documentElement).backgroundColor as string\n )\n : COLORS.TRANSPARENT;\n const bodyBackgroundColor = iframe.contentWindow.document.body\n ? parseColor(\n context,\n getComputedStyle(iframe.contentWindow.document.body).backgroundColor as string\n )\n : COLORS.TRANSPARENT;\n\n this.backgroundColor = isTransparent(documentBackgroundColor)\n ? isTransparent(bodyBackgroundColor)\n ? this.styles.backgroundColor\n : bodyBackgroundColor\n : documentBackgroundColor;\n }\n } catch (e) {}\n }\n}\n","import {CSSParsedDeclaration} from '../css';\nimport {ElementContainer, FLAGS} from './element-container';\nimport {TextContainer} from './text-container';\nimport {ImageElementContainer} from './replaced-elements/image-element-container';\nimport {CanvasElementContainer} from './replaced-elements/canvas-element-container';\nimport {SVGElementContainer} from './replaced-elements/svg-element-container';\nimport {LIElementContainer} from './elements/li-element-container';\nimport {OLElementContainer} from './elements/ol-element-container';\nimport {InputElementContainer} from './replaced-elements/input-element-container';\nimport {SelectElementContainer} from './elements/select-element-container';\nimport {TextareaElementContainer} from './elements/textarea-element-container';\nimport {IFrameElementContainer} from './replaced-elements/iframe-element-container';\nimport {Context} from '../core/context';\n\nconst LIST_OWNERS = ['OL', 'UL', 'MENU'];\n\nconst parseNodeTree = (context: Context, node: Node, parent: ElementContainer, root: ElementContainer) => {\n for (let childNode = node.firstChild, nextNode; childNode; childNode = nextNode) {\n nextNode = childNode.nextSibling;\n\n if (isTextNode(childNode) && childNode.data.trim().length > 0) {\n parent.textNodes.push(new TextContainer(context, childNode, parent.styles));\n } else if (isElementNode(childNode)) {\n if (isSlotElement(childNode) && childNode.assignedNodes) {\n childNode.assignedNodes().forEach((childNode) => parseNodeTree(context, childNode, parent, root));\n } else {\n const container = createContainer(context, childNode);\n if (container.styles.isVisible()) {\n if (createsRealStackingContext(childNode, container, root)) {\n container.flags |= FLAGS.CREATES_REAL_STACKING_CONTEXT;\n } else if (createsStackingContext(container.styles)) {\n container.flags |= FLAGS.CREATES_STACKING_CONTEXT;\n }\n\n if (LIST_OWNERS.indexOf(childNode.tagName) !== -1) {\n container.flags |= FLAGS.IS_LIST_OWNER;\n }\n\n parent.elements.push(container);\n childNode.slot;\n if (childNode.shadowRoot) {\n parseNodeTree(context, childNode.shadowRoot, container, root);\n } else if (\n !isTextareaElement(childNode) &&\n !isSVGElement(childNode) &&\n !isSelectElement(childNode)\n ) {\n parseNodeTree(context, childNode, container, root);\n }\n }\n }\n }\n }\n};\n\nconst createContainer = (context: Context, element: Element): ElementContainer => {\n if (isImageElement(element)) {\n return new ImageElementContainer(context, element);\n }\n\n if (isCanvasElement(element)) {\n return new CanvasElementContainer(context, element);\n }\n\n if (isSVGElement(element)) {\n return new SVGElementContainer(context, element);\n }\n\n if (isLIElement(element)) {\n return new LIElementContainer(context, element);\n }\n\n if (isOLElement(element)) {\n return new OLElementContainer(context, element);\n }\n\n if (isInputElement(element)) {\n return new InputElementContainer(context, element);\n }\n\n if (isSelectElement(element)) {\n return new SelectElementContainer(context, element);\n }\n\n if (isTextareaElement(element)) {\n return new TextareaElementContainer(context, element);\n }\n\n if (isIFrameElement(element)) {\n return new IFrameElementContainer(context, element);\n }\n\n return new ElementContainer(context, element);\n};\n\nexport const parseTree = (context: Context, element: HTMLElement): ElementContainer => {\n const container = createContainer(context, element);\n container.flags |= FLAGS.CREATES_REAL_STACKING_CONTEXT;\n parseNodeTree(context, element, container, container);\n return container;\n};\n\nconst createsRealStackingContext = (node: Element, container: ElementContainer, root: ElementContainer): boolean => {\n return (\n container.styles.isPositionedWithZIndex() ||\n container.styles.opacity < 1 ||\n container.styles.isTransformed() ||\n (isBodyElement(node) && root.styles.isTransparent())\n );\n};\n\nconst createsStackingContext = (styles: CSSParsedDeclaration): boolean => styles.isPositioned() || styles.isFloating();\n\nexport const isTextNode = (node: Node): node is Text => node.nodeType === Node.TEXT_NODE;\nexport const isElementNode = (node: Node): node is Element => node.nodeType === Node.ELEMENT_NODE;\nexport const isHTMLElementNode = (node: Node): node is HTMLElement =>\n isElementNode(node) && typeof (node as HTMLElement).style !== 'undefined' && !isSVGElementNode(node);\nexport const isSVGElementNode = (element: Element): element is SVGElement =>\n typeof (element as SVGElement).className === 'object';\nexport const isLIElement = (node: Element): node is HTMLLIElement => node.tagName === 'LI';\nexport const isOLElement = (node: Element): node is HTMLOListElement => node.tagName === 'OL';\nexport const isInputElement = (node: Element): node is HTMLInputElement => node.tagName === 'INPUT';\nexport const isHTMLElement = (node: Element): node is HTMLHtmlElement => node.tagName === 'HTML';\nexport const isSVGElement = (node: Element): node is SVGSVGElement => node.tagName === 'svg';\nexport const isBodyElement = (node: Element): node is HTMLBodyElement => node.tagName === 'BODY';\nexport const isCanvasElement = (node: Element): node is HTMLCanvasElement => node.tagName === 'CANVAS';\nexport const isVideoElement = (node: Element): node is HTMLVideoElement => node.tagName === 'VIDEO';\nexport const isImageElement = (node: Element): node is HTMLImageElement => node.tagName === 'IMG';\nexport const isIFrameElement = (node: Element): node is HTMLIFrameElement => node.tagName === 'IFRAME';\nexport const isStyleElement = (node: Element): node is HTMLStyleElement => node.tagName === 'STYLE';\nexport const isScriptElement = (node: Element): node is HTMLScriptElement => node.tagName === 'SCRIPT';\nexport const isTextareaElement = (node: Element): node is HTMLTextAreaElement => node.tagName === 'TEXTAREA';\nexport const isSelectElement = (node: Element): node is HTMLSelectElement => node.tagName === 'SELECT';\nexport const isSlotElement = (node: Element): node is HTMLSlotElement => node.tagName === 'SLOT';\n// https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name\nexport const isCustomElement = (node: Element): node is HTMLElement => node.tagName.indexOf('-') > 0;\n","import {LIST_STYLE_TYPE} from '../../property-descriptors/list-style-type';\nimport {fromCodePoint} from 'css-line-break';\nimport {contains} from '../../../core/bitwise';\nimport {CSSParsedCounterDeclaration} from '../../index';\n\nexport class CounterState {\n private readonly counters: {[key: string]: number[]} = {};\n\n getCounterValue(name: string): number {\n const counter = this.counters[name];\n\n if (counter && counter.length) {\n return counter[counter.length - 1];\n }\n return 1;\n }\n\n getCounterValues(name: string): readonly number[] {\n const counter = this.counters[name];\n return counter ? counter : [];\n }\n\n pop(counters: string[]): void {\n counters.forEach((counter) => this.counters[counter].pop());\n }\n\n parse(style: CSSParsedCounterDeclaration): string[] {\n const counterIncrement = style.counterIncrement;\n const counterReset = style.counterReset;\n let canReset = true;\n\n if (counterIncrement !== null) {\n counterIncrement.forEach((entry) => {\n const counter = this.counters[entry.counter];\n if (counter && entry.increment !== 0) {\n canReset = false;\n if (!counter.length) {\n counter.push(1);\n }\n counter[Math.max(0, counter.length - 1)] += entry.increment;\n }\n });\n }\n\n const counterNames: string[] = [];\n if (canReset) {\n counterReset.forEach((entry) => {\n let counter = this.counters[entry.counter];\n counterNames.push(entry.counter);\n if (!counter) {\n counter = this.counters[entry.counter] = [];\n }\n counter.push(entry.reset);\n });\n }\n\n return counterNames;\n }\n}\n\ninterface CounterSymbols {\n integers: number[];\n values: string[];\n}\n\nconst ROMAN_UPPER: CounterSymbols = {\n integers: [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1],\n values: ['M', 'CM', 'D', 'CD', 'C', 'XC', 'L', 'XL', 'X', 'IX', 'V', 'IV', 'I']\n};\n\nconst ARMENIAN: CounterSymbols = {\n integers: [\n 9000, 8000, 7000, 6000, 5000, 4000, 3000, 2000, 1000, 900, 800, 700, 600, 500, 400, 300, 200, 100, 90, 80, 70,\n 60, 50, 40, 30, 20, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1\n ],\n values: [\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\nconst HEBREW: CounterSymbols = {\n integers: [\n 10000, 9000, 8000, 7000, 6000, 5000, 4000, 3000, 2000, 1000, 400, 300, 200, 100, 90, 80, 70, 60, 50, 40, 30, 20,\n 19, 18, 17, 16, 15, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1\n ],\n values: [\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\nconst GEORGIAN: CounterSymbols = {\n integers: [\n 10000, 9000, 8000, 7000, 6000, 5000, 4000, 3000, 2000, 1000, 900, 800, 700, 600, 500, 400, 300, 200, 100, 90,\n 80, 70, 60, 50, 40, 30, 20, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1\n ],\n values: [\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\nconst createAdditiveCounter = (\n value: number,\n min: number,\n max: number,\n symbols: CounterSymbols,\n fallback: LIST_STYLE_TYPE,\n suffix: string\n) => {\n if (value < min || value > max) {\n return createCounterText(value, fallback, suffix.length > 0);\n }\n\n return (\n symbols.integers.reduce((string, integer, index) => {\n while (value >= integer) {\n value -= integer;\n string += symbols.values[index];\n }\n return string;\n }, '') + suffix\n );\n};\n\nconst createCounterStyleWithSymbolResolver = (\n value: number,\n codePointRangeLength: number,\n isNumeric: boolean,\n resolver: (codePoint: number) => string\n): string => {\n let string = '';\n\n do {\n if (!isNumeric) {\n value--;\n }\n string = resolver(value) + string;\n value /= codePointRangeLength;\n } while (value * codePointRangeLength >= codePointRangeLength);\n\n return string;\n};\n\nconst createCounterStyleFromRange = (\n value: number,\n codePointRangeStart: number,\n codePointRangeEnd: number,\n isNumeric: boolean,\n suffix: string\n): string => {\n const codePointRangeLength = codePointRangeEnd - codePointRangeStart + 1;\n\n return (\n (value < 0 ? '-' : '') +\n (createCounterStyleWithSymbolResolver(Math.abs(value), codePointRangeLength, isNumeric, (codePoint) =>\n fromCodePoint(Math.floor(codePoint % codePointRangeLength) + codePointRangeStart)\n ) +\n suffix)\n );\n};\n\nconst createCounterStyleFromSymbols = (value: number, symbols: string, suffix = '. '): string => {\n const codePointRangeLength = symbols.length;\n return (\n createCounterStyleWithSymbolResolver(\n Math.abs(value),\n codePointRangeLength,\n false,\n (codePoint) => symbols[Math.floor(codePoint % codePointRangeLength)]\n ) + suffix\n );\n};\n\nconst CJK_ZEROS = 1 << 0;\nconst CJK_TEN_COEFFICIENTS = 1 << 1;\nconst CJK_TEN_HIGH_COEFFICIENTS = 1 << 2;\nconst CJK_HUNDRED_COEFFICIENTS = 1 << 3;\n\nconst createCJKCounter = (\n value: number,\n numbers: string,\n multipliers: string,\n negativeSign: string,\n suffix: string,\n flags: number\n): string => {\n if (value < -9999 || value > 9999) {\n return createCounterText(value, LIST_STYLE_TYPE.CJK_DECIMAL, suffix.length > 0);\n }\n let tmp = Math.abs(value);\n let string = suffix;\n\n if (tmp === 0) {\n return numbers[0] + string;\n }\n\n for (let digit = 0; tmp > 0 && digit <= 4; digit++) {\n const coefficient = tmp % 10;\n\n if (coefficient === 0 && contains(flags, CJK_ZEROS) && string !== '') {\n string = numbers[coefficient] + string;\n } else if (\n coefficient > 1 ||\n (coefficient === 1 && digit === 0) ||\n (coefficient === 1 && digit === 1 && contains(flags, CJK_TEN_COEFFICIENTS)) ||\n (coefficient === 1 && digit === 1 && contains(flags, CJK_TEN_HIGH_COEFFICIENTS) && value > 100) ||\n (coefficient === 1 && digit > 1 && contains(flags, CJK_HUNDRED_COEFFICIENTS))\n ) {\n string = numbers[coefficient] + (digit > 0 ? multipliers[digit - 1] : '') + string;\n } else if (coefficient === 1 && digit > 0) {\n string = multipliers[digit - 1] + string;\n }\n tmp = Math.floor(tmp / 10);\n }\n\n return (value < 0 ? negativeSign : '') + string;\n};\n\nconst CHINESE_INFORMAL_MULTIPLIERS = '十百千萬';\nconst CHINESE_FORMAL_MULTIPLIERS = '拾佰仟萬';\nconst JAPANESE_NEGATIVE = 'マイナス';\nconst KOREAN_NEGATIVE = '마이너스';\n\nexport const createCounterText = (value: number, type: LIST_STYLE_TYPE, appendSuffix: boolean): string => {\n const defaultSuffix = appendSuffix ? '. ' : '';\n const cjkSuffix = appendSuffix ? '、' : '';\n const koreanSuffix = appendSuffix ? ', ' : '';\n const spaceSuffix = appendSuffix ? ' ' : '';\n switch (type) {\n case LIST_STYLE_TYPE.DISC:\n return '•' + spaceSuffix;\n case LIST_STYLE_TYPE.CIRCLE:\n return '◦' + spaceSuffix;\n case LIST_STYLE_TYPE.SQUARE:\n return '◾' + spaceSuffix;\n case LIST_STYLE_TYPE.DECIMAL_LEADING_ZERO:\n const string = createCounterStyleFromRange(value, 48, 57, true, defaultSuffix);\n return string.length < 4 ? `0${string}` : string;\n case LIST_STYLE_TYPE.CJK_DECIMAL:\n return createCounterStyleFromSymbols(value, '〇一二三四五六七八九', cjkSuffix);\n case LIST_STYLE_TYPE.LOWER_ROMAN:\n return createAdditiveCounter(\n value,\n 1,\n 3999,\n ROMAN_UPPER,\n LIST_STYLE_TYPE.DECIMAL,\n defaultSuffix\n ).toLowerCase();\n case LIST_STYLE_TYPE.UPPER_ROMAN:\n return createAdditiveCounter(value, 1, 3999, ROMAN_UPPER, LIST_STYLE_TYPE.DECIMAL, defaultSuffix);\n case LIST_STYLE_TYPE.LOWER_GREEK:\n return createCounterStyleFromRange(value, 945, 969, false, defaultSuffix);\n case LIST_STYLE_TYPE.LOWER_ALPHA:\n return createCounterStyleFromRange(value, 97, 122, false, defaultSuffix);\n case LIST_STYLE_TYPE.UPPER_ALPHA:\n return createCounterStyleFromRange(value, 65, 90, false, defaultSuffix);\n case LIST_STYLE_TYPE.ARABIC_INDIC:\n return createCounterStyleFromRange(value, 1632, 1641, true, defaultSuffix);\n case LIST_STYLE_TYPE.ARMENIAN:\n case LIST_STYLE_TYPE.UPPER_ARMENIAN:\n return createAdditiveCounter(value, 1, 9999, ARMENIAN, LIST_STYLE_TYPE.DECIMAL, defaultSuffix);\n case LIST_STYLE_TYPE.LOWER_ARMENIAN:\n return createAdditiveCounter(\n value,\n 1,\n 9999,\n ARMENIAN,\n LIST_STYLE_TYPE.DECIMAL,\n defaultSuffix\n ).toLowerCase();\n case LIST_STYLE_TYPE.BENGALI:\n return createCounterStyleFromRange(value, 2534, 2543, true, defaultSuffix);\n case LIST_STYLE_TYPE.CAMBODIAN:\n case LIST_STYLE_TYPE.KHMER:\n return createCounterStyleFromRange(value, 6112, 6121, true, defaultSuffix);\n case LIST_STYLE_TYPE.CJK_EARTHLY_BRANCH:\n return createCounterStyleFromSymbols(value, '子丑寅卯辰巳午未申酉戌亥', cjkSuffix);\n case LIST_STYLE_TYPE.CJK_HEAVENLY_STEM:\n return createCounterStyleFromSymbols(value, '甲乙丙丁戊己庚辛壬癸', cjkSuffix);\n case LIST_STYLE_TYPE.CJK_IDEOGRAPHIC:\n case LIST_STYLE_TYPE.TRAD_CHINESE_INFORMAL:\n return createCJKCounter(\n value,\n '零一二三四五六七八九',\n CHINESE_INFORMAL_MULTIPLIERS,\n '負',\n cjkSuffix,\n CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | CJK_HUNDRED_COEFFICIENTS\n );\n case LIST_STYLE_TYPE.TRAD_CHINESE_FORMAL:\n return createCJKCounter(\n value,\n '零壹貳參肆伍陸柒捌玖',\n CHINESE_FORMAL_MULTIPLIERS,\n '負',\n cjkSuffix,\n CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | CJK_HUNDRED_COEFFICIENTS\n );\n case LIST_STYLE_TYPE.SIMP_CHINESE_INFORMAL:\n return createCJKCounter(\n value,\n '零一二三四五六七八九',\n CHINESE_INFORMAL_MULTIPLIERS,\n '负',\n cjkSuffix,\n CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | CJK_HUNDRED_COEFFICIENTS\n );\n case LIST_STYLE_TYPE.SIMP_CHINESE_FORMAL:\n return createCJKCounter(\n value,\n '零壹贰叁肆伍陆柒捌玖',\n CHINESE_FORMAL_MULTIPLIERS,\n '负',\n cjkSuffix,\n CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | CJK_HUNDRED_COEFFICIENTS\n );\n case LIST_STYLE_TYPE.JAPANESE_INFORMAL:\n return createCJKCounter(value, '〇一二三四五六七八九', '十百千万', JAPANESE_NEGATIVE, cjkSuffix, 0);\n case LIST_STYLE_TYPE.JAPANESE_FORMAL:\n return createCJKCounter(\n value,\n '零壱弐参四伍六七八九',\n '拾百千万',\n JAPANESE_NEGATIVE,\n cjkSuffix,\n CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS\n );\n case LIST_STYLE_TYPE.KOREAN_HANGUL_FORMAL:\n return createCJKCounter(\n value,\n '영일이삼사오육칠팔구',\n '십백천만',\n KOREAN_NEGATIVE,\n koreanSuffix,\n CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS\n );\n case LIST_STYLE_TYPE.KOREAN_HANJA_INFORMAL:\n return createCJKCounter(value, '零一二三四五六七八九', '十百千萬', KOREAN_NEGATIVE, koreanSuffix, 0);\n case LIST_STYLE_TYPE.KOREAN_HANJA_FORMAL:\n return createCJKCounter(\n value,\n '零壹貳參四五六七八九',\n '拾百千',\n KOREAN_NEGATIVE,\n koreanSuffix,\n CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS\n );\n case LIST_STYLE_TYPE.DEVANAGARI:\n return createCounterStyleFromRange(value, 0x966, 0x96f, true, defaultSuffix);\n case LIST_STYLE_TYPE.GEORGIAN:\n return createAdditiveCounter(value, 1, 19999, GEORGIAN, LIST_STYLE_TYPE.DECIMAL, defaultSuffix);\n case LIST_STYLE_TYPE.GUJARATI:\n return createCounterStyleFromRange(value, 0xae6, 0xaef, true, defaultSuffix);\n case LIST_STYLE_TYPE.GURMUKHI:\n return createCounterStyleFromRange(value, 0xa66, 0xa6f, true, defaultSuffix);\n case LIST_STYLE_TYPE.HEBREW:\n return createAdditiveCounter(value, 1, 10999, HEBREW, LIST_STYLE_TYPE.DECIMAL, defaultSuffix);\n case LIST_STYLE_TYPE.HIRAGANA:\n return createCounterStyleFromSymbols(\n value,\n 'あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん'\n );\n case LIST_STYLE_TYPE.HIRAGANA_IROHA:\n return createCounterStyleFromSymbols(\n value,\n 'いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす'\n );\n case LIST_STYLE_TYPE.KANNADA:\n return createCounterStyleFromRange(value, 0xce6, 0xcef, true, defaultSuffix);\n case LIST_STYLE_TYPE.KATAKANA:\n return createCounterStyleFromSymbols(\n value,\n 'アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン',\n cjkSuffix\n );\n case LIST_STYLE_TYPE.KATAKANA_IROHA:\n return createCounterStyleFromSymbols(\n value,\n 'イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス',\n cjkSuffix\n );\n case LIST_STYLE_TYPE.LAO:\n return createCounterStyleFromRange(value, 0xed0, 0xed9, true, defaultSuffix);\n case LIST_STYLE_TYPE.MONGOLIAN:\n return createCounterStyleFromRange(value, 0x1810, 0x1819, true, defaultSuffix);\n case LIST_STYLE_TYPE.MYANMAR:\n return createCounterStyleFromRange(value, 0x1040, 0x1049, true, defaultSuffix);\n case LIST_STYLE_TYPE.ORIYA:\n return createCounterStyleFromRange(value, 0xb66, 0xb6f, true, defaultSuffix);\n case LIST_STYLE_TYPE.PERSIAN:\n return createCounterStyleFromRange(value, 0x6f0, 0x6f9, true, defaultSuffix);\n case LIST_STYLE_TYPE.TAMIL:\n return createCounterStyleFromRange(value, 0xbe6, 0xbef, true, defaultSuffix);\n case LIST_STYLE_TYPE.TELUGU:\n return createCounterStyleFromRange(value, 0xc66, 0xc6f, true, defaultSuffix);\n case LIST_STYLE_TYPE.THAI:\n return createCounterStyleFromRange(value, 0xe50, 0xe59, true, defaultSuffix);\n case LIST_STYLE_TYPE.TIBETAN:\n return createCounterStyleFromRange(value, 0xf20, 0xf29, true, defaultSuffix);\n case LIST_STYLE_TYPE.DECIMAL:\n default:\n return createCounterStyleFromRange(value, 48, 57, true, defaultSuffix);\n }\n};\n","import {Bounds} from '../css/layout/bounds';\nimport {\n isBodyElement,\n isCanvasElement,\n isCustomElement,\n isElementNode,\n isHTMLElementNode,\n isIFrameElement,\n isImageElement,\n isScriptElement,\n isSelectElement,\n isSlotElement,\n isStyleElement,\n isSVGElementNode,\n isTextareaElement,\n isTextNode,\n isVideoElement\n} from './node-parser';\nimport {isIdentToken, nonFunctionArgSeparator} from '../css/syntax/parser';\nimport {TokenType} from '../css/syntax/tokenizer';\nimport {CounterState, createCounterText} from '../css/types/functions/counter';\nimport {LIST_STYLE_TYPE, listStyleType} from '../css/property-descriptors/list-style-type';\nimport {CSSParsedCounterDeclaration, CSSParsedPseudoDeclaration} from '../css/index';\nimport {getQuote} from '../css/property-descriptors/quotes';\nimport {Context} from '../core/context';\nimport {DebuggerType, isDebugging} from '../core/debugger';\n\nexport interface CloneOptions {\n ignoreElements?: (element: Element) => boolean;\n onclone?: (document: Document, element: HTMLElement) => void;\n allowTaint?: boolean;\n}\n\nexport interface WindowOptions {\n scrollX: number;\n scrollY: number;\n windowWidth: number;\n windowHeight: number;\n}\n\nexport type CloneConfigurations = CloneOptions & {\n inlineImages: boolean;\n copyStyles: boolean;\n};\n\nconst IGNORE_ATTRIBUTE = 'data-html2canvas-ignore';\n\nexport class DocumentCloner {\n private readonly scrolledElements: [Element, number, number][];\n private readonly referenceElement: HTMLElement;\n clonedReferenceElement?: HTMLElement;\n private readonly documentElement: HTMLElement;\n private readonly counters: CounterState;\n private quoteDepth: number;\n\n constructor(\n private readonly context: Context,\n element: HTMLElement,\n private readonly options: CloneConfigurations\n ) {\n this.scrolledElements = [];\n this.referenceElement = element;\n this.counters = new CounterState();\n this.quoteDepth = 0;\n if (!element.ownerDocument) {\n throw new Error('Cloned element does not have an owner document');\n }\n\n this.documentElement = this.cloneNode(element.ownerDocument.documentElement, false) as HTMLElement;\n }\n\n toIFrame(ownerDocument: Document, windowSize: Bounds): Promise {\n const iframe: HTMLIFrameElement = createIFrameContainer(ownerDocument, windowSize);\n\n if (!iframe.contentWindow) {\n return Promise.reject(`Unable to find iframe window`);\n }\n\n const scrollX = (ownerDocument.defaultView as Window).pageXOffset;\n const scrollY = (ownerDocument.defaultView as Window).pageYOffset;\n\n const cloneWindow = iframe.contentWindow;\n const documentClone: Document = cloneWindow.document;\n\n /* Chrome doesn't detect relative background-images assigned in inline